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.

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