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.

1159 lines
25 KiB

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