Commit 295d451a1d4dc97ae79b0b090fef19ca19d95cd2
1 parent
97108548
Exists in
master
and in
1 other branch
fix: 微信一键登录->手机号快捷登录
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
pages/login/login.vue
| @@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
| 40 | <view class="page-login__wechat"> | 40 | <view class="page-login__wechat"> |
| 41 | <u-button type="primary" plain shape="circle" open-type="getPhoneNumber" :loading="submitting" loading-text="登录中..." @getphonenumber="onGetPhoneNumber"> | 41 | <u-button type="primary" plain shape="circle" open-type="getPhoneNumber" :loading="submitting" loading-text="登录中..." @getphonenumber="onGetPhoneNumber"> |
| 42 | <!-- <u-icon name="weixin-fill" size="inherit" /> --> | 42 | <!-- <u-icon name="weixin-fill" size="inherit" /> --> |
| 43 | - <text>微信一键登录</text> | 43 | + <text>手机号快捷登录</text> |
| 44 | </u-button> | 44 | </u-button> |
| 45 | </view> | 45 | </view> |
| 46 | <!-- #endif --> | 46 | <!-- #endif --> |
| @@ -95,7 +95,7 @@ export default { | @@ -95,7 +95,7 @@ export default { | ||
| 95 | if (code) { | 95 | if (code) { |
| 96 | this.code = code; | 96 | this.code = code; |
| 97 | } else { | 97 | } else { |
| 98 | - return uni.showToast({ icon: 'none', title: '微信授权失败' }); | 98 | + return uni.showToast({ icon: 'none', title: '授权失败' }); |
| 99 | } | 99 | } |
| 100 | }, | 100 | }, |
| 101 | }); | 101 | }); |
| @@ -136,6 +136,10 @@ export default { | @@ -136,6 +136,10 @@ export default { | ||
| 136 | if (!this.isChecked) { | 136 | if (!this.isChecked) { |
| 137 | return uni.showToast({ icon: 'none', title: '请您阅读并勾选《用户协议》和《隐私政策》' }); | 137 | return uni.showToast({ icon: 'none', title: '请您阅读并勾选《用户协议》和《隐私政策》' }); |
| 138 | } | 138 | } |
| 139 | + if (!e.detail.code) { | ||
| 140 | + return; | ||
| 141 | + } | ||
| 142 | + console.info(e.detail); | ||
| 139 | if (!this.submitting) { | 143 | if (!this.submitting) { |
| 140 | this.submitting = true; | 144 | this.submitting = true; |
| 141 | uni.$u.api.login | 145 | uni.$u.api.login |