You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

975 lines
21 KiB

  1. <template>
  2. <view class="login-registration-container">
  3. <!-- 自定义导航栏 -->
  4. <view
  5. class="custom-navbar"
  6. :style="{ paddingTop: safeAreaInsets?.top + 'px' }"
  7. >
  8. <view class="nav-left">
  9. <image
  10. class="icons"
  11. @click="goToBack"
  12. src="../../../static/icons/back.png"
  13. alt="返回首页"
  14. />
  15. </view>
  16. <view class="nav-right">
  17. <image
  18. class="icons"
  19. src="../../../static/icons/Headset.png"
  20. alt="联系客服"
  21. />
  22. </view>
  23. </view>
  24. <!-- Logo -->
  25. <!-- <image class="logo" src="/static/logo.png" mode="aspectFit"></image> -->
  26. <!-- 欢迎语 -->
  27. <text class="welcome-text">找回密码</text>
  28. <!-- 邮箱/手机号切换 -->
  29. <view v-if="!isRecovering" class="switch-container">
  30. <text
  31. class="switch-item"
  32. :class="{ active: switchType === 'Email' }"
  33. @click="switchEmail"
  34. >邮箱</text
  35. >
  36. <text
  37. class="switch-item"
  38. :class="{ active: switchType === 'Phone' }"
  39. @click="switchPhone"
  40. >手机号</text
  41. >
  42. </view>
  43. <view v-else class="switch-container-occupy"> </view>
  44. <!-- 输入框 -->
  45. <view v-if="isRecovering" class="input-container">
  46. <view >
  47. <!-- 修改邮箱输入框容器将图标包含在内 -->
  48. <view class="input-with-icon">
  49. <image
  50. class="input-icon"
  51. src="../../../static/icons/Unlock.png"
  52. alt=""
  53. />
  54. <input
  55. class="input-field"
  56. :type="newPasswordLookFirst ? 'text' : 'password'"
  57. placeholder="输入新密码"
  58. v-model="newPasswordFirst"
  59. />
  60. <image
  61. class="input-icon-eye"
  62. @click="newPasswordLookFirst = !newPasswordLookFirst"
  63. :src="
  64. !newPasswordLookFirst
  65. ? '../../../static/icons/unlook.png'
  66. : '../../../static/icons/look.png'
  67. "
  68. alt=""
  69. />
  70. </view>
  71. <view class="input-with-icon">
  72. <image
  73. class="input-icon"
  74. src="../../../static/icons/Unlock.png"
  75. alt=""
  76. />
  77. <input
  78. class="input-field"
  79. :type="newPasswordLookSecond ? 'text' : 'password'"
  80. placeholder="再次确认"
  81. v-model="newPasswordSecond"
  82. />
  83. <image
  84. class="input-icon-eye"
  85. @click="newPasswordLookSecond = !newPasswordLookSecond"
  86. :src="
  87. !newPasswordLookSecond
  88. ? '../../../static/icons/unlook.png'
  89. : '../../../static/icons/look.png'
  90. "
  91. alt=""
  92. />
  93. </view>
  94. </view>
  95. </view>
  96. <view v-else class="input-container">
  97. <view v-if="switchType === 'Email'">
  98. <!-- 修改邮箱输入框容器将图标包含在内 -->
  99. <view class="input-with-icon">
  100. <image
  101. class="input-icon"
  102. src="../../../static/icons/Mail.png"
  103. alt=""
  104. />
  105. <input
  106. class="input-field"
  107. type="text"
  108. placeholder="请输入邮箱"
  109. v-model="email"
  110. />
  111. <view>
  112. <button
  113. class="send-code-btn-email"
  114. :disabled="isCodeBtnDisabled"
  115. :class="{ 'send-code-btn-disabled': isCodeBtnDisabled }"
  116. @click="sendCode"
  117. >
  118. <text
  119. class="send-code-text"
  120. :class="{ 'send-code-btn-disabled-text': isCodeBtnDisabled }"
  121. >{{ codeBtnText }}</text
  122. >
  123. </button>
  124. </view>
  125. </view>
  126. <view class="input-with-icon">
  127. <image
  128. class="input-icon"
  129. src="../../../static/icons/Text-recognition.png"
  130. alt=""
  131. />
  132. <input
  133. class="input-field"
  134. type="text"
  135. placeholder="请输入验证码"
  136. v-model="verifyCode"
  137. />
  138. </view>
  139. </view>
  140. <view v-if="switchType === 'Phone'" class="phone-input-container">
  141. <view class="country-code-selector" @click="showCountryPicker">
  142. <image
  143. class="country-flag-img"
  144. src="../../../static/icons/Iphone.png"
  145. mode="aspectFit"
  146. ></image>
  147. <text class="country-code">{{ selectedCountry.code }}</text>
  148. <!-- <text class="arrow-down"></text> -->
  149. </view>
  150. <input
  151. class="input-field phone-input"
  152. type="number"
  153. placeholder="输入手机号"
  154. v-model="phone"
  155. @input="onPhoneInput"
  156. />
  157. <view>
  158. <button
  159. class="send-code-btn"
  160. :disabled="isCodeBtnDisabled"
  161. :class="{ 'send-code-btn-disabled': isCodeBtnDisabled }"
  162. @click="sendCode"
  163. >
  164. <text
  165. class="send-code-text"
  166. :class="{ 'send-code-btn-disabled-text': isCodeBtnDisabled }"
  167. >{{ codeBtnText }}</text
  168. >
  169. </button>
  170. </view>
  171. </view>
  172. <view v-if="switchType === 'Phone'" class="input-with-icon">
  173. <image
  174. class="input-icon"
  175. src="../../../static/icons/Text-recognition.png"
  176. alt=""
  177. />
  178. <input
  179. class="input-field"
  180. type="text"
  181. placeholder="请输入验证码"
  182. v-model="verifyCode"
  183. />
  184. </view>
  185. </view>
  186. <!-- 用户协议 -->
  187. <view @click="changeCheckbox" class="agreement-container-one">
  188. <text
  189. class="agreement-text-one"
  190. :style="!isRecovering ? 'visibility: hidden' : 'visibility: visible'"
  191. >
  192. 密码最少8位数
  193. </text>
  194. </view>
  195. <!-- 注册按钮 -->
  196. <button class="register-btn" @click="register">
  197. {{ isRecovering ? "确认" : "下一步" }}
  198. </button>
  199. <!-- 或者 -->
  200. <text class="or-text-one" @click="goToRegistration"
  201. >如果您还没有账号点击注册
  202. <image class="to-icon" src="../../../static/icons/To.png"></image>
  203. </text>
  204. <!-- 或者 -->
  205. <text class="or-text" @click="goToLogin">已有账号登录 </text>
  206. <!-- 同意弹窗 -->
  207. <uniPopup ref="agreementPopup" type="dialog">
  208. <view class="popup-content">
  209. <text class="popup-title">同意并继续</text>
  210. <text class="popup-message">请阅读并同意服务协议和隐私权限</text>
  211. <button class="agree-button" @click="handleAgree">
  212. <text class="agree-text">同意</text>
  213. </button>
  214. </view>
  215. </uniPopup>
  216. <footerBar class="static-footer" :type="type"></footerBar>
  217. </view>
  218. </template>
  219. <script setup>
  220. import { ref } from "vue";
  221. // 导入完整的国家列表
  222. import countryList from "../login/list";
  223. import footerBar from "../../../components/footerBar-cn.vue";
  224. import uniPopup from "../../../uni_modules/uni-popup/components/uni-popup/uni-popup.vue";
  225. import { verificationPhone, verificationEmail } from "../login/verification";
  226. const type = ref("member");
  227. const email = ref("");
  228. const password = ref("");
  229. const newPasswordFirst = ref("");
  230. const newPasswordSecond = ref("");
  231. const phone = ref("");
  232. const country = ref("+86");
  233. const agreed = ref(false);
  234. const switchType = ref("Phone"); // 默认是邮箱注册
  235. const { safeAreaInsets } = uni.getSystemInfoSync();
  236. const codeBtnText = ref("获取验证码");
  237. const isCodeBtnDisabled = ref(false); // 添加验证码按钮禁用状态
  238. const checkboxUrl = ref("../../../static/icons/Check-one-false.png");
  239. const verifyCode = ref("");
  240. const isRecovering = ref(false);
  241. const newPasswordLookFirst = ref(false);
  242. const newPasswordLookSecond = ref(false);
  243. // 使用从list.js导入的完整国家列表数据
  244. const countries = ref(
  245. countryList.list.map((item) => ({
  246. name: item.name,
  247. code: `+${item.tel}`,
  248. flag: item.flag,
  249. short: item.short,
  250. en: item.en,
  251. }))
  252. );
  253. // 默认选中的国家(中国)
  254. const selectedCountry = ref(
  255. countries.value.find((country) => country.short === "CN") ||
  256. countries.value[0]
  257. );
  258. // 显示国家选择器
  259. function showCountryPicker() {
  260. uni.showActionSheet({
  261. itemList: countries.value.map(
  262. (country) => `${country.name} ${country.code}`
  263. ),
  264. success: function (res) {
  265. selectedCountry.value = countries.value[res.tapIndex];
  266. },
  267. });
  268. }
  269. function goToBack() {
  270. // 返回上一页
  271. uni.navigateBack(-1);
  272. }
  273. function switchEmail() {
  274. // 切换到邮箱注册
  275. switchType.value = "Email";
  276. verifyCode.value = "";
  277. }
  278. function switchPhone() {
  279. // 切换到手机注册
  280. switchType.value = "Phone";
  281. verifyCode.value = "";
  282. }
  283. function register() {
  284. if (isRecovering.value) {
  285. if (!newPasswordFirst.value || !newPasswordSecond.value) {
  286. uni.showToast({
  287. title: "密码不能为空",
  288. icon: "none",
  289. });
  290. return;
  291. }
  292. if (newPasswordFirst.value !== newPasswordSecond.value) {
  293. uni.showToast({
  294. title: "前后密码不一致",
  295. icon: "none",
  296. });
  297. return;
  298. }
  299. // 密码逻辑
  300. return;
  301. }
  302. if (switchType.value === "Phone") {
  303. // 登录逻辑
  304. if (!phone.value) {
  305. uni.showToast({
  306. title: "请输入手机号码",
  307. icon: "none",
  308. });
  309. return;
  310. }
  311. console.log("123");
  312. const phoneAll = `${country.value}${phone.value}`;
  313. console.log("完整手机号" + phoneAll);
  314. if (!validatePhoneNumber(country.value, phone.value)) {
  315. return;
  316. }
  317. if (!verifyCode.value) {
  318. uni.showToast({
  319. title: "请输入验证码",
  320. icon: "none",
  321. });
  322. return;
  323. }
  324. }
  325. if (switchType.value === "Email") {
  326. // 登录逻辑
  327. if (!email.value) {
  328. uni.showToast({
  329. title: "请输入邮箱地址",
  330. icon: "none",
  331. });
  332. return;
  333. }
  334. const bool = verificationEmail(email.value);
  335. console.log("验证是否成功", bool);
  336. // 检查格式是否正确
  337. if (!bool) {
  338. uni.showToast({
  339. title: "邮箱格式不正确",
  340. icon: "none",
  341. });
  342. return;
  343. }
  344. if (!verifyCode.value) {
  345. uni.showToast({
  346. title: "请输入验证码",
  347. icon: "none",
  348. });
  349. return;
  350. }
  351. // 发送登录请求
  352. console.log("登录:", email.value);
  353. }
  354. isRecovering.value = !isRecovering.value;
  355. // 如果已经同意,则继续登录流程
  356. // uni.showToast({
  357. // title: "登录成功",
  358. // icon: "success",
  359. // });
  360. }
  361. function goToLogin() {
  362. // 跳转到登录页
  363. uni.navigateTo({
  364. url: "/pages/start/login/login",
  365. });
  366. }
  367. function onPhoneInput(e) {
  368. // 确保只允许输入数字
  369. const value = e.detail.value;
  370. // 使用 isNaN 检查是否为有效数字
  371. if (isNaN(value)) {
  372. phone.value = "";
  373. } else {
  374. phone.value = value;
  375. }
  376. }
  377. // 注册码码验证
  378. function VerCodeVerfifcation() {
  379. if (switchType.value === "Phone") {
  380. if (!phone.value) {
  381. uni.showToast({
  382. title: "请输入手机号",
  383. icon: "none",
  384. });
  385. return false;
  386. }
  387. const bool = verificationPhone(country.value, phone.value);
  388. console.log("验证是否成功", bool);
  389. // 检查格式是否正确
  390. if (!bool) {
  391. uni.showToast({
  392. title: "手机号格式不正确",
  393. icon: "none",
  394. });
  395. return false;
  396. }
  397. }
  398. if (switchType.value === "Email") {
  399. if (!email.value) {
  400. uni.showToast({
  401. title: "请输入邮箱地址",
  402. icon: "none",
  403. });
  404. return false;
  405. }
  406. const bool = verificationEmail(email.value);
  407. console.log("验证是否成功", bool);
  408. // 检查格式是否正确
  409. if (!bool) {
  410. uni.showToast({
  411. title: "邮箱格式不正确",
  412. icon: "none",
  413. });
  414. return false;
  415. }
  416. }
  417. return true;
  418. }
  419. // 发送验证码
  420. function sendCode() {
  421. if (!VerCodeVerfifcation()) {
  422. return;
  423. }
  424. // 如果按钮已禁用,则不执行后续逻辑
  425. if (isCodeBtnDisabled.value) return;
  426. // 设置按钮为禁用状态
  427. isCodeBtnDisabled.value = true;
  428. codeBtnText.value = "重新发送";
  429. let time = 6;
  430. const timer = setInterval(() => {
  431. time--;
  432. codeBtnText.value = "重新发送 " + time + "s";
  433. if (time <= 0) {
  434. clearInterval(timer);
  435. codeBtnText.value = "重新发送";
  436. // 倒计时结束后启用按钮
  437. isCodeBtnDisabled.value = false;
  438. }
  439. }, 1000);
  440. return;
  441. }
  442. function openAgreement() {
  443. // 打开用户协议
  444. console.log("打开用户协议");
  445. uni.navigateTo({
  446. url: "/pages/start/agreement/agreement",
  447. });
  448. }
  449. function openPrivacy() {
  450. // 打开隐私政策
  451. console.log("打开隐私政策");
  452. uni.navigateTo({
  453. url: "/pages/start/privacy/privacy",
  454. });
  455. }
  456. function changeCheckbox() {
  457. agreed.value = !agreed.value;
  458. checkboxUrl.value = agreed.value
  459. ? "../../../static/icons/Check-one-true.png"
  460. : "../../../static/icons/Check-one-false.png";
  461. }
  462. // 验证手机号是否正确
  463. function validatePhoneNumber(countryCode, phoneNumber) {
  464. // 检查是否为空
  465. if (!phoneNumber || phoneNumber.trim() === "") {
  466. uni.showToast({
  467. title: "手机号不能为空",
  468. icon: "none",
  469. });
  470. return false;
  471. }
  472. const bool = verificationPhone(countryCode, phoneNumber);
  473. console.log("验证是否成功", bool);
  474. // 检查格式是否正确
  475. if (!bool) {
  476. uni.showToast({
  477. title: "手机号格式不正确",
  478. icon: "none",
  479. });
  480. return false;
  481. }
  482. // 去掉+号后检查长度(手机号通常在7到15位之间)
  483. const cleanNumber = phoneNumber.replace(/^\+/, "");
  484. if (cleanNumber.length < 7 || cleanNumber.length > 15) {
  485. uni.showToast({
  486. title: "手机号长度不正确",
  487. icon: "none",
  488. });
  489. return false;
  490. }
  491. return true;
  492. }
  493. // 添加弹窗引用
  494. const agreementPopup = ref(null);
  495. // 处理同意按钮点击
  496. function handleAgree() {
  497. // 关闭弹窗
  498. agreementPopup.value.close();
  499. // 设置为已同意
  500. agreed.value = true;
  501. checkboxUrl.value = "../../../static/icons/Check-one-true.png";
  502. // 继续登录流程
  503. }
  504. </script>
  505. <style scoped>
  506. .login-registration-container {
  507. display: flex;
  508. flex-direction: column;
  509. align-items: center;
  510. justify-content: center;
  511. padding: 0 70rpx;
  512. height: 100vh;
  513. background-color: #ffffff;
  514. }
  515. /* 自定义导航栏样式 */
  516. .custom-navbar {
  517. position: absolute;
  518. top: 0;
  519. left: 0;
  520. /* z-index: 999; */
  521. width: 90%;
  522. height: 80rpx;
  523. display: flex;
  524. justify-content: space-between;
  525. align-items: center;
  526. padding: 10rpx 40rpx;
  527. margin-bottom: 20rpx;
  528. }
  529. .nav-left,
  530. .nav-right {
  531. flex: 1;
  532. }
  533. .nav-right {
  534. display: flex;
  535. justify-content: flex-end;
  536. }
  537. .nav-left {
  538. display: flex;
  539. justify-content: flex-start;
  540. }
  541. .icons {
  542. margin: 20rpx;
  543. width: 40rpx;
  544. height: 40rpx;
  545. /* margin-right: 10rpx; */
  546. }
  547. .back-btn,
  548. .headphone-btn {
  549. font-size: 36rpx;
  550. font-weight: bold;
  551. color: #333333;
  552. padding: 10rpx;
  553. }
  554. .logo {
  555. width: 120rpx;
  556. height: 120rpx;
  557. margin-bottom: 60rpx;
  558. border-radius: 20%;
  559. }
  560. .welcome-text {
  561. font-size: 48rpx;
  562. font-weight: bold;
  563. color: #333333;
  564. margin-bottom: 60rpx;
  565. /* text-align: left; */
  566. /* align-self: flex-start; */
  567. }
  568. .switch-container {
  569. display: flex;
  570. margin-bottom: 40rpx;
  571. align-self: flex-start;
  572. }
  573. .switch-item {
  574. font-size: 28rpx;
  575. color: #999999;
  576. padding: 10rpx 20rpx;
  577. position: relative;
  578. }
  579. .switch-item::after {
  580. content: "";
  581. position: absolute;
  582. bottom: 0;
  583. left: 50%;
  584. transform: translateX(-50%);
  585. width: 60%;
  586. /* 控制边框宽度 */
  587. height: 2rpx;
  588. background-color: transparent;
  589. }
  590. .switch-item.active {
  591. color: #333333;
  592. font-weight: 700;
  593. }
  594. .switch-item.active::after {
  595. content: "";
  596. position: absolute;
  597. top: 60rpx;
  598. bottom: 0;
  599. left: 50%;
  600. transform: translateX(-50%);
  601. width: 30%;
  602. /* 控制边框宽度 */
  603. height: 7rpx;
  604. background-color: #333333;
  605. }
  606. .input-container {
  607. width: 100%;
  608. }
  609. /* 添加图标输入框样式 */
  610. .input-with-icon {
  611. display: flex;
  612. align-items: center;
  613. width: 100%;
  614. height: 80rpx;
  615. border-bottom: 2rpx solid #e5e5e5;
  616. margin-bottom: 20rpx;
  617. }
  618. .input-icon {
  619. width: 40rpx;
  620. height: 40rpx;
  621. margin: 0 20rpx;
  622. }
  623. .input-icon-eye {
  624. width: 40rpx;
  625. height: 20rpx;
  626. margin: 0 20rpx;
  627. }
  628. .input-field {
  629. flex: 1;
  630. height: 80rpx;
  631. padding: 15rpx 0;
  632. font-size: 28rpx;
  633. color: #333333;
  634. border: none;
  635. background-color: transparent;
  636. }
  637. .phone-input-container {
  638. display: flex;
  639. align-items: center;
  640. width: 95.8%;
  641. height: 80rpx;
  642. /* border-radius: 20rpx; */
  643. /* border: 2rpx solid #e5e5e5; */
  644. /* background-color: #f5f5f5; */
  645. padding: 0 10rpx;
  646. border-bottom: 2rpx solid #e5e5e5;
  647. margin-bottom: 20rpx;
  648. }
  649. .country-code-selector {
  650. display: flex;
  651. align-items: center;
  652. padding: 0 10rpx;
  653. padding-bottom: 1rpx;
  654. height: 100%;
  655. /* border-right: 2rpx solid #e5e5e5; */
  656. /* background-color: #f5f5f5; */
  657. border-radius: 20rpx 0 0 20rpx;
  658. }
  659. .country-code {
  660. font-size: 28rpx;
  661. color: #333333;
  662. margin-right: 10rpx;
  663. }
  664. .country-flag-img {
  665. width: 40rpx;
  666. height: 40rpx;
  667. margin-right: 10rpx;
  668. }
  669. .arrow-down {
  670. font-size: 20rpx;
  671. color: #999999;
  672. }
  673. .phone-input {
  674. flex: 1;
  675. width: auto;
  676. height: 100%;
  677. border: none;
  678. background-color: transparent;
  679. padding: 0 0rpx;
  680. }
  681. .send-code-btn {
  682. width: 200rpx;
  683. height: 60rpx;
  684. display: inline-flex;
  685. padding: 0rpx 10rpx;
  686. justify-content: center;
  687. align-items: center;
  688. gap: 10px;
  689. border-radius: 4px;
  690. background: #000;
  691. }
  692. .send-code-btn-email {
  693. width: 200rpx;
  694. height: 60rpx;
  695. display: inline-flex;
  696. padding: 0rpx 10rpx;
  697. justify-content: center;
  698. align-items: center;
  699. gap: 10px;
  700. border-radius: 4px;
  701. background: #000;
  702. margin-right: 15rpx;
  703. }
  704. .send-code-btn-disabled {
  705. background: #e6e6e6;
  706. /* 禁用状态下的灰色背景 */
  707. }
  708. .send-code-btn-disabled-text {
  709. color: #999999 !important;
  710. }
  711. .send-code-text {
  712. color: #fff;
  713. font-size: 28rpx;
  714. }
  715. .agreement-container-one {
  716. display: flex;
  717. align-items: center;
  718. align-self: flex-start;
  719. margin-bottom: 80rpx;
  720. }
  721. .agreement-container {
  722. display: flex;
  723. align-items: center;
  724. margin-bottom: 40rpx;
  725. margin-top: -75.5rpx;
  726. align-self: flex-start;
  727. }
  728. .checkbox {
  729. width: 30rpx;
  730. height: 30rpx;
  731. margin-left: 20rpx;
  732. /* flex: content; */
  733. }
  734. .agreement-text-one {
  735. font-size: 22rpx;
  736. color: #666666;
  737. text-align: center;
  738. margin-left: 10rpx;
  739. }
  740. .agreement-text {
  741. margin-left: 20rpx;
  742. font-size: 24rpx;
  743. color: #666666;
  744. }
  745. .link {
  746. color: #333333;
  747. font-weight: bold;
  748. text-decoration: underline;
  749. }
  750. .register-btn {
  751. width: 100%;
  752. height: 80rpx;
  753. background-color: #000000;
  754. color: white;
  755. font-size: 32rpx;
  756. font-weight: bold;
  757. border-radius: 40rpx;
  758. margin-bottom: 40rpx;
  759. }
  760. .or-text {
  761. flex-direction: column;
  762. font-size: 24rpx;
  763. color: #999999;
  764. margin-top: 294rpx;
  765. margin-bottom: -22rpx;
  766. }
  767. .to-icon {
  768. width: 10rpx;
  769. height: 16rpx;
  770. }
  771. .or-text-one {
  772. flex-direction: column;
  773. font-size: 24rpx;
  774. color: #999999;
  775. }
  776. .third-party-login {
  777. width: 100%;
  778. margin-bottom: 60rpx;
  779. }
  780. .third-party-text {
  781. color: #ffffff;
  782. font-weight: bold;
  783. white-space: pre;
  784. }
  785. .third-party-btn {
  786. width: 100%;
  787. height: 80rpx;
  788. background-color: rgb(0, 0, 0);
  789. border: 2rpx solid #e5e5e5;
  790. border-radius: 40rpx;
  791. display: flex;
  792. align-items: center;
  793. justify-content: center;
  794. margin-bottom: 20rpx;
  795. font-size: 28rpx;
  796. color: #333333;
  797. }
  798. .google-icon,
  799. .apple-icon {
  800. width: 60rpx;
  801. height: 60rpx;
  802. margin-right: 20rpx;
  803. }
  804. .existing-account {
  805. display: flex;
  806. align-items: center;
  807. }
  808. .account-text {
  809. font-size: 24rpx;
  810. color: #666666;
  811. }
  812. .login-link {
  813. font-size: 24rpx;
  814. font-weight: bold;
  815. color: #333333;
  816. margin-left: 10rpx;
  817. text-decoration: underline;
  818. }
  819. .static-footer {
  820. position: fixed;
  821. bottom: 0;
  822. }
  823. /* 弹窗样式 */
  824. .popup-content {
  825. background-color: #ffffff;
  826. padding: 40rpx;
  827. text-align: center;
  828. border-radius: 10rpx;
  829. width: 550rpx;
  830. }
  831. .popup-title {
  832. font-size: 36rpx;
  833. font-weight: bold;
  834. color: #333;
  835. margin-bottom: 80rpx;
  836. text-align: center; /* 水平居中 */
  837. display: flex; /* 使用flex布局 */
  838. justify-content: center; /* 水平居中 */
  839. align-items: center; /* 垂直居中 */
  840. }
  841. .popup-message {
  842. font-size: 28rpx;
  843. color: #000000;
  844. margin-bottom: 80rpx;
  845. text-align: center; /* 水平居中 */
  846. display: flex; /* 使用flex布局 */
  847. justify-content: center; /* 水平居中 */
  848. align-items: center; /* 垂直居中 */
  849. }
  850. .agree-button {
  851. width: 300rpx;
  852. height: 80rpx;
  853. background-color: #000000;
  854. border-radius: 40rpx;
  855. display: flex; /* 添加flex布局 */
  856. align-items: center; /* 垂直居中 */
  857. justify-content: center; /* 水平居中 */
  858. }
  859. .agree-text {
  860. color: #ffffff;
  861. font-size: 34rpx;
  862. /* 添加垂直居中相关样式 */
  863. display: flex;
  864. align-items: center;
  865. justify-content: center;
  866. line-height: 1; /* 确保文字垂直居中 */
  867. }
  868. .switch-container-occupy {
  869. margin-top: 100rpx;
  870. }
  871. </style>