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.

1145 lines
25 KiB

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