Commit 05ce0e68 by liimin

Merge branch 'SAAS+V4.56.0-0908' of http://192.168.3.233:8090/saas/mini-program/…

…points-mall into SAAS+V4.56.0-0908
2 parents b6a940a4 e937f696
...@@ -152,9 +152,10 @@ Page({ ...@@ -152,9 +152,10 @@ Page({
captcha, captcha,
sessionId: this.sessionId sessionId: this.sessionId
}) })
data.headImgUrl = data.logo if (code == '0') {
if (code == '0') this.customerLoginCallBack(data) data.headImgUrl = data?.logo
else throw message this.customerLoginCallBack(data)
} else {throw message}
wx.hideLoading() wx.hideLoading()
} catch (error) { } catch (error) {
this.showTips(error || '服务不可用') this.showTips(error || '服务不可用')
......
...@@ -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!