Commit 4cc9817d by zhangxw

修改

1 parent cb8c21fe
...@@ -38,6 +38,8 @@ Page({ ...@@ -38,6 +38,8 @@ Page({
let userInfo = wx.p.storage.get('userInfo') let userInfo = wx.p.storage.get('userInfo')
if (userInfo && Object.keys(userInfo)?.length) { if (userInfo && Object.keys(userInfo)?.length) {
wx.p.isLogin = true; wx.p.isLogin = true;
// 默认跳转到首页
wx.p.router.goHome();
} else { } else {
this.loginOut() this.loginOut()
} }
...@@ -48,13 +50,11 @@ Page({ ...@@ -48,13 +50,11 @@ Page({
if (options.url) { if (options.url) {
return this.jumpPage(options.url); return this.jumpPage(options.url);
} }
// 默认跳转到首页
wx.p.router.goHome();
} catch (error) { } catch (error) {
wx.p.isLogin = false; //请求失败默认未登录 wx.p.isLogin = false; //请求失败默认未登录
console.log(error); console.log(error);
wx.p.wxApi.showToast(String(error)); wx.p.wxApi.showToast(String(error));
wx.p.router.goHome(); this.loginOut()
} }
}, },
async getSceneById(scene) { async getSceneById(scene) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!