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.

1022 lines
21 KiB

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