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 | 40 | <view class="page-login__wechat"> |
| 41 | 41 | <u-button type="primary" plain shape="circle" open-type="getPhoneNumber" :loading="submitting" loading-text="登录中..." @getphonenumber="onGetPhoneNumber"> |
| 42 | 42 | <!-- <u-icon name="weixin-fill" size="inherit" /> --> |
| 43 | - <text>微信一键登录</text> | |
| 43 | + <text>手机号快捷登录</text> | |
| 44 | 44 | </u-button> |
| 45 | 45 | </view> |
| 46 | 46 | <!-- #endif --> |
| ... | ... | @@ -95,7 +95,7 @@ export default { |
| 95 | 95 | if (code) { |
| 96 | 96 | this.code = code; |
| 97 | 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 | 136 | if (!this.isChecked) { |
| 137 | 137 | return uni.showToast({ icon: 'none', title: '请您阅读并勾选《用户协议》和《隐私政策》' }); |
| 138 | 138 | } |
| 139 | + if (!e.detail.code) { | |
| 140 | + return; | |
| 141 | + } | |
| 142 | + console.info(e.detail); | |
| 139 | 143 | if (!this.submitting) { |
| 140 | 144 | this.submitting = true; |
| 141 | 145 | uni.$u.api.login | ... | ... |