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.

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