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.

1092 lines
23 KiB

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