|
|
|
@ -46,16 +46,19 @@ Component({
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
wx.setStorageSync('modelsData', this.data.boxArr)
|
|
|
|
|
if(wx.getStorageSync('sBrand').length<1){
|
|
|
|
|
wx.setStorageSync('sBrand', this.data.sBrand)
|
|
|
|
|
let sBrand = []
|
|
|
|
|
for(let i of this.data.boxArr){
|
|
|
|
|
if(i) sBrand.push(i.brand)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
wx.setStorageSync('modelsData', this.data.boxArr)
|
|
|
|
|
wx.setStorageSync('sBrand', sBrand)
|
|
|
|
|
wx.navigateTo({
|
|
|
|
|
url: `/contrastPackages/carModelsRatio/index`,
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onChange(event) {
|
|
|
|
|
let sBrand = []
|
|
|
|
|
// let sBrand = []
|
|
|
|
|
const {detail} = event
|
|
|
|
|
const result = []
|
|
|
|
|
if(detail.length>6){
|
|
|
|
@ -68,13 +71,11 @@ Component({
|
|
|
|
|
for(let i of detail){
|
|
|
|
|
let x = JSON.parse(i)
|
|
|
|
|
result.push(x)
|
|
|
|
|
sBrand.push(x.brand)
|
|
|
|
|
}
|
|
|
|
|
result.length = 6
|
|
|
|
|
this.setData({
|
|
|
|
|
result:detail,
|
|
|
|
|
boxArr:result,
|
|
|
|
|
sBrand,
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
del(e) {
|
|
|
|
|