Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
swx_weapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-11-14 10:35:09 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b017144230684b14fba5dc7c38d152580c3ec692
b0171442
1 parent
c4cc6b7e
授权提示优化
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
src/pages/auth/index.vue
src/pages/auth/index.vue
View file @
b017144
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-11-
03 18:24:37
* @LastEditTime: 2022-11-
14 10:33:16
* @FilePath: /swx/src/pages/auth/index.vue
* @Description: 文件描述
-->
...
...
@@ -31,10 +31,15 @@ export default {
success: function (res) {
if (res.code) {
//发起网络请求
Taro.showLoading({
title: '授权中',
})
request.post('/srv/?a=openid', {
code: res.code
// openid: '0002'
// openid: 'o5NFZ5cFQtLRy3aVHaZMLkjHFusI'
// openid: 'o5NFZ5TpgG4FwYursGCLjcUJH2ak'
// openid: 'o5NFZ5cqroPYwawCp8FEOxewtgnw'
})
.then(res => {
if (res.data.code) {
...
...
@@ -53,14 +58,16 @@ export default {
url: '../apxUserInfo/index'
})
}
Taro.hideLoading();
}
} else {
console.warn(res.data.msg);
Taro.hideLoading();
}
})
.catch(err => {
console.error(err);
Taro.hideLoading();
});
} else {
console.log('登录失败!' + res.errMsg)
...
...
Please
register
or
login
to post a comment