...
|
...
|
@@ -120,6 +120,7 @@ class App extends Component { |
|
|
}).catch(error => {
|
|
|
console.log(error);
|
|
|
});
|
|
|
|
|
|
event.on('user-is-login', (loginedCallBack, loginSuccess) => {
|
|
|
let userInfo = Taro.getStorageSync('userInfo');
|
|
|
if (userInfo && userInfo.uid && userInfo.session_key) {
|
...
|
...
|
@@ -138,6 +139,20 @@ class App extends Component { |
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
event.on('judge-user-is-login', (isLogined, isLoginCallback) => {
|
|
|
let userInfo = Taro.getStorageSync('userInfo');
|
|
|
if (userInfo && userInfo.uid && userInfo.session_key) {
|
|
|
if (isLogined) {
|
|
|
isLogined(true);
|
|
|
isLoginCallback();
|
|
|
}
|
|
|
} else {
|
|
|
if (isLogined) {
|
|
|
isLogined(false);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
componentDidHide () {}
|
...
|
...
|
|