Commit 3555172f by 施宇

11

parent 4c580521
Showing with 7 additions and 4 deletions
...@@ -50,7 +50,7 @@ App({ ...@@ -50,7 +50,7 @@ App({
//验证是否授权 //验证是否授权
if (this.globalData.auth) { if (this.globalData.auth) {
//是否登录 //是否登录
if (this.globalData.token) { if (judgeToken()) {
// wx.switchTab({ // wx.switchTab({
// url: '/pages/tab/home/home' // url: '/pages/tab/home/home'
// }); // });
...@@ -60,9 +60,11 @@ App({ ...@@ -60,9 +60,11 @@ App({
}); });
} }
} else { } else {
wx.reLaunch({ if (!judgeToken()){
url: '/pages/person/auth/index' wx.reLaunch({
}); url: '/pages/person/auth/index'
});
}
} }
......
...@@ -37,6 +37,7 @@ const onMessageError = (err) => { ...@@ -37,6 +37,7 @@ const onMessageError = (err) => {
return true; return true;
} }
const getImUser = () => { const getImUser = () => {
let token = wx.getStorageSync('access_token') || ''; let token = wx.getStorageSync('access_token') || '';
let imName = wx.getStorageSync('myUsername') || ''; let imName = wx.getStorageSync('myUsername') || '';
let imPassword = wx.getStorageSync('myPassword') || ''; let imPassword = wx.getStorageSync('myPassword') || '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment