Commit ffb8b07c34f157786bda6ea9e956746a0cfc232c
1 parent
7ae6bf9b
专属导购优化
Showing
1 changed file
with
15 additions
and
6 deletions
packageE/pages/qy/contactMe/contactMe.js
@@ -100,11 +100,19 @@ Page({ | @@ -100,11 +100,19 @@ Page({ | ||
100 | url: '/packageE/pages/togoin/togoin', | 100 | url: '/packageE/pages/togoin/togoin', |
101 | }) | 101 | }) |
102 | }else{ | 102 | }else{ |
103 | - wx.removeStorageSync('qyzsdg') | ||
104 | - this.setData({ | ||
105 | - phone:userinfo.mobile | ||
106 | - }) | ||
107 | - this.getopenuserid(f_arr[2]) | 103 | + if (userinfo && userinfo.mobile) { |
104 | + wx.removeStorageSync('qyzsdg') | ||
105 | + this.setData({ | ||
106 | + phone:userinfo.mobile | ||
107 | + }) | ||
108 | + this.getopenuserid(f_arr[2]) | ||
109 | + }else{ | ||
110 | + wx.removeStorageSync('userinfo') | ||
111 | + wx.setStorageSync('qyzsdg', tt.scene) | ||
112 | + wx.navigateTo({ | ||
113 | + url: '/packageE/pages/togoin/togoin', | ||
114 | + }) | ||
115 | + } | ||
108 | } | 116 | } |
109 | 117 | ||
110 | // getApp().globalData.groupchat_id = f_arr[2]; | 118 | // getApp().globalData.groupchat_id = f_arr[2]; |
@@ -161,10 +169,11 @@ Page({ | @@ -161,10 +169,11 @@ Page({ | ||
161 | }, | 169 | }, |
162 | onShow:function(){ | 170 | onShow:function(){ |
163 | let userinfo = wx.getStorageSync('userinfo'); | 171 | let userinfo = wx.getStorageSync('userinfo'); |
164 | - if (userinfo) { | 172 | + if (userinfo && userinfo.mobile) { |
165 | this.setData({ | 173 | this.setData({ |
166 | phone:userinfo.mobile | 174 | phone:userinfo.mobile |
167 | }) | 175 | }) |
176 | + // wx.removeStorageSync('qyzsdg') | ||
168 | } | 177 | } |
169 | if (this.data.id) { | 178 | if (this.data.id) { |
170 | this.getopenuserid(this.data.id) | 179 | this.getopenuserid(this.data.id) |