940 lines
20 KiB
Vue
940 lines
20 KiB
Vue
<template>
|
||
<view class="register-container">
|
||
<!-- 背景图片层 -->
|
||
<image
|
||
class="background-image"
|
||
src="/static/background/login-bg.png"
|
||
mode="aspectFill"
|
||
></image>
|
||
<!-- 女孩图片 -->
|
||
<image
|
||
class="girl-image"
|
||
src="/static/login/person-photo.png"
|
||
mode="aspectFit"
|
||
></image>
|
||
<!-- 粉色玩偶(遮挡女孩脸的下半部分) -->
|
||
<image
|
||
class="doll-image"
|
||
src="/static/login/login-character.png"
|
||
mode="aspectFit"
|
||
></image>
|
||
<view class="background-overlay"></view>
|
||
|
||
<!-- 内容区域 -->
|
||
<view class="content-wrapper">
|
||
<!-- TOPFANS 标题 -->
|
||
<view class="title-wrapper">
|
||
<text class="title-text">TOPFANS</text>
|
||
</view>
|
||
<!-- 表单区域(居中部分) -->
|
||
<view class="form-container">
|
||
<view class="form-wrapper">
|
||
<!-- 手机号输入框 -->
|
||
<view class="input-wrapper">
|
||
<input
|
||
class="input-field"
|
||
type="number"
|
||
v-model="form.phone"
|
||
placeholder="请输入手机号"
|
||
maxlength="11"
|
||
placeholder-class="input-placeholder"
|
||
@input="handlePhoneInput"
|
||
/>
|
||
</view>
|
||
|
||
<!-- 验证码输入区域 -->
|
||
<view v-if="showCodeInput" class="input-wrapper code-wrapper">
|
||
<input
|
||
class="input-field"
|
||
type="number"
|
||
v-model="form.code"
|
||
placeholder="请输入验证码"
|
||
maxlength="6"
|
||
placeholder-class="input-placeholder"
|
||
:disabled="codeStatus === 'verified'"
|
||
/>
|
||
<view
|
||
class="send-code-btn"
|
||
:class="{
|
||
countdown: codeStatus === 'countdown',
|
||
verified: codeStatus === 'verified',
|
||
}"
|
||
@click="handleSendCode"
|
||
>
|
||
<text v-if="codeStatus === 'unsent' || codeStatus === 'resend'"
|
||
>发送验证码</text
|
||
>
|
||
<text v-else-if="codeStatus === 'countdown'"
|
||
>{{ countdown }}秒</text
|
||
>
|
||
<text v-else-if="codeStatus === 'verified'">已验证</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 验证码错误提示 -->
|
||
<view v-if="codeError" class="error-message">
|
||
<text>{{ codeError }}</text>
|
||
</view>
|
||
|
||
<!-- 验证按钮(验证码输入后显示) -->
|
||
<!-- <view
|
||
v-if="showCodeInput && codeStatus !== 'verified'"
|
||
class="verify-btn-wrapper"
|
||
>
|
||
<button
|
||
class="btn-secondary"
|
||
:disabled="isVerifying || !form.code || form.code.length !== 6"
|
||
@click="handleVerifyCode"
|
||
>
|
||
{{ isVerifying ? "验证中..." : "验证验证码" }}
|
||
</button>
|
||
</view> -->
|
||
|
||
<!-- 密码输入框 -->
|
||
<view class="input-wrapper password-wrapper">
|
||
<input
|
||
class="input-field"
|
||
:type="showPassword ? 'text' : 'password'"
|
||
v-model="form.password"
|
||
placeholder="请输入密码"
|
||
placeholder-class="input-placeholder"
|
||
/>
|
||
<view class="eye-icon" @click="togglePassword">
|
||
<text class="eye-text">{{ showPassword ? "👁️" : "👁️🗨️" }}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 错误提示 -->
|
||
<view v-if="errorMessage" class="error-message">
|
||
<text>{{ errorMessage }}</text>
|
||
</view>
|
||
|
||
<!-- 注册按钮 -->
|
||
<button class="btn-primary" @click="handleRegister">注册</button>
|
||
|
||
<!-- 登录链接 -->
|
||
<view class="login-link" @click="goToLogin">
|
||
<text>已有账号?去登录</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 底部服务条款 -->
|
||
<view class="footer-text">
|
||
<view class="agreement-wrapper">
|
||
<view class="agreement-checkbox" @click="toggleAgreement">
|
||
<view class="custom-checkbox" :class="{ checked: agreedToTerms }">
|
||
<view v-if="agreedToTerms" class="checkbox-inner"></view>
|
||
</view>
|
||
<text class="agreement-label">我已阅读并同意</text>
|
||
</view>
|
||
<text class="agreement-link" @click="showAgreementModal"
|
||
>《Topfans用户服务协议》</text
|
||
>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 提示弹窗 -->
|
||
<view v-if="showTipDialog" class="tip-dialog-mask" @click="closeTipDialog">
|
||
<view class="tip-dialog" @click.stop>
|
||
<view class="tip-dialog-header">
|
||
<text class="tip-dialog-title">提示</text>
|
||
<text class="tip-dialog-close" @click="closeTipDialog">×</text>
|
||
</view>
|
||
<view class="tip-dialog-content">
|
||
<text class="tip-text">阅读并同意以下条款</text>
|
||
<text class="tip-agreement-link" @click="openAgreementFromTip"
|
||
>《Topfans用户服务协议》</text
|
||
>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 协议全文弹窗 -->
|
||
<view
|
||
v-if="showAgreementDialog"
|
||
class="agreement-dialog-mask"
|
||
@click="closeAgreementDialog"
|
||
>
|
||
<view class="agreement-dialog" @click.stop>
|
||
<view class="agreement-dialog-header">
|
||
<text class="agreement-dialog-title">Topfans用户服务协议</text>
|
||
<text class="agreement-dialog-close" @click="closeAgreementDialog"
|
||
>×</text
|
||
>
|
||
</view>
|
||
<scroll-view class="agreement-dialog-content" scroll-y>
|
||
<text class="agreement-text">{{
|
||
agreementContent || "协议内容加载中..."
|
||
}}</text>
|
||
</scroll-view>
|
||
<view class="agreement-dialog-footer">
|
||
<button class="agreement-confirm-btn" @click="agreeAndClose">
|
||
我同意
|
||
</button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script setup>
|
||
import { ref } from "vue";
|
||
import { validatePhone, validatePassword } from "@/utils/validator";
|
||
import { AGREEMENT_CONTENT } from "@/utils/agreement";
|
||
import { checkmobileApi, sendCodeApi, verifyCodeApi } from "@/utils/api";
|
||
|
||
// 响应式数据
|
||
const form = ref({
|
||
phone: "",
|
||
password: "",
|
||
code: "",
|
||
});
|
||
const showPassword = ref(false);
|
||
const errorMessage = ref("");
|
||
const agreedToTerms = ref(false);
|
||
const agreementContent = ref("");
|
||
const showAgreementDialog = ref(false);
|
||
const showTipDialog = ref(false);
|
||
const phoneChecking = ref(false);
|
||
const showCodeInput = ref(true); // 是否显示验证码输入框
|
||
const codeStatus = ref("unsent"); // unsent, countdown, resend, verified
|
||
const countdown = ref(60);
|
||
const codeError = ref("");
|
||
const verifyToken = ref("");
|
||
const countdownTimer = ref(null);
|
||
const isVerifying = ref(false);
|
||
|
||
// 获取协议内容
|
||
const getAgreementContent = () => {
|
||
return AGREEMENT_CONTENT;
|
||
};
|
||
|
||
// 切换密码显示/隐藏
|
||
const togglePassword = () => {
|
||
showPassword.value = !showPassword.value;
|
||
};
|
||
|
||
// 手机号输入处理
|
||
const handlePhoneInput = (e) => {
|
||
const phone = e.detail.value;
|
||
checkPhoneDuplicate(phone);
|
||
};
|
||
|
||
// 验证手机号是否已注册
|
||
let checkPhoneTimer = null;
|
||
const checkPhoneDuplicate = async (phone) => {
|
||
// 清空之前的定时器
|
||
if (checkPhoneTimer) {
|
||
clearTimeout(checkPhoneTimer);
|
||
checkPhoneTimer = null;
|
||
}
|
||
|
||
// 手机号格式验证
|
||
const phoneValidation = validatePhone(phone);
|
||
if (!phoneValidation.valid || phone.length !== 11) {
|
||
errorMessage.value = "";
|
||
return;
|
||
}
|
||
|
||
// 防抖:300ms 后再发送请求
|
||
checkPhoneTimer = setTimeout(async () => {
|
||
phoneChecking.value = true;
|
||
try {
|
||
const res = await checkmobileApi(phone);
|
||
if (res.code === 200 && res.data && res.data.exists) {
|
||
errorMessage.value = "该手机号已被注册";
|
||
} else {
|
||
errorMessage.value = "";
|
||
}
|
||
} catch (error) {
|
||
// 接口错误不阻断流程,留到注册时统一处理
|
||
errorMessage.value = "";
|
||
} finally {
|
||
phoneChecking.value = false;
|
||
}
|
||
}, 300);
|
||
};
|
||
|
||
// 发送验证码
|
||
const handleSendCode = async () => {
|
||
const phoneValidation = validatePhone(form.value.phone);
|
||
if (!phoneValidation.valid) {
|
||
errorMessage.value = phoneValidation.message;
|
||
return;
|
||
}
|
||
|
||
try {
|
||
const res = await sendCodeApi(form.value.phone, "register");
|
||
if (res.code === 200) {
|
||
codeStatus.value = "countdown";
|
||
countdown.value = res.expires_in || 60;
|
||
showCodeInput.value = true;
|
||
startCountdown();
|
||
uni.showToast({ title: "验证码已发送", icon: "success" });
|
||
}
|
||
} catch (error) {
|
||
codeError.value = error.message || "发送失败,请重试";
|
||
}
|
||
};
|
||
|
||
// 倒计时
|
||
const startCountdown = () => {
|
||
if (countdownTimer.value) {
|
||
clearInterval(countdownTimer.value);
|
||
}
|
||
countdownTimer.value = setInterval(() => {
|
||
countdown.value--;
|
||
if (countdown.value <= 0) {
|
||
clearInterval(countdownTimer.value);
|
||
codeStatus.value = "resend";
|
||
}
|
||
}, 1000);
|
||
};
|
||
|
||
// 验证验证码
|
||
const handleVerifyCode = async () => {
|
||
if (!form.value.code || form.value.code.length !== 6) {
|
||
codeError.value = "请输入6位验证码";
|
||
return;
|
||
}
|
||
|
||
isVerifying.value = true;
|
||
codeError.value = "";
|
||
try {
|
||
const res = await verifyCodeApi(
|
||
form.value.phone,
|
||
form.value.code,
|
||
"register",
|
||
);
|
||
if (res.code === 200 && res.data && res.data.verified) {
|
||
verifyToken.value = res.data.verify_token;
|
||
codeStatus.value = "verified";
|
||
uni.showToast({ title: "验证成功", icon: "success" });
|
||
}
|
||
} catch (error) {
|
||
codeError.value = error.message || "验证失败";
|
||
} finally {
|
||
isVerifying.value = false;
|
||
}
|
||
};
|
||
|
||
// 跳转到登录页面
|
||
const goToLogin = () => {
|
||
const pages = getCurrentPages();
|
||
if (pages.length > 1) {
|
||
// 有上一页,执行返回
|
||
uni.navigateBack();
|
||
} else {
|
||
// 没有上一页,跳转到square页面
|
||
uni.reLaunch({
|
||
url: "/pages/login/login",
|
||
});
|
||
}
|
||
};
|
||
|
||
// 切换协议勾选状态
|
||
const toggleAgreement = () => {
|
||
agreedToTerms.value = !agreedToTerms.value;
|
||
};
|
||
|
||
// 显示协议全文弹窗
|
||
const showAgreementModal = () => {
|
||
// 直接加载协议内容(已从模块导入)
|
||
if (!agreementContent.value) {
|
||
agreementContent.value = getAgreementContent();
|
||
}
|
||
// 显示自定义协议弹窗
|
||
showAgreementDialog.value = true;
|
||
};
|
||
|
||
// 关闭协议弹窗
|
||
const closeAgreementDialog = () => {
|
||
showAgreementDialog.value = false;
|
||
};
|
||
|
||
// 同意并关闭弹窗
|
||
const agreeAndClose = () => {
|
||
agreedToTerms.value = true;
|
||
showAgreementDialog.value = false;
|
||
};
|
||
|
||
// 打开提示弹窗
|
||
const openTipDialog = () => {
|
||
showTipDialog.value = true;
|
||
};
|
||
|
||
// 关闭提示弹窗
|
||
const closeTipDialog = () => {
|
||
showTipDialog.value = false;
|
||
};
|
||
|
||
// 从提示弹窗打开协议弹窗
|
||
const openAgreementFromTip = () => {
|
||
showTipDialog.value = false;
|
||
// 延迟打开协议弹窗,确保提示弹窗先关闭
|
||
setTimeout(() => {
|
||
showAgreementModal();
|
||
}, 300);
|
||
};
|
||
|
||
// 注册
|
||
const handleRegister = async () => {
|
||
handleVerifyCode();
|
||
// 验证是否勾选协议
|
||
if (!agreedToTerms.value) {
|
||
openTipDialog();
|
||
return;
|
||
}
|
||
|
||
// 检查是否已验证(仅当显示了验证码输入框时)
|
||
if (showCodeInput.value && codeStatus.value !== "verified") {
|
||
errorMessage.value = "请先完成手机号验证";
|
||
return;
|
||
}
|
||
|
||
// 验证表单
|
||
const phoneValidation = validatePhone(form.value.phone);
|
||
if (!phoneValidation.valid) {
|
||
errorMessage.value = phoneValidation.message;
|
||
uni.showToast({
|
||
title: phoneValidation.message,
|
||
icon: "none",
|
||
});
|
||
return;
|
||
}
|
||
|
||
const passwordValidation = validatePassword(form.value.password);
|
||
if (!passwordValidation.valid) {
|
||
errorMessage.value = passwordValidation.message;
|
||
uni.showToast({
|
||
title: passwordValidation.message,
|
||
icon: "none",
|
||
});
|
||
return;
|
||
}
|
||
|
||
errorMessage.value = "";
|
||
|
||
try {
|
||
// 暂存手机号和密码到临时存储,供后续注册流程使用
|
||
uni.setStorageSync("temp_register_mobile", form.value.phone);
|
||
uni.setStorageSync("temp_register_password", form.value.password);
|
||
|
||
// 存储verify_token
|
||
uni.setStorageSync("temp_register_verify_token", verifyToken.value);
|
||
|
||
// 跳转到昵称设置页面
|
||
uni.reLaunch({
|
||
url: "/pages/profile/setNickname",
|
||
});
|
||
} catch (error) {
|
||
errorMessage.value = error.message || "操作失败,请重试";
|
||
uni.showToast({
|
||
title: errorMessage.value,
|
||
icon: "none",
|
||
});
|
||
}
|
||
};
|
||
</script>
|
||
|
||
<style scoped>
|
||
.register-container {
|
||
position: relative;
|
||
width: 100%;
|
||
min-height: 100vh;
|
||
height: 100vh;
|
||
overflow: hidden;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.background-image {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
z-index: 0;
|
||
}
|
||
|
||
.girl-image {
|
||
position: absolute;
|
||
top: 55%;
|
||
left: 50%;
|
||
transform: translateX(-50%) translateY(-50%);
|
||
width: 180%;
|
||
height: 180%;
|
||
z-index: 1;
|
||
object-fit: contain;
|
||
object-position: center center;
|
||
}
|
||
|
||
.doll-image {
|
||
position: absolute;
|
||
bottom: -70%;
|
||
left: 45%;
|
||
transform: translateX(-50%);
|
||
width: 150%;
|
||
height: 150%;
|
||
|
||
z-index: 2;
|
||
object-fit: contain;
|
||
object-position: center bottom;
|
||
}
|
||
|
||
.background-overlay {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
background: rgba(0, 0, 0, 0.3);
|
||
z-index: 3;
|
||
}
|
||
|
||
.content-wrapper {
|
||
position: relative;
|
||
z-index: 10;
|
||
width: 100%;
|
||
flex: 1;
|
||
min-height: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
padding: 0 60rpx 60rpx 60rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.title-wrapper {
|
||
width: 100%;
|
||
padding-top: 120rpx;
|
||
margin-bottom: 80rpx;
|
||
text-align: center;
|
||
position: relative;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.form-container {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
align-items: center;
|
||
width: 100%;
|
||
max-width: 600rpx;
|
||
}
|
||
|
||
.title-text {
|
||
font-size: 135rpx;
|
||
font-weight: 600;
|
||
letter-spacing: 12rpx;
|
||
background: linear-gradient(to right, #b52920 0%, #86d9e0 85%, #56c1ff 110%);
|
||
-webkit-background-clip: text;
|
||
background-clip: text;
|
||
-webkit-text-fill-color: transparent;
|
||
color: #8b0000;
|
||
display: inline-block;
|
||
line-height: 1.2;
|
||
text-transform: uppercase;
|
||
font-family: "TheMiladiatorRegular", sans-serif !important;
|
||
filter: drop-shadow(0 2rpx 4rpx rgba(0, 0, 0, 0.15));
|
||
display: flex;
|
||
justify-content: center;
|
||
}
|
||
|
||
.form-wrapper {
|
||
width: 100%;
|
||
}
|
||
|
||
.input-wrapper {
|
||
position: relative;
|
||
width: 100%;
|
||
height: 100rpx;
|
||
margin-bottom: 40rpx;
|
||
background: rgba(255, 255, 255, 0.9);
|
||
border-radius: 50rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 0 40rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.password-wrapper {
|
||
padding-right: 100rpx;
|
||
}
|
||
|
||
.code-wrapper {
|
||
flex-direction: row;
|
||
align-items: center;
|
||
}
|
||
|
||
.code-wrapper .input-field {
|
||
flex: 1;
|
||
}
|
||
|
||
.send-code-btn {
|
||
padding: 20rpx 30rpx;
|
||
background: #666;
|
||
border-radius: 40rpx;
|
||
color: #fff;
|
||
font-size: 24rpx;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.send-code-btn.countdown {
|
||
background: #999;
|
||
}
|
||
|
||
.send-code-btn.verified {
|
||
background: #4caf50;
|
||
}
|
||
|
||
.verify-btn-wrapper {
|
||
margin-bottom: 30rpx;
|
||
}
|
||
|
||
.btn-secondary {
|
||
width: 100%;
|
||
height: 88rpx;
|
||
background: #fff;
|
||
border: 2rpx solid #b94e73;
|
||
border-radius: 50rpx;
|
||
font-size: 32rpx;
|
||
font-weight: bold;
|
||
color: #b94e73;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.btn-secondary::after {
|
||
border: none;
|
||
}
|
||
|
||
.input-field {
|
||
flex: 1;
|
||
height: 100%;
|
||
font-size: 32rpx;
|
||
color: #333333;
|
||
}
|
||
|
||
.input-placeholder {
|
||
color: #999999;
|
||
}
|
||
|
||
.eye-icon {
|
||
position: absolute;
|
||
right: 40rpx;
|
||
width: 60rpx;
|
||
height: 60rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.eye-text {
|
||
font-size: 40rpx;
|
||
}
|
||
|
||
.error-message {
|
||
width: 100%;
|
||
padding: 20rpx 0;
|
||
margin-bottom: 20rpx;
|
||
text-align: center;
|
||
}
|
||
|
||
.error-message text {
|
||
font-size: 28rpx;
|
||
color: #ff4444;
|
||
}
|
||
|
||
.btn-primary {
|
||
width: 100%;
|
||
height: 100rpx;
|
||
margin-bottom: 30rpx;
|
||
background: linear-gradient(
|
||
165deg,
|
||
#f0e4b1 0%,
|
||
#f08399 50%,
|
||
#b94e73 90%,
|
||
#834b9e 100%
|
||
);
|
||
border-radius: 50rpx;
|
||
border: none;
|
||
font-size: 36rpx;
|
||
font-weight: bold;
|
||
color: #e6e6e6;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.btn-primary::after {
|
||
border: none;
|
||
}
|
||
|
||
.login-link {
|
||
width: 100%;
|
||
margin-top: 40rpx;
|
||
text-align: center;
|
||
}
|
||
|
||
.login-link text {
|
||
font-size: 28rpx;
|
||
color: #e6e6e6;
|
||
text-decoration: underline;
|
||
}
|
||
|
||
.footer-text {
|
||
position: relative;
|
||
width: 100%;
|
||
margin-top: auto;
|
||
padding: 0rpx 0 80rpx 0;
|
||
text-align: center;
|
||
}
|
||
|
||
.agreement-wrapper {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
flex-wrap: wrap;
|
||
padding: 0 40rpx;
|
||
}
|
||
|
||
.agreement-checkbox {
|
||
display: flex;
|
||
align-items: center;
|
||
margin-right: 10rpx;
|
||
}
|
||
|
||
/* 自定义圆形checkbox样式 */
|
||
.agreement-checkbox {
|
||
display: flex;
|
||
align-items: center;
|
||
margin-right: 10rpx;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.custom-checkbox {
|
||
width: 32rpx;
|
||
height: 32rpx;
|
||
border-radius: 50%;
|
||
border: 2rpx solid #e6e6e6;
|
||
background-color: transparent;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: all 0.2s ease;
|
||
flex-shrink: 0;
|
||
position: relative;
|
||
}
|
||
|
||
.custom-checkbox.checked {
|
||
border-color: #e6e6e6;
|
||
background-color: transparent;
|
||
}
|
||
|
||
.checkbox-inner {
|
||
width: 20rpx;
|
||
height: 20rpx;
|
||
border-radius: 50%;
|
||
background-color: #000000;
|
||
}
|
||
|
||
.agreement-label {
|
||
font-size: 24rpx;
|
||
color: #e6e6e6;
|
||
margin-left: 10rpx;
|
||
}
|
||
|
||
.agreement-link {
|
||
font-size: 24rpx;
|
||
color: #e6e6e6;
|
||
text-decoration: underline;
|
||
cursor: pointer;
|
||
}
|
||
|
||
/* 协议弹窗样式 */
|
||
.agreement-dialog-mask {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
background: rgba(0, 0, 0, 0.6);
|
||
z-index: 9999;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 40rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.agreement-dialog {
|
||
width: 100%;
|
||
max-width: 700rpx;
|
||
max-height: 80vh;
|
||
background: #e6e6e6;
|
||
border-radius: 20rpx;
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.agreement-dialog-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 30rpx 40rpx;
|
||
border-bottom: 1rpx solid #e5e5e5;
|
||
position: relative;
|
||
}
|
||
|
||
.agreement-dialog-title {
|
||
font-size: 36rpx;
|
||
font-weight: bold;
|
||
color: #333333;
|
||
flex: 1;
|
||
text-align: center;
|
||
}
|
||
|
||
.agreement-dialog-close {
|
||
font-size: 48rpx;
|
||
color: #999999;
|
||
width: 60rpx;
|
||
height: 60rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
position: absolute;
|
||
right: 20rpx;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
}
|
||
|
||
.agreement-dialog-content {
|
||
flex: 1;
|
||
padding: 40rpx;
|
||
overflow-y: auto;
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
}
|
||
|
||
.agreement-text {
|
||
font-size: 28rpx;
|
||
color: #333333;
|
||
line-height: 1.8;
|
||
white-space: pre-wrap;
|
||
word-wrap: break-word;
|
||
word-break: break-all;
|
||
overflow-wrap: break-word;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
display: block;
|
||
}
|
||
|
||
.agreement-dialog-footer {
|
||
padding: 30rpx 40rpx;
|
||
border-top: 1rpx solid #e5e5e5;
|
||
}
|
||
|
||
.agreement-confirm-btn {
|
||
width: 100%;
|
||
height: 88rpx;
|
||
background: #000000;
|
||
color: #e6e6e6;
|
||
border-radius: 44rpx;
|
||
font-size: 32rpx;
|
||
font-weight: bold;
|
||
border: none;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.agreement-confirm-btn::after {
|
||
border: none;
|
||
}
|
||
|
||
/* 提示弹窗样式 */
|
||
.tip-dialog-mask {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
background: rgba(0, 0, 0, 0.6);
|
||
z-index: 9998;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 40rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.tip-dialog {
|
||
width: 100%;
|
||
max-width: 600rpx;
|
||
background: #e6e6e6;
|
||
border-radius: 20rpx;
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.tip-dialog-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 30rpx 40rpx;
|
||
border-bottom: 1rpx solid #e5e5e5;
|
||
position: relative;
|
||
}
|
||
|
||
.tip-dialog-title {
|
||
font-size: 36rpx;
|
||
font-weight: bold;
|
||
color: #333333;
|
||
flex: 1;
|
||
text-align: center;
|
||
}
|
||
|
||
.tip-dialog-close {
|
||
font-size: 48rpx;
|
||
color: #999999;
|
||
width: 60rpx;
|
||
height: 60rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
position: absolute;
|
||
right: 20rpx;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
}
|
||
|
||
.tip-dialog-content {
|
||
padding: 40rpx;
|
||
text-align: center;
|
||
}
|
||
|
||
.tip-text {
|
||
font-size: 32rpx;
|
||
color: #333333;
|
||
line-height: 1.6;
|
||
display: block;
|
||
margin-bottom: 20rpx;
|
||
}
|
||
|
||
.tip-agreement-link {
|
||
font-size: 32rpx;
|
||
color: #007aff;
|
||
text-decoration: underline;
|
||
cursor: pointer;
|
||
display: block;
|
||
}
|
||
</style>
|