From ffb8b07c34f157786bda6ea9e956746a0cfc232c Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Mon, 14 Aug 2023 17:38:09 +0800 Subject: [PATCH] 专属导购优化 --- packageE/pages/qy/contactMe/contactMe.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/packageE/pages/qy/contactMe/contactMe.js b/packageE/pages/qy/contactMe/contactMe.js index 062503f..dfa0224 100644 --- a/packageE/pages/qy/contactMe/contactMe.js +++ b/packageE/pages/qy/contactMe/contactMe.js @@ -100,11 +100,19 @@ Page({ url: '/packageE/pages/togoin/togoin', }) }else{ - wx.removeStorageSync('qyzsdg') - this.setData({ - phone:userinfo.mobile - }) - this.getopenuserid(f_arr[2]) + if (userinfo && userinfo.mobile) { + wx.removeStorageSync('qyzsdg') + this.setData({ + phone:userinfo.mobile + }) + this.getopenuserid(f_arr[2]) + }else{ + wx.removeStorageSync('userinfo') + wx.setStorageSync('qyzsdg', tt.scene) + wx.navigateTo({ + url: '/packageE/pages/togoin/togoin', + }) + } } // getApp().globalData.groupchat_id = f_arr[2]; @@ -161,10 +169,11 @@ Page({ }, onShow:function(){ let userinfo = wx.getStorageSync('userinfo'); - if (userinfo) { + if (userinfo && userinfo.mobile) { this.setData({ phone:userinfo.mobile }) + // wx.removeStorageSync('qyzsdg') } if (this.data.id) { this.getopenuserid(this.data.id) -- libgit2 0.21.4