登录界面的修正
This commit is contained in:
parent
cc9768acc4
commit
9c189af1bd
|
|
@ -6,7 +6,7 @@
|
|||
<view class="imgbox">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uGPwljIaEppyKAT1iQaW" mode=""></image>
|
||||
</view>
|
||||
<button class="button" :disabled="!hasAgreed" :class="{ 'button-disabled': !hasAgreed }" @click="getPhoneNumber" >
|
||||
<button class="button" @click="getPhoneNumber">
|
||||
授权登录
|
||||
</button>
|
||||
<view class="tip">
|
||||
|
|
@ -31,6 +31,7 @@
|
|||
<rich-text :nodes="serviceTermsContent"></rich-text>
|
||||
</scroll-view>
|
||||
<view class="popup-footer">
|
||||
<text class="popup-tip">请仔细阅读服务条款,阅读完毕后点击同意</text>
|
||||
<button class="popup-btn" @click="agreeServiceTerms">同意</button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -47,6 +48,7 @@
|
|||
<rich-text :nodes="privacyPolicyContent"></rich-text>
|
||||
</scroll-view>
|
||||
<view class="popup-footer">
|
||||
<text class="popup-tip">请仔细阅读隐私政策,阅读完毕后点击同意</text>
|
||||
<button class="popup-btn" @click="agreePrivacyPolicy">同意</button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -162,16 +164,30 @@ import { getServiceTerms, getPrivacyPolicy } from "@/api/article/article.js";
|
|||
this.showPrivacyPolicyPopup = false;
|
||||
},
|
||||
// 同意服务条款
|
||||
agreeServiceTerms() {
|
||||
async agreeServiceTerms() {
|
||||
this.hasReadServiceTerms = true;
|
||||
this.closeServiceTermsPopup();
|
||||
this.checkAgreementStatus();
|
||||
|
||||
// 如果隐私政策还未阅读,自动显示隐私政策
|
||||
if (!this.hasReadPrivacyPolicy) {
|
||||
setTimeout(() => {
|
||||
this.showPrivacyPolicy();
|
||||
}, 500); // 延迟500ms,让用户看到服务条款已同意
|
||||
}
|
||||
},
|
||||
// 同意隐私政策
|
||||
agreePrivacyPolicy() {
|
||||
async agreePrivacyPolicy() {
|
||||
this.hasReadPrivacyPolicy = true;
|
||||
this.closePrivacyPolicyPopup();
|
||||
this.checkAgreementStatus();
|
||||
|
||||
// 如果服务条款还未阅读,自动显示服务条款
|
||||
if (!this.hasReadServiceTerms) {
|
||||
setTimeout(() => {
|
||||
this.showServiceTerms();
|
||||
}, 500); // 延迟500ms,让用户看到隐私政策已同意
|
||||
}
|
||||
},
|
||||
// 检查同意状态
|
||||
checkAgreementStatus() {
|
||||
|
|
@ -180,13 +196,32 @@ import { getServiceTerms, getPrivacyPolicy } from "@/api/article/article.js";
|
|||
this.hasAgreed = true;
|
||||
}
|
||||
},
|
||||
|
||||
// 显示未阅读的条款
|
||||
async showUnreadTerms() {
|
||||
// 如果服务条款未阅读,先显示服务条款
|
||||
if (!this.hasReadServiceTerms) {
|
||||
await this.showServiceTerms();
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果隐私政策未阅读,显示隐私政策
|
||||
if (!this.hasReadPrivacyPolicy) {
|
||||
await this.showPrivacyPolicy();
|
||||
return;
|
||||
}
|
||||
},
|
||||
getPhoneNumber() {
|
||||
// 检查是否同意条款
|
||||
if (!this.hasAgreed) {
|
||||
// 检查是否已阅读条款
|
||||
if (!this.hasReadServiceTerms || !this.hasReadPrivacyPolicy) {
|
||||
uni.showToast({
|
||||
title: '请先同意服务条款和隐私政策',
|
||||
icon: 'none'
|
||||
title: '请先阅读服务条款和隐私政策',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
// 自动弹出未阅读的条款
|
||||
this.showUnreadTerms();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -299,10 +334,7 @@ import { getServiceTerms, getPrivacyPolicy } from "@/api/article/article.js";
|
|||
font-size: 40rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.button-disabled {
|
||||
background: #CCCCCC !important;
|
||||
color: #999999 !important;
|
||||
}
|
||||
|
||||
.tip{
|
||||
margin-top:128rpx ;
|
||||
display: flex;
|
||||
|
|
@ -396,6 +428,15 @@ import { getServiceTerms, getPrivacyPolicy } from "@/api/article/article.js";
|
|||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.popup-tip {
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
margin-bottom: 20rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.popup-btn {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user