Commit f4463289e9d315e7a1ec02ba78930e6bc9cba3c2
1 parent
fbbf06b5
11
Showing
1 changed file
with
9 additions
and
8 deletions
app.js
| @@ -135,6 +135,14 @@ App({ | @@ -135,6 +135,14 @@ App({ | ||
| 135 | } | 135 | } |
| 136 | }) | 136 | }) |
| 137 | } | 137 | } |
| 138 | + else if(app.globalData.user_id){ //-- 启用默认的user_id -- | ||
| 139 | + app.promiseGet("/api/weshop/users/get/" + app.globalData.setting.stoid + "/" + app.globalData.user_id,{}).then(res=>{ | ||
| 140 | + if(res.data.code==0){ | ||
| 141 | + app.globalData.userInfo = res.data.data; | ||
| 142 | + wx.setStorageSync("userinfo",app.globalData.userInfo); | ||
| 143 | + } | ||
| 144 | + }) | ||
| 145 | + } | ||
| 138 | else { | 146 | else { |
| 139 | //--拿下code-- | 147 | //--拿下code-- |
| 140 | wx.login({ | 148 | wx.login({ |
| @@ -179,14 +187,7 @@ App({ | @@ -179,14 +187,7 @@ App({ | ||
| 179 | }) | 187 | }) |
| 180 | } | 188 | } |
| 181 | 189 | ||
| 182 | - // else if(app.globalData.user_id){ //-- 启用默认的user_id -- | ||
| 183 | - // app.promiseGet("/api/weshop/users/get/" + app.globalData.setting.stoid + "/" + app.globalData.user_id,{}).then(res=>{ | ||
| 184 | - // if(res.data.code==0){ | ||
| 185 | - // app.globalData.userInfo = res.data.data; | ||
| 186 | - // wx.setStorageSync("userinfo",app.globalData.userInfo); | ||
| 187 | - // } | ||
| 188 | - // }) | ||
| 189 | - // } | 190 | + |
| 190 | } | 191 | } |
| 191 | wx.getSystemInfo({ | 192 | wx.getSystemInfo({ |
| 192 | success: (res) => { | 193 | success: (res) => { |