This commit is contained in:
zoujiandong 2023-12-13 14:50:10 +08:00
parent 5d2fa7524b
commit 18aac9467a
2 changed files with 19 additions and 0 deletions

View File

@ -23,6 +23,17 @@ Page({
checked: false,
static_host: api.getStaticHost()
},
onShow(){
let usertype = wx.getStorageSync('usertype');
this.setData({
beforeClose: this.data.beforeClose.bind(this),
})
if(!usertype){
wx.navigateTo({
url: "/Pages/index/index"
})
};
},
onLoad(){
let usertype = wx.getStorageSync('usertype');
this.setData({

View File

@ -24,6 +24,14 @@ Page({
})
}
},
onShow(){
let usertype = wx.getStorageSync('usertype');
if(!usertype){
wx.navigateTo({
url: "/Pages/index/index"
})
}
},
onChange(event) {
this.setData({
checked: event.detail,