|
|
|
@ -117,6 +117,7 @@ Page({
|
|
|
|
|
sPriceType: this.data.sPriceType,
|
|
|
|
|
sEnergyType: this.data.sEnergyType
|
|
|
|
|
}
|
|
|
|
|
let length=0
|
|
|
|
|
//第一次加载数据
|
|
|
|
|
if (iPageIndex == 1) {
|
|
|
|
|
this.setData({
|
|
|
|
@ -125,9 +126,6 @@ Page({
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
app.globalData.request(obj,(database)=>{
|
|
|
|
|
this.setData({
|
|
|
|
|
// ranking1:database.Data,
|
|
|
|
|
})
|
|
|
|
|
}).then(res => {
|
|
|
|
|
const carName=[]
|
|
|
|
|
const carValue=[]
|
|
|
|
@ -140,10 +138,12 @@ Page({
|
|
|
|
|
carName.push(e.seriesname)
|
|
|
|
|
carValue.push(e.salescount)
|
|
|
|
|
})
|
|
|
|
|
// length=(carName.length/carName.length)*100
|
|
|
|
|
// console.log(carName.length)
|
|
|
|
|
this.setData({
|
|
|
|
|
ranking: list, //获取数据数组
|
|
|
|
|
loadMore: false,//把"上拉加载"的变量设为false,显示
|
|
|
|
|
brandOption:histogram(carName,carValue,'#0084FF',false)
|
|
|
|
|
brandOption:histogram(carName,carValue,'#0084FF',false,(20/list.length)*100)
|
|
|
|
|
});
|
|
|
|
|
if (res.length < iPageSize) {
|
|
|
|
|
this.setData({
|
|
|
|
@ -411,6 +411,7 @@ Page({
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//弹出框
|
|
|
|
|
|
|
|
|
|
popup(e) {
|
|
|
|
|
let duration = this.data.duration
|
|
|
|
|
let models = e.currentTarget.dataset.car
|
|
|
|
|