Merge branch 'dd-7' of git.oa00.com:xiaowen/swsWecat into dd-7

* 'dd-7' of git.oa00.com:xiaowen/swsWecat:
  wyl
  cxw-010203

# Conflicts:
#	pages/index/Salesranking/Vehicletype/Vehicletype.js
dev
liuyongli 3 years ago
commit 9592451b0a

@ -19,7 +19,13 @@ export default function brokenLine(dValue = [], dx = []) {
color: '#999999', //y轴文本颜色
textStyle: {
fontSize: 9
}
},
formatter: (value) => {
if (value >= 10000) {
value = (value / 10000) + '万';
}
return value;
}
},
splitLine: { //分割线
// lineStyle:{
@ -42,11 +48,13 @@ export default function brokenLine(dValue = [], dx = []) {
axisLine: {
show: false, //去除轴线
},
axisLabel: {
color: '#999999', //x轴文本颜色
textStyle: {
fontSize: 9
}
}
}],
series: {

@ -107,6 +107,7 @@ Page({
iPageIndex: iPageIndex,
iPageSize: iPageSize,
token: wx.getStorageSync('token') || 't%2BrswgjvzGM=',
affections: this.data.affections
// sTimeType: sTimeType,
// sStartTime: sStartTime,
// sEndTime: sEndTime
@ -170,7 +171,13 @@ Page({
showDialog: true
})
}
})
},
handlerSource(e) {
const row = e.currentTarget.dataset.row;
wx.navigateTo({
url: '/pages/detail/index?id=' + row._id,
})
console.log(row)
}
})

@ -45,21 +45,23 @@
<view style="font-size: 12px; color: #333333;margin-left: 8px;">共计{{totalNum}}条相似数据</view>
</view>
<scroll-view scroll-y="true" bindscrolltolower="searchScrollLower">
<view class="bc-c-d3" wx:for="{{dataList}}">
<view class="bc-c-d3" wx:for="{{dataList}}" wx:key="index" data-row="{{item}}" bindtap="handlerSource">
<view class="bc-c-d3-dd1">
<view style="color: #999999;font-size: 12px;">
2022-04-29 23:02:01
{{item._source.sourcetime}}
</view>
<view>
<view class="d-top-cp-d1-s1" style="background: #F0F8FF;color: #0084FF;">正面</view>
<view class="d-top-cp-d1-s1" style="background: #F0F8FF;color: #0084FF;" wx:if="{{item._source.affections === 1}}">正面</view>
<view class="d-top-cp-d1-s1" style="background: #FFF0F1;color: #FF4852;" wx:if="{{item._source.affections === 2}}">负面</view>
<view class="d-top-cp-d1-s1" style="background: #FFFBF0;color: #FDCD42;" wx:if="{{item._source.affections === 3}}">中性</view>
</view>
</view>
<view class="bc-c-d3-dd2">
谁说国产没有高性能SUV这3款国产SUV
{{item._source.title}}
</view>
<view class="bc-c-d3-dd3">
<view style="color: #999999;font-size: 12px;width: 50%">来源:百度百家</view>
<view style="color: #999999;font-size: 12px;">作者:无心</view>
<view style="color: #999999;font-size: 12px;width: 50%">来源:{{item._source.source}}</view>
<view style="color: #999999;font-size: 12px;">作者:{{item._source.user_author}}</view>
</view>
</view>
<view class="loading" hidden="{{!loadMore}}">正在载入更多...</view>

@ -1,9 +1,5 @@
const app = getApp()
import brokenLine from "../../../../components/option/singleLineOption"
// const dName = ['正面', ]
// const data = ['12月', '1月', '2月', '3月', '4月', '5月', '6月']
// const dValue = [1500, 1000, 500, 800, 100, 1000, 300]
// const dColor = ['#0084FF', ]
let iPageIndex = 1 // 当前第几页,0代表第一页
let iPageSize = 20 //每页显示多少数据
Component({
@ -25,17 +21,14 @@ Component({
//图表
// positiveOption:brokenLine(dName,dValue,dColor,data),
imageUrl: getApp().globalData.imageUrl,
date: '2021-01',
accountIndex: 0,
ranking: [],
imageUrl: getApp().globalData.imageUrl,
date: '2021-01',
accountIndex: 0,
//
ec: {
lazyLoad: true // 设置图表懒加载
}
date:wx.getStorageSync('newTime'),
accountIndex:0,
ranking:[],
accountIndex:0,
//
ec: {
lazyLoad:true // 设置图表懒加载
}
},
lifetimes: {
attached() {
@ -85,14 +78,15 @@ Component({
this.getTrend()
setTimeout(() => {
wx.hideToast();
}, 500)
},
getTrend() {
let obj = {
},500)
},
getTrend(time=wx.getStorageSync('newTime')){
// console.log("eee",this.data.date)
let obj = {
action: 'getCheZhuCarSeriesRankingHome',
sType: 'Marketing',
sStartTime: "2021-10",
sEndTime: "2021-10",
sType:'Marketing',
sStartTime: time,
sEndTime: time,
iPageIndex: iPageIndex,
iPageSize: iPageSize,
// sSpec:wx.getStorageSync('sSpec') || '',
@ -305,10 +299,20 @@ Component({
wx.hideToast();
}, 500)
},
bindDateChange: function (e) {
bindDateChange: function(e) {
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 300000
})
// console.log('picker发送选择改变携带值为', e.detail.value)
this.getTrend(e.detail.value)
setTimeout(() =>{
wx.hideToast();
},500),
this.setData({
date: e.detail.value
date: e.detail.value,
})
},
priceSel(e) {
@ -316,22 +320,55 @@ Component({
intervalSel: e.currentTarget.dataset.index
})
},
bindAccountChange(e) {
// console.log('切换改变的值', e.detail.value);
this.setData({
accountIndex: e.detail.value
})
},
//弹出框
popup(e) {
// bindAccountChange(e){
// // console.log('切换改变的值', e.detail.value);
// this.setData({
// accountIndex: e.detail.value
// })
// },
//弹出框
times(val){
var month=val.substring(0,4) //获取年份
var bYear=val.substring(val.length-2,val.length-1)=="0"//是否为带零的月份
var year1=val.substring(val.length-1,val.length) //获取月份最后一个数
var year2=val.substring(val.length-2,val.length) //获取整个月份
var time,months,years
if(bYear){
if(parseInt(year1)<6){
months=parseInt(month-1)
if(parseInt(year1)<3){
years="0"+((12-(6-parseInt(year1)))+1)
}else{
years=(12-(6-parseInt(year1)))+1
}
}else{
months=month
years="0"+((parseInt(year1)-6)+1)
}
}else{
months=month
years="0"+(parseInt(year2)-6+1)
}
time=months+'-'+years
return time
},
popup(e) {
let duration = this.data.duration
<<<<<<< HEAD
let models = e.currentTarget.dataset.car
console.log("1234",models)
=======
let models=e.currentTarget.dataset.car
// this.times(this.data.date)
>>>>>>> 4f34912e9badff47678d759e0af47416a96d131c
app.globalData.request({
action: "getCheZhuCarSeriesListHome",
sType: "Marketing",
sSeriesName: models
action:"getCheZhuCarSeriesListHome",
sType:"Marketing",
sSeriesName:models,
sStartTime:this.times(this.data.date),
sEndTime: this.data.date,
}).then(res => {
<<<<<<< HEAD
const dataTime = []
const dataCar = []
for (let i = 0; i < 6; i++) {
@ -345,6 +382,19 @@ Component({
}
dataCar.push(res[i].salescount)
}
=======
// console.log(res)
const dataTime=[]
const dataCar=[]
res.forEach(e => {
if((e.sourcetime).substring(5,6)=="0"){
dataTime.push((e.sourcetime).substring((e.sourcetime).length-1,(e.sourcetime).length)+'月')
}else{
dataTime.push((e.sourcetime).substring((e.sourcetime).length-2,(e.sourcetime).length)+"月")
}
dataCar.push(e.salescount)
});
>>>>>>> 4f34912e9badff47678d759e0af47416a96d131c
// console.log(dataCar,dataTime)
// console.log(models)
this.setData({

@ -134,7 +134,7 @@
<van-popup
show="{{ show }}"
position="bottom"
custom-style="height: 50%;"
custom-style="height: 40%;"
bind:close="onClose"
>
<view class="detail-page">

Loading…
Cancel
Save