登录界面的修正

This commit is contained in:
minimaxagent1 2025-08-04 15:16:25 +08:00
parent cc9768acc4
commit 9c189af1bd

View File

@ -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;