|
|
|
@ -25,6 +25,9 @@ Component({
|
|
|
|
|
accountIndex:0,
|
|
|
|
|
ranking:[],
|
|
|
|
|
accountIndex:0,
|
|
|
|
|
sSpec: '',
|
|
|
|
|
sPriceType: '',
|
|
|
|
|
sEnergyType: '',
|
|
|
|
|
//
|
|
|
|
|
ec: {
|
|
|
|
|
lazyLoad:true // 设置图表懒加载
|
|
|
|
@ -62,24 +65,28 @@ Component({
|
|
|
|
|
icon: 'loading',
|
|
|
|
|
duration: 3000
|
|
|
|
|
})
|
|
|
|
|
this.getAmount(sTimeType, sStartTime, sEndTime),
|
|
|
|
|
this.getTrend()
|
|
|
|
|
this.getAmount(sTimeType, sStartTime, sEndTime);
|
|
|
|
|
this.getTrend();
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
wx.hideToast();
|
|
|
|
|
},500)
|
|
|
|
|
},
|
|
|
|
|
getTrend(time=wx.getStorageSync('newTime')){
|
|
|
|
|
// console.log("eee",this.data.date)
|
|
|
|
|
getTrend(){
|
|
|
|
|
wx.showToast({
|
|
|
|
|
title: '加载中',
|
|
|
|
|
icon: 'loading',
|
|
|
|
|
duration: 300000
|
|
|
|
|
})
|
|
|
|
|
let obj = {
|
|
|
|
|
action: 'getCheZhuCarSeriesRankingHome',
|
|
|
|
|
sType:'Marketing',
|
|
|
|
|
sStartTime: time,
|
|
|
|
|
sEndTime: time,
|
|
|
|
|
sStartTime: this.data.date,
|
|
|
|
|
sEndTime: this.data.date,
|
|
|
|
|
iPageIndex: iPageIndex,
|
|
|
|
|
iPageSize: iPageSize,
|
|
|
|
|
// sSpec:wx.getStorageSync('sSpec') || '',
|
|
|
|
|
// sPriceType:wx.getStorageSync('sPriceType') || '',
|
|
|
|
|
// sEnergyType:wx.getStorageSync('sEnergyType') || ''
|
|
|
|
|
sSpec: this.data.sSpec,
|
|
|
|
|
sPriceType: this.data.sPriceType,
|
|
|
|
|
sEnergyType: this.data.sEnergyType
|
|
|
|
|
}
|
|
|
|
|
//第一次加载数据
|
|
|
|
|
if (iPageIndex == 1) {
|
|
|
|
@ -113,7 +120,9 @@ Component({
|
|
|
|
|
loadMore: false //把"上拉加载"的变量设为false,隐藏
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
wx.hideToast();
|
|
|
|
|
}, 500)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getAmount(sTimeType, sStartTime, sEndTime) {
|
|
|
|
@ -129,6 +138,8 @@ Component({
|
|
|
|
|
}
|
|
|
|
|
arr.push(obj)
|
|
|
|
|
})
|
|
|
|
|
arr.push({name:"全部",value:""})
|
|
|
|
|
|
|
|
|
|
this.setData({
|
|
|
|
|
grades3: arr,
|
|
|
|
|
})
|
|
|
|
@ -211,87 +222,51 @@ Component({
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mySelect1(e) {
|
|
|
|
|
wx.showToast({
|
|
|
|
|
title: '加载中',
|
|
|
|
|
icon: 'loading',
|
|
|
|
|
duration: 300000
|
|
|
|
|
})
|
|
|
|
|
var name = e.currentTarget.dataset.name.name
|
|
|
|
|
var value = e.currentTarget.dataset.name.value
|
|
|
|
|
wx.setStorageSync('sSpec', value)
|
|
|
|
|
// console.log(value)
|
|
|
|
|
this.setData({
|
|
|
|
|
grade_name1: name,
|
|
|
|
|
sSpec: value,
|
|
|
|
|
select1: false
|
|
|
|
|
})
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
wx.hideToast();
|
|
|
|
|
}, 500)
|
|
|
|
|
this.getTrend()
|
|
|
|
|
},
|
|
|
|
|
mySelect2(e) {
|
|
|
|
|
wx.showToast({
|
|
|
|
|
title: '加载中',
|
|
|
|
|
icon: 'loading',
|
|
|
|
|
duration: 300000
|
|
|
|
|
})
|
|
|
|
|
var name = e.currentTarget.dataset.name.name
|
|
|
|
|
var value = e.currentTarget.dataset.name.value
|
|
|
|
|
wx.setStorageSync('sPriceType', value)
|
|
|
|
|
this.setData({
|
|
|
|
|
grade_name2: name,
|
|
|
|
|
select2: false
|
|
|
|
|
select2: false,
|
|
|
|
|
sPriceType: value
|
|
|
|
|
})
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
wx.hideToast();
|
|
|
|
|
}, 500)
|
|
|
|
|
this.getTrend()
|
|
|
|
|
},
|
|
|
|
|
mySelect3(e) {
|
|
|
|
|
wx.showToast({
|
|
|
|
|
title: '加载中',
|
|
|
|
|
icon: 'loading',
|
|
|
|
|
duration: 300000
|
|
|
|
|
})
|
|
|
|
|
var name = e.currentTarget.dataset.name.name
|
|
|
|
|
var value = e.currentTarget.dataset.name.value
|
|
|
|
|
wx.setStorageSync('sEnergyType', value)
|
|
|
|
|
this.setData({
|
|
|
|
|
grade_name3: name,
|
|
|
|
|
select3: false
|
|
|
|
|
select3: false,
|
|
|
|
|
sEnergyType: value
|
|
|
|
|
})
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
wx.hideToast();
|
|
|
|
|
}, 500)
|
|
|
|
|
this.getTrend()
|
|
|
|
|
},
|
|
|
|
|
mySelect4(e) {
|
|
|
|
|
wx.showToast({
|
|
|
|
|
title: '加载中',
|
|
|
|
|
icon: 'loading',
|
|
|
|
|
duration: 300000
|
|
|
|
|
})
|
|
|
|
|
var name = e.currentTarget.dataset.name
|
|
|
|
|
this.setData({
|
|
|
|
|
grade_name4: name,
|
|
|
|
|
select4: false,
|
|
|
|
|
a: name != "列表展示"
|
|
|
|
|
})
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
wx.hideToast();
|
|
|
|
|
}, 500)
|
|
|
|
|
},
|
|
|
|
|
a(){
|
|
|
|
|
console.log(this.data)
|
|
|
|
|
},
|
|
|
|
|
bindDateChange: function(e) {
|
|
|
|
|
wx.showToast({
|
|
|
|
|
title: '加载中',
|
|
|
|
|
icon: 'loading',
|
|
|
|
|
duration: 300000
|
|
|
|
|
})
|
|
|
|
|
console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
|
|
|
this.setData({
|
|
|
|
|
date: e.detail.value,
|
|
|
|
|
})
|
|
|
|
|
this.getTrend(e.detail.value)
|
|
|
|
|
setTimeout(() =>{
|
|
|
|
|
wx.hideToast();
|
|
|
|
|
},500)
|
|
|
|
|
this.getTrend()
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
priceSel(e) {
|
|
|
|
|