|
|
@@ -18,7 +18,11 @@
|
|
|
@click="agreeBtn('ystk')" class="agreement-text">《诚祥学隐私政策》</view>,如您同意,请勾选后开始使用
|
|
|
</view>
|
|
|
</view>
|
|
|
- <button class="phone-green-btn wechat-auth-btn" type="default" open-type="getPhoneNumber" @getphonenumber="onWechatAuth">
|
|
|
+ <button v-show="isAgreedTuceng" @click="tucengClick" class="phone-green-btn wechat-auth-btn" type="default">
|
|
|
+ 微信一键登录
|
|
|
+ </button>
|
|
|
+ <button v-show="!isAgreedTuceng" class="phone-green-btn wechat-auth-btn" type="default" open-type="getPhoneNumber"
|
|
|
+ @getphonenumber="onWechatAuth">
|
|
|
微信一键登录
|
|
|
</button>
|
|
|
<view class="qtdl-btn"><text @click="handleChangeFangshi">其他登录</text></view>
|
|
|
@@ -51,6 +55,7 @@
|
|
|
const clearTelIcon = ref(false)
|
|
|
const clearPwIcon = ref(false)
|
|
|
const isAgreed = ref(false)
|
|
|
+ const isAgreedTuceng = ref(true) //涂层
|
|
|
const id = ref('')
|
|
|
const code = ref('')
|
|
|
|
|
|
@@ -72,8 +77,15 @@
|
|
|
|
|
|
function handleChange() {
|
|
|
isAgreed.value = !isAgreed.value
|
|
|
- }
|
|
|
+ isAgreedTuceng.value = !isAgreedTuceng.value
|
|
|
|
|
|
+ }
|
|
|
+ function tucengClick (){
|
|
|
+ if (!isAgreed.value) {
|
|
|
+ toast('请先阅读并同意用户协议和隐私政策')
|
|
|
+ return // 直接返回,不执行后面的授权逻辑
|
|
|
+ }
|
|
|
+ }
|
|
|
function agreeBtn(code) {
|
|
|
if (code === 'yhxy') {
|
|
|
uni.navigateTo({
|
|
|
@@ -109,10 +121,6 @@
|
|
|
}
|
|
|
// 微信授权登录
|
|
|
function onWechatAuth(e) {
|
|
|
- if (!isAgreed.value) {
|
|
|
- toast('请先阅读并同意用户协议和隐私政策')
|
|
|
- return // 直接返回,不执行后面的授权逻辑
|
|
|
- }
|
|
|
if (e.detail.errMsg.includes('fail')) {
|
|
|
toast('授权失败')
|
|
|
return
|
|
|
@@ -203,4 +211,4 @@
|
|
|
cacheManager.set('projectImg', res.data)
|
|
|
});
|
|
|
}
|
|
|
-</script>
|
|
|
+</script>
|