no message
Showing
1 changed file
with
10 additions
and
10 deletions
| ... | @@ -233,27 +233,27 @@ function getInfo() { | ... | @@ -233,27 +233,27 @@ function getInfo() { |
| 233 | url: '/getInfo', | 233 | url: '/getInfo', |
| 234 | method: 'get' | 234 | method: 'get' |
| 235 | }).then(res => { | 235 | }).then(res => { |
| 236 | const app = getApp() | ||
| 236 | const user = res.data.user | 237 | const user = res.data.user |
| 237 | uni.setStorageSync('userName', user.userName) | 238 | uni.setStorageSync('userName', user.userName) |
| 238 | 239 | ||
| 239 | switch (user.dept.deptType) { | 240 | switch (user.dept.deptType) { |
| 240 | case '1':// 中跆协 | 241 | case '1': // 中跆协 |
| 241 | uni.setStorageSync('userType', '1') | 242 | app.globalData.userType = '1' |
| 242 | break | 243 | break |
| 243 | case '2':// 省 | 244 | case '2': // 省 |
| 244 | case '3': | 245 | case '3': |
| 245 | uni.setStorageSync('userType', '2') | 246 | app.globalData.userType = '2' |
| 246 | break | 247 | break |
| 247 | case '6':// 道馆 | 248 | case '6': // 道馆 |
| 248 | uni.setStorageSync('userType', '4') | 249 | app.globalData.userType = '4' |
| 249 | break | 250 | break |
| 250 | default:// 市、区 | 251 | default: // 市、区 |
| 251 | uni.setStorageSync('userType', '3') | 252 | app.globalData.userType = '3' |
| 252 | break | 253 | break |
| 253 | } | 254 | } |
| 254 | 255 | ||
| 255 | delete user.dept | 256 | app.globalData.userInfo = user |
| 256 | uni.setStorageSync('user', JSON.stringify(user)) | ||
| 257 | }) | 257 | }) |
| 258 | } | 258 | } |
| 259 | 259 | ... | ... |
-
Please register or sign in to post a comment