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.

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