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.

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