You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.3 KiB

3 years ago
import histogram from "../option/columnarOption"
3 years ago
const app = getApp()
3 years ago
Component({
data: {
showChart: true,
},
3 years ago
// onShow() {
// this.getTabBar().init();
// },
lifetimes:{
attached(){
this.getTrend()
}
3 years ago
},
methods: {
3 years ago
getTrend(){
app.globalData.request({
action: 'getCheZhuCarSeriesRankingHome',
sType:'Marketing',
sStartTime: "2021-10",
sEndTime:"2021-10",
iPageIndex: "iPageIndex",
iPageSize: "iPageSize",
// sSpec:wx.getStorageSync('sSpec') || '',
// sPriceType:wx.getStorageSync('sPriceType') || '',
// sEnergyType:wx.getStorageSync('sEnergyType') || ''
}).then(res => {
let carName = []
let carValue=[]
res.forEach(e =>{
carName.push(e.seriesname),
carValue.push(e.salescount)
})
this.setData({
brandOption: histogram(carName,carValue,'#0084FF',false)
})
})},
3 years ago
priceSel(e){
this.setData({
intervalSel: e.currentTarget.dataset.index
})
}
}
})