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, checked: false,
static_host: api.getStaticHost() 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(){ onLoad(){
let usertype = wx.getStorageSync('usertype'); let usertype = wx.getStorageSync('usertype');
this.setData({ 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) { onChange(event) {
this.setData({ this.setData({
checked: event.detail, checked: event.detail,