修复小程序登录提示协议顺序问题

This commit is contained in:
hupeng
2023-12-16 21:32:07 +08:00
parent 62d21567cd
commit 0080d05e28

View File

@ -12,6 +12,12 @@
class="cu-btn author-btn"
open-type="getPhoneNumber"
@getphonenumber="phoneLogin"
v-if="isChecked"
>手机号快捷登录</button>
<button
v-else
class="cu-btn author-btn"
@tap="phoneLoginBefore"
>手机号快捷登录</button>
<button
class="cu-btn close-btn"
@ -186,10 +192,8 @@ export default {
})
},
// 微信用户手机号登录
phoneLogin(e) {
console.log('code22:',e)
phoneLoginBefore() {
if(!this.isChecked) {
uni.showToast({
title: '请勾选下面协议',
icon: 'none',
@ -197,7 +201,8 @@ export default {
})
return
}
console.log('用户微信手机号登录')
},
phoneLogin(e) {
if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
console.log('wxLoginCode', this.code)
cookie.set('wxLoginCode', this.code)