Showing
1 changed file
with
9 additions
and
2 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-09-19 14:11:06 | 2 | * @Date: 2022-09-19 14:11:06 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2022-11-03 18:24:37 | 4 | + * @LastEditTime: 2022-11-14 10:33:16 |
| 5 | * @FilePath: /swx/src/pages/auth/index.vue | 5 | * @FilePath: /swx/src/pages/auth/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -31,10 +31,15 @@ export default { | ... | @@ -31,10 +31,15 @@ export default { |
| 31 | success: function (res) { | 31 | success: function (res) { |
| 32 | if (res.code) { | 32 | if (res.code) { |
| 33 | //发起网络请求 | 33 | //发起网络请求 |
| 34 | + Taro.showLoading({ | ||
| 35 | + title: '授权中', | ||
| 36 | + }) | ||
| 34 | request.post('/srv/?a=openid', { | 37 | request.post('/srv/?a=openid', { |
| 35 | code: res.code | 38 | code: res.code |
| 36 | // openid: '0002' | 39 | // openid: '0002' |
| 37 | // openid: 'o5NFZ5cFQtLRy3aVHaZMLkjHFusI' | 40 | // openid: 'o5NFZ5cFQtLRy3aVHaZMLkjHFusI' |
| 41 | + // openid: 'o5NFZ5TpgG4FwYursGCLjcUJH2ak' | ||
| 42 | + // openid: 'o5NFZ5cqroPYwawCp8FEOxewtgnw' | ||
| 38 | }) | 43 | }) |
| 39 | .then(res => { | 44 | .then(res => { |
| 40 | if (res.data.code) { | 45 | if (res.data.code) { |
| ... | @@ -53,14 +58,16 @@ export default { | ... | @@ -53,14 +58,16 @@ export default { |
| 53 | url: '../apxUserInfo/index' | 58 | url: '../apxUserInfo/index' |
| 54 | }) | 59 | }) |
| 55 | } | 60 | } |
| 56 | - | 61 | + Taro.hideLoading(); |
| 57 | } | 62 | } |
| 58 | } else { | 63 | } else { |
| 59 | console.warn(res.data.msg); | 64 | console.warn(res.data.msg); |
| 65 | + Taro.hideLoading(); | ||
| 60 | } | 66 | } |
| 61 | }) | 67 | }) |
| 62 | .catch(err => { | 68 | .catch(err => { |
| 63 | console.error(err); | 69 | console.error(err); |
| 70 | + Taro.hideLoading(); | ||
| 64 | }); | 71 | }); |
| 65 | } else { | 72 | } else { |
| 66 | console.log('登录失败!' + res.errMsg) | 73 | console.log('登录失败!' + res.errMsg) | ... | ... |
-
Please register or login to post a comment