新增用户隐私协议
This commit is contained in:
@@ -49,20 +49,22 @@
|
||||
</view>
|
||||
|
||||
<!-- 协议勾选 -->
|
||||
<view class="agreement-item" @click="toggleAgreement">
|
||||
<uni-icons
|
||||
type="checkbox-filled"
|
||||
size="24"
|
||||
color="#007aff"
|
||||
v-if="agreeAgreement"
|
||||
></uni-icons>
|
||||
<uni-icons
|
||||
type="checkbox"
|
||||
size="24"
|
||||
color="#999"
|
||||
v-else
|
||||
></uni-icons>
|
||||
<text class="agreement-text">我已阅读并同意《用户隐私政策》</text>
|
||||
<view class="agreement-item" >
|
||||
<view @click="toggleAgreement">
|
||||
<uni-icons
|
||||
type="checkbox-filled"
|
||||
size="24"
|
||||
color="#007aff"
|
||||
v-if="agreeAgreement"
|
||||
></uni-icons>
|
||||
<uni-icons
|
||||
type="checkbox"
|
||||
size="24"
|
||||
color="#999"
|
||||
v-else
|
||||
></uni-icons>
|
||||
</view>
|
||||
<text class="agreement-text" @click.stop="goToPrivacy">我已阅读并同意<text class="agreePrivacy" :class="{active:isClicked}">《用户隐私政策》</text></text>
|
||||
</view>
|
||||
|
||||
<!-- 登录按钮 -->
|
||||
@@ -98,6 +100,8 @@ const agreeAgreement = ref(false); // 默认勾选
|
||||
const countDown = ref(0);
|
||||
// 定时器
|
||||
let timer = null;
|
||||
// 控制点击变色
|
||||
const isClicked = ref(false)
|
||||
|
||||
// ========== 计算属性 ==========
|
||||
// 是否可以获取验证码(手机号格式正确)
|
||||
@@ -124,6 +128,14 @@ const checkForm = () => {
|
||||
const toggleAgreement = () => {
|
||||
agreeAgreement.value = !agreeAgreement.value;
|
||||
};
|
||||
// 跳转隐私协议
|
||||
const goToPrivacy = () => {
|
||||
// 点击变色
|
||||
isClicked.value = true
|
||||
uni.navigateTo({
|
||||
url:'/pageSubPack/loginSub/privacy',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
const getVerifyCode = () => {
|
||||
@@ -167,7 +179,7 @@ const getVerifyCode = () => {
|
||||
// 登录处理
|
||||
const handleLogin = () => {
|
||||
if (!canLogin.value) return;
|
||||
uni.showLoading({ title: '登录中...', mask: true });
|
||||
// uni.showLoading({ title: '登录中...', mask: true });
|
||||
let params = {
|
||||
phone:phoneNumber.value,
|
||||
smsCode:'123456',
|
||||
@@ -327,7 +339,12 @@ onUnmounted(() => {
|
||||
color: #666;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.agreePrivacy{
|
||||
color: #666;
|
||||
}
|
||||
.agreePrivacy.active{
|
||||
color: #2F77FD;
|
||||
}
|
||||
/* 登录按钮 */
|
||||
.login-btn {
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user