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.
|
|
|
// index.js
|
|
|
|
|
|
|
|
Page({
|
|
|
|
data: {
|
|
|
|
active: 0,
|
|
|
|
showChart: true,
|
|
|
|
wshow: true,
|
|
|
|
brandshow:true,
|
|
|
|
modelshow:true,
|
|
|
|
|
|
|
|
},
|
|
|
|
onShow() {
|
|
|
|
if (!wx.getStorageSync('token')) {
|
|
|
|
wx.navigateTo({
|
|
|
|
url: "/pages/mine/pages/bindUser/index?isHome=1",
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
this.getTabBar().init();
|
|
|
|
if (this.data.active == 2 || this.data.active == 3 || this.data.active == 1) {
|
|
|
|
this.reLoad()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setData({
|
|
|
|
wshow: true,
|
|
|
|
brandshow:true,
|
|
|
|
modelshow:true,
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
themeHide() {
|
|
|
|
this.setData({
|
|
|
|
wshow: false
|
|
|
|
})
|
|
|
|
},
|
|
|
|
brandHide(){
|
|
|
|
this.setData({
|
|
|
|
brandshow: false
|
|
|
|
})
|
|
|
|
},
|
|
|
|
modelHide(){
|
|
|
|
this.setData({
|
|
|
|
modelshow: false
|
|
|
|
})
|
|
|
|
},
|
|
|
|
changeTab(val) {
|
|
|
|
let n = val.detail.index;
|
|
|
|
this.setData({
|
|
|
|
active: n
|
|
|
|
})
|
|
|
|
},
|
|
|
|
reLoad() {
|
|
|
|
this.setData({
|
|
|
|
wshow: false
|
|
|
|
})
|
|
|
|
this.setData({
|
|
|
|
wshow: true
|
|
|
|
})
|
|
|
|
}
|
|
|
|
});
|