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.

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