Browse Source

优化没登陆就入住办理

epass
mk 1 month ago
parent
commit
445b16ef17
  1. 11
      pages/index/index.js

11
pages/index/index.js

@ -77,6 +77,9 @@ Page({
this.login()
},
login() {
wx.showLoading({
title:'加载中...'
})
const that = this
wx.removeStorageSync('token')
wx.login({
@ -91,11 +94,10 @@ Page({
})
this.getPolicyList()
this.getMessage()
wx.hideLoading()
}).catch(err => {
console.log(err);
wx.redirectTo({
url: '/pages/register/register',
})
wx.hideLoading()
})
},
})
@ -185,7 +187,7 @@ Page({
})
},
navigateTo(e){
if(wx.getStorageSync('token')){
if(e.currentTarget.dataset.url && e.currentTarget.dataset.url != '/subpages/OCRCard/pages/index/index'){
if(e.currentTarget.dataset.url === '/pages/serve/serve'){
wx.switchTab({
@ -214,4 +216,5 @@ Page({
}
}
}
});
Loading…
Cancel
Save