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.

1090 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.navigateBack(-1);
  287. }
  288. function switchEmail() {
  289. // 切换到邮箱注册
  290. switchType.value = "Email";
  291. verifyCode.value = "";
  292. }
  293. function switchPhone() {
  294. // 切换到手机注册
  295. switchType.value = "Phone";
  296. verifyCode.value = "";
  297. }
  298. async function register() {
  299. if (isRecovering.value) {
  300. if (!newPasswordFirst.value || !newPasswordSecond.value) {
  301. uni.showToast({
  302. title: "密码不能为空",
  303. icon: "none",
  304. });
  305. return;
  306. }
  307. if (newPasswordFirst.value !== newPasswordSecond.value) {
  308. uni.showToast({
  309. title: "前后密码不一致",
  310. icon: "none",
  311. });
  312. return;
  313. }
  314. const account = changeAccount();
  315. const res = await forgetApi({
  316. account: account,
  317. password: newPasswordSecond.value,
  318. });
  319. console.log("res", res);
  320. if (res.code !== 200) {
  321. uni.showToast({
  322. title: res.message,
  323. icon: "none",
  324. });
  325. return;
  326. }
  327. uni.showToast({
  328. title: res.message,
  329. icon: "none",
  330. });
  331. uni.navigateTo({
  332. url: "/pages/start/login/login",
  333. });
  334. // 密码逻辑
  335. return;
  336. }
  337. if (switchType.value === "Phone") {
  338. // 登录逻辑
  339. if (!phone.value) {
  340. uni.showToast({
  341. title: "请输入手机号码",
  342. icon: "none",
  343. });
  344. return;
  345. }
  346. console.log("123");
  347. const phoneAll = `${country.value}${phone.value}`;
  348. console.log("完整手机号" + phoneAll);
  349. if (!validatePhoneNumber(country.value, phone.value)) {
  350. return;
  351. }
  352. if (!verifyCode.value) {
  353. uni.showToast({
  354. title: "请输入验证码",
  355. icon: "none",
  356. });
  357. return;
  358. }
  359. }
  360. if (switchType.value === "Email") {
  361. // 登录逻辑
  362. if (!email.value) {
  363. uni.showToast({
  364. title: "请输入邮箱地址",
  365. icon: "none",
  366. });
  367. return;
  368. }
  369. const bool = verificationEmail(email.value);
  370. console.log("验证是否成功", bool);
  371. // 检查格式是否正确
  372. if (!bool) {
  373. uni.showToast({
  374. title: "邮箱格式不正确",
  375. icon: "none",
  376. });
  377. return;
  378. }
  379. if (!verifyCode.value) {
  380. uni.showToast({
  381. title: "请输入验证码",
  382. icon: "none",
  383. });
  384. return;
  385. }
  386. // 发送登录请求
  387. console.log("登录:", email.value);
  388. }
  389. const account = changeAccount();
  390. const loginType = changeLoginType();
  391. const res = await verifyCodeApi({
  392. loginType: loginType, //登录方式EMAIL,PHONE
  393. account: account, //登陆账号 手机号/邮箱
  394. verifyCode: verifyCode.value,
  395. });
  396. if (res.code !== 200) {
  397. uni.showToast({
  398. title: res.message,
  399. icon: "none",
  400. });
  401. return;
  402. }
  403. isRecovering.value = !isRecovering.value;
  404. }
  405. // 请求账户
  406. function changeAccount() {
  407. if (switchType.value === "User") {
  408. account.value = deepChartID.value;
  409. }
  410. if (switchType.value === "Phone") {
  411. account.value = `${country.value}${phone.value}`;
  412. }
  413. if (switchType.value === "Email") {
  414. account.value = email.value;
  415. }
  416. return account.value;
  417. }
  418. // 改变请求时的type
  419. function changeLoginType() {
  420. if (switchType.value === "User") {
  421. return "DCCODE";
  422. }
  423. if (switchType.value === "Phone") {
  424. return "PHONE";
  425. }
  426. if (switchType.value === "Email") {
  427. return "EMAIL";
  428. }
  429. }
  430. function goToLogin() {
  431. // 跳转到登录页
  432. uni.navigateTo({
  433. url: "/pages/start/login/login",
  434. });
  435. }
  436. function goToRegistration() {
  437. // 跳转到登录页
  438. uni.navigateTo({
  439. url: "/pages/start/Registration/Registration",
  440. });
  441. }
  442. function onPhoneInput(e) {
  443. // 确保只允许输入数字
  444. const value = e.detail.value;
  445. // 使用 isNaN 检查是否为有效数字
  446. if (isNaN(value)) {
  447. phone.value = "";
  448. } else {
  449. phone.value = value;
  450. }
  451. }
  452. // 注册码码验证
  453. function VerCodeVerfifcation() {
  454. if (switchType.value === "Phone") {
  455. if (!phone.value) {
  456. uni.showToast({
  457. title: "请输入手机号",
  458. icon: "none",
  459. });
  460. return false;
  461. }
  462. const bool = verificationPhone(country.value, phone.value);
  463. console.log("验证是否成功", bool);
  464. // 检查格式是否正确
  465. if (!bool) {
  466. uni.showToast({
  467. title: "手机号格式不正确",
  468. icon: "none",
  469. });
  470. return false;
  471. }
  472. }
  473. if (switchType.value === "Email") {
  474. if (!email.value) {
  475. uni.showToast({
  476. title: "请输入邮箱地址",
  477. icon: "none",
  478. });
  479. return false;
  480. }
  481. const bool = verificationEmail(email.value);
  482. console.log("验证是否成功", bool);
  483. // 检查格式是否正确
  484. if (!bool) {
  485. uni.showToast({
  486. title: "邮箱格式不正确",
  487. icon: "none",
  488. });
  489. return false;
  490. }
  491. }
  492. return true;
  493. }
  494. // 发送验证码
  495. function sendCode() {
  496. if (!VerCodeVerfifcation()) {
  497. return;
  498. }
  499. // 如果按钮已禁用,则不执行后续逻辑
  500. if (isCodeBtnDisabled.value) return;
  501. console.log("发送验证码");
  502. // 发送验证码
  503. if (switchType.value === "Email") {
  504. const res = SendEmailCodeApi({
  505. email: email.value,
  506. });
  507. if (!res) {
  508. uni.showToast({
  509. title: "发送失败",
  510. icon: "none",
  511. });
  512. }
  513. }
  514. if (switchType.value === "Phone") {
  515. const phoneAll = `${country.value}${phone.value}`;
  516. const res = SendPhoneCodeApi({
  517. phone: phoneAll,
  518. });
  519. if (!res) {
  520. uni.showToast({
  521. title: "发送失败",
  522. icon: "none",
  523. });
  524. }
  525. }
  526. // 设置按钮为禁用状态
  527. isCodeBtnDisabled.value = true;
  528. codeBtnText.value = "重新发送";
  529. let time = 6;
  530. const timer = setInterval(() => {
  531. time--;
  532. codeBtnText.value = "重新发送 " + time + "s";
  533. if (time <= 0) {
  534. clearInterval(timer);
  535. codeBtnText.value = "重新发送";
  536. // 倒计时结束后启用按钮
  537. isCodeBtnDisabled.value = false;
  538. }
  539. }, 1000);
  540. return;
  541. }
  542. function openAgreement() {
  543. // 打开用户协议
  544. console.log("打开用户协议");
  545. uni.navigateTo({
  546. url: "/pages/start/agreement/agreement",
  547. });
  548. }
  549. function openPrivacy() {
  550. // 打开隐私政策
  551. console.log("打开隐私政策");
  552. uni.navigateTo({
  553. url: "/pages/start/privacy/privacy",
  554. });
  555. }
  556. function changeCheckbox() {
  557. agreed.value = !agreed.value;
  558. checkboxUrl.value = agreed.value
  559. ? "../../../static/icons/Check-one-true.png"
  560. : "../../../static/icons/Check-one-false.png";
  561. }
  562. // 验证手机号是否正确
  563. function validatePhoneNumber(countryCode, phoneNumber) {
  564. // 检查是否为空
  565. if (!phoneNumber || phoneNumber.trim() === "") {
  566. uni.showToast({
  567. title: "手机号不能为空",
  568. icon: "none",
  569. });
  570. return false;
  571. }
  572. const bool = verificationPhone(countryCode, phoneNumber);
  573. console.log("验证是否成功", bool);
  574. // 检查格式是否正确
  575. if (!bool) {
  576. uni.showToast({
  577. title: "手机号格式不正确",
  578. icon: "none",
  579. });
  580. return false;
  581. }
  582. // 去掉+号后检查长度(手机号通常在7到15位之间)
  583. const cleanNumber = phoneNumber.replace(/^\+/, "");
  584. if (cleanNumber.length < 7 || cleanNumber.length > 15) {
  585. uni.showToast({
  586. title: "手机号长度不正确",
  587. icon: "none",
  588. });
  589. return false;
  590. }
  591. return true;
  592. }
  593. // 添加弹窗引用
  594. const agreementPopup = ref(null);
  595. // 处理同意按钮点击
  596. function handleAgree() {
  597. // 关闭弹窗
  598. agreementPopup.value.close();
  599. // 设置为已同意
  600. agreed.value = true;
  601. checkboxUrl.value = "../../../static/icons/Check-one-true.png";
  602. // 继续登录流程
  603. }
  604. </script>
  605. <style scoped>
  606. .login-registration-container {
  607. display: flex;
  608. flex-direction: column;
  609. align-items: center;
  610. justify-content: center;
  611. padding: 0 70rpx;
  612. height: 100vh;
  613. background-color: #ffffff;
  614. }
  615. /* 自定义导航栏样式 */
  616. .custom-navbar {
  617. position: absolute;
  618. top: 0;
  619. left: 0;
  620. /* z-index: 999; */
  621. width: 90%;
  622. height: 80rpx;
  623. display: flex;
  624. justify-content: space-between;
  625. align-items: center;
  626. padding: 10rpx 40rpx;
  627. margin-bottom: 20rpx;
  628. }
  629. .nav-left,
  630. .nav-right {
  631. flex: 1;
  632. }
  633. .nav-right {
  634. display: flex;
  635. justify-content: flex-end;
  636. }
  637. .nav-left {
  638. display: flex;
  639. justify-content: flex-start;
  640. }
  641. .icons {
  642. margin: 20rpx;
  643. width: 40rpx;
  644. height: 40rpx;
  645. /* margin-right: 10rpx; */
  646. }
  647. .back-btn,
  648. .headphone-btn {
  649. font-size: 36rpx;
  650. font-weight: bold;
  651. color: #333333;
  652. padding: 10rpx;
  653. }
  654. .logo {
  655. width: 120rpx;
  656. height: 120rpx;
  657. margin-bottom: 60rpx;
  658. border-radius: 20%;
  659. }
  660. .welcome-text {
  661. font-size: 48rpx;
  662. font-weight: bold;
  663. color: #333333;
  664. margin-bottom: 60rpx;
  665. /* text-align: left; */
  666. /* align-self: flex-start; */
  667. }
  668. .switch-container {
  669. display: flex;
  670. margin-bottom: 40rpx;
  671. align-self: flex-start;
  672. }
  673. .switch-item {
  674. font-size: 28rpx;
  675. color: #999999;
  676. padding: 10rpx 20rpx;
  677. position: relative;
  678. }
  679. .switch-item::after {
  680. content: "";
  681. position: absolute;
  682. bottom: 0;
  683. left: 50%;
  684. transform: translateX(-50%);
  685. width: 60%;
  686. /* 控制边框宽度 */
  687. height: 2rpx;
  688. background-color: transparent;
  689. }
  690. .switch-item.active {
  691. color: #333333;
  692. font-weight: 700;
  693. }
  694. .switch-item.active::after {
  695. content: "";
  696. position: absolute;
  697. top: 60rpx;
  698. bottom: 0;
  699. left: 50%;
  700. transform: translateX(-50%);
  701. width: 30%;
  702. /* 控制边框宽度 */
  703. height: 7rpx;
  704. background-color: #333333;
  705. }
  706. .input-container {
  707. width: 100%;
  708. }
  709. /* 添加图标输入框样式 */
  710. .input-with-icon {
  711. display: flex;
  712. align-items: center;
  713. width: 100%;
  714. height: 80rpx;
  715. border-bottom: 2rpx solid #e5e5e5;
  716. margin-bottom: 20rpx;
  717. }
  718. .input-icon {
  719. width: 40rpx;
  720. height: 40rpx;
  721. margin: 0 20rpx;
  722. }
  723. .input-icon-eye {
  724. width: 40rpx;
  725. height: 20rpx;
  726. margin: 0 20rpx;
  727. }
  728. .input-field {
  729. flex: 1;
  730. height: 80rpx;
  731. padding: 15rpx 0;
  732. font-size: 28rpx;
  733. color: #333333;
  734. border: none;
  735. background-color: transparent;
  736. }
  737. .phone-input-container {
  738. display: flex;
  739. align-items: center;
  740. width: 95.8%;
  741. height: 80rpx;
  742. /* border-radius: 20rpx; */
  743. /* border: 2rpx solid #e5e5e5; */
  744. /* background-color: #f5f5f5; */
  745. padding: 0 10rpx;
  746. border-bottom: 2rpx solid #e5e5e5;
  747. margin-bottom: 20rpx;
  748. }
  749. .country-code-selector {
  750. display: flex;
  751. align-items: center;
  752. padding: 0 10rpx;
  753. padding-bottom: 1rpx;
  754. height: 100%;
  755. /* border-right: 2rpx solid #e5e5e5; */
  756. /* background-color: #f5f5f5; */
  757. border-radius: 20rpx 0 0 20rpx;
  758. }
  759. .country-code {
  760. font-size: 28rpx;
  761. color: #333333;
  762. margin-right: 10rpx;
  763. }
  764. .country-flag-img {
  765. width: 40rpx;
  766. height: 40rpx;
  767. margin-right: 10rpx;
  768. }
  769. .arrow-down {
  770. font-size: 20rpx;
  771. color: #999999;
  772. }
  773. .phone-input {
  774. flex: 1;
  775. width: auto;
  776. height: 100%;
  777. border: none;
  778. background-color: transparent;
  779. padding: 0 0rpx;
  780. }
  781. .send-code-btn {
  782. width: 200rpx;
  783. height: 60rpx;
  784. display: inline-flex;
  785. padding: 0rpx 10rpx;
  786. justify-content: center;
  787. align-items: center;
  788. gap: 10px;
  789. border-radius: 4px;
  790. background: #000;
  791. }
  792. .send-code-btn-email {
  793. width: 200rpx;
  794. height: 60rpx;
  795. display: inline-flex;
  796. padding: 0rpx 10rpx;
  797. justify-content: center;
  798. align-items: center;
  799. gap: 10px;
  800. border-radius: 4px;
  801. background: #000;
  802. margin-right: 15rpx;
  803. }
  804. .send-code-btn-disabled {
  805. background: #e6e6e6;
  806. /* 禁用状态下的灰色背景 */
  807. }
  808. .send-code-btn-disabled-text {
  809. color: #999999 !important;
  810. }
  811. .send-code-text {
  812. color: #fff;
  813. font-size: 28rpx;
  814. }
  815. .agreement-container-one {
  816. display: flex;
  817. align-items: center;
  818. align-self: flex-start;
  819. margin-bottom: 80rpx;
  820. }
  821. .agreement-container {
  822. display: flex;
  823. align-items: center;
  824. margin-bottom: 40rpx;
  825. margin-top: -75.5rpx;
  826. align-self: flex-start;
  827. }
  828. .checkbox {
  829. width: 30rpx;
  830. height: 30rpx;
  831. margin-left: 20rpx;
  832. /* flex: content; */
  833. }
  834. .agreement-text-one {
  835. font-size: 22rpx;
  836. color: #666666;
  837. text-align: center;
  838. margin-left: 10rpx;
  839. }
  840. .agreement-text {
  841. margin-left: 20rpx;
  842. font-size: 24rpx;
  843. color: #666666;
  844. }
  845. .link {
  846. color: #333333;
  847. font-weight: bold;
  848. text-decoration: underline;
  849. }
  850. .register-btn {
  851. width: 100%;
  852. height: 80rpx;
  853. background-color: #000000;
  854. color: white;
  855. font-size: 32rpx;
  856. font-weight: bold;
  857. border-radius: 40rpx;
  858. margin-bottom: 40rpx;
  859. }
  860. .or-text {
  861. flex-direction: column;
  862. font-size: 24rpx;
  863. color: #999999;
  864. margin-top: 294rpx;
  865. margin-bottom: -22rpx;
  866. }
  867. .to-icon {
  868. width: 10rpx;
  869. height: 16rpx;
  870. }
  871. .or-text-one {
  872. flex-direction: column;
  873. font-size: 24rpx;
  874. color: #999999;
  875. }
  876. .third-party-login {
  877. width: 100%;
  878. margin-bottom: 60rpx;
  879. }
  880. .third-party-text {
  881. color: #ffffff;
  882. font-weight: bold;
  883. white-space: pre;
  884. }
  885. .third-party-btn {
  886. width: 100%;
  887. height: 80rpx;
  888. background-color: rgb(0, 0, 0);
  889. border: 2rpx solid #e5e5e5;
  890. border-radius: 40rpx;
  891. display: flex;
  892. align-items: center;
  893. justify-content: center;
  894. margin-bottom: 20rpx;
  895. font-size: 28rpx;
  896. color: #333333;
  897. }
  898. .google-icon,
  899. .apple-icon {
  900. width: 60rpx;
  901. height: 60rpx;
  902. margin-right: 20rpx;
  903. }
  904. .existing-account {
  905. display: flex;
  906. align-items: center;
  907. }
  908. .account-text {
  909. font-size: 24rpx;
  910. color: #666666;
  911. }
  912. .login-link {
  913. font-size: 24rpx;
  914. font-weight: bold;
  915. color: #333333;
  916. margin-left: 10rpx;
  917. text-decoration: underline;
  918. }
  919. .static-footer {
  920. position: fixed;
  921. bottom: 0;
  922. }
  923. /* 弹窗样式 */
  924. .popup-content {
  925. background-color: #ffffff;
  926. padding: 40rpx;
  927. text-align: center;
  928. border-radius: 10rpx;
  929. width: 550rpx;
  930. }
  931. .popup-title {
  932. font-size: 36rpx;
  933. font-weight: bold;
  934. color: #333;
  935. margin-bottom: 80rpx;
  936. text-align: center; /* 水平居中 */
  937. display: flex; /* 使用flex布局 */
  938. justify-content: center; /* 水平居中 */
  939. align-items: center; /* 垂直居中 */
  940. }
  941. .popup-message {
  942. font-size: 28rpx;
  943. color: #000000;
  944. margin-bottom: 80rpx;
  945. text-align: center; /* 水平居中 */
  946. display: flex; /* 使用flex布局 */
  947. justify-content: center; /* 水平居中 */
  948. align-items: center; /* 垂直居中 */
  949. }
  950. .agree-button {
  951. width: 300rpx;
  952. height: 80rpx;
  953. background-color: #000000;
  954. border-radius: 40rpx;
  955. display: flex; /* 添加flex布局 */
  956. align-items: center; /* 垂直居中 */
  957. justify-content: center; /* 水平居中 */
  958. }
  959. .agree-text {
  960. color: #ffffff;
  961. font-size: 34rpx;
  962. /* 添加垂直居中相关样式 */
  963. display: flex;
  964. align-items: center;
  965. justify-content: center;
  966. line-height: 1; /* 确保文字垂直居中 */
  967. }
  968. .switch-container-occupy {
  969. margin-top: 100rpx;
  970. }
  971. </style>