Esdese 3 years ago
parent 6b6c7920a2
commit 60c8bb4d97

@ -13,7 +13,7 @@ Page({
}) })
} else { } else {
this.getTabBar().init(); this.getTabBar().init();
if (this.data.active == 2 || this.data.active == 3) { if (this.data.active == 2 || this.data.active == 3 ||this.data.active == 1) {
this.reLoad() this.reLoad()
} }
} }

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

Loading…
Cancel
Save