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.
|
|
|
import histogram from "../option/columnarOption"
|
|
|
|
const app = getApp()
|
|
|
|
Component({
|
|
|
|
data: {
|
|
|
|
showChart: true,
|
|
|
|
},
|
|
|
|
// onShow() {
|
|
|
|
// this.getTabBar().init();
|
|
|
|
// },
|
|
|
|
lifetimes:{
|
|
|
|
attached(){
|
|
|
|
this.getTrend()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
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)
|
|
|
|
})
|
|
|
|
})},
|
|
|
|
priceSel(e){
|
|
|
|
this.setData({
|
|
|
|
intervalSel: e.currentTarget.dataset.index
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|