no message
Showing
1 changed file
with
18 additions
and
18 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 | switch (user.dept.deptType) { | ||
| 240 | case '1':// 中跆协 | ||
| 241 | uni.setStorageSync('userType', '1') | ||
| 242 | break | ||
| 243 | case '2':// 省 | ||
| 244 | case '3': | ||
| 245 | uni.setStorageSync('userType', '2') | ||
| 246 | break | ||
| 247 | case '6':// 道馆 | ||
| 248 | uni.setStorageSync('userType', '4') | ||
| 249 | break | ||
| 250 | default:// 市、区 | ||
| 251 | uni.setStorageSync('userType', '3') | ||
| 252 | break | ||
| 253 | } | ||
| 254 | 239 | ||
| 255 | delete user.dept | 240 | switch (user.dept.deptType) { |
| 256 | uni.setStorageSync('user', JSON.stringify(user)) | 241 | case '1': // 中跆协 |
| 242 | app.globalData.userType = '1' | ||
| 243 | break | ||
| 244 | case '2': // 省 | ||
| 245 | case '3': | ||
| 246 | app.globalData.userType = '2' | ||
| 247 | break | ||
| 248 | case '6': // 道馆 | ||
| 249 | app.globalData.userType = '4' | ||
| 250 | break | ||
| 251 | default: // 市、区 | ||
| 252 | app.globalData.userType = '3' | ||
| 253 | break | ||
| 254 | } | ||
| 255 | |||
| 256 | app.globalData.userInfo = user | ||
| 257 | }) | 257 | }) |
| 258 | } | 258 | } |
| 259 | 259 | ... | ... |
-
Please register or sign in to post a comment