Profile.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  1. <template>
  2. <div class="usremei-container">
  3. <!-- Add Toast component -->
  4. <Toast ref="toast" />
  5. <!-- 第一个白色背景板块 -->
  6. <div class="profile-card">
  7. <div class="info-row">
  8. <div class="avatar-section">
  9. <div class="avatar">
  10. <img src="@/assets/hongqi.png" alt="红旗">
  11. </div>
  12. <div class="info-rows">
  13. <div class="info-row">
  14. <span class="label">账号:</span>
  15. <span class="value">{{ userInfo.mobile }}</span>
  16. </div>
  17. <div style="margin-top: 8px;">
  18. <span class="label">邀请码:</span>
  19. <span class="value">{{ userInfo.salt }}</span>
  20. </div>
  21. </div>
  22. <!-- <div style="display: flex; flex-direction: column; align-items: flex-start;margin-left: 10px;color: #fff;">
  23. <span class="name">{{ userInfo.nickname }}</span>
  24. <span class="value">{{ userInfo.mobile }}</span>
  25. </div> -->
  26. </div>
  27. <div class="sign-btn" @click="goToSignin">
  28. <img src="@/assets/sign.png" style="width: 60px;height: 50px;" alt="签到" />
  29. </div>
  30. </div>
  31. </div>
  32. <!-- 第二个银行卡板块 -->
  33. <!-- <div class="bank-card">
  34. <div class="bank-content">
  35. <img src="@/assets/bank.png" class="bank-logo" alt="银行logo" />
  36. <div class="bank-text">
  37. <div class="bank-name">中国农业银行农泉联名账户</div>
  38. <div><span style="font-size:13px;">余额:</span><span class="balance">{{ userInfo.ukaedu }}</span></div>
  39. </div>
  40. <div class="button-group">
  41. <button class="action-btn button-click-effect" @click="goToCharges">缴纳税费</button>
  42. <button class="action-btn button-click-effect" @click="goToFinancial">提升到账额度</button>
  43. </div>
  44. </div>
  45. </div> -->
  46. <!-- 收益板块组 -->
  47. <div class="profit-section">
  48. <div class="profit-block">
  49. <div class="profit-left">
  50. <div class="profit-header">
  51. <span class="item_label">红旗资产</span>
  52. <button class="profit-btn button-click-effect" @click="handleRedFlagWithdraw">提现</button>
  53. </div>
  54. <div class="profit-amount">¥{{ userInfo.coins }}</div>
  55. </div>
  56. <div class="profit-right">
  57. <div class="profit-header">
  58. <span class="item_label">退休补贴</span>
  59. <button class="profit-btn button-click-effect" @click="handleRetirementWithdraw">提现</button>
  60. </div>
  61. <div class="profit-amount">¥{{ userInfo.txbt?userInfo.txbt:0 }}</div>
  62. </div>
  63. <div class="profit-left">
  64. <div class="profit-header">
  65. <span class="item_label">党员薪资</span>
  66. <button class="profit-btn button-click-effect" @click="handlePartySalaryWithdraw">提现</button>
  67. </div>
  68. <div class="profit-amount">¥{{ userInfo.dyxz?userInfo.dyxz:0 }}</div>
  69. </div>
  70. <div class="profit-right">
  71. <div class="profit-header">
  72. <span class="item_label">每日分红</span>
  73. <button
  74. class="repair-btn button-click-effect"
  75. :class="{ 'repair-disabled': userInfo.xiufu === 1 }"
  76. :disabled="userInfo.xiufu === 1"
  77. @click="xiufufenhong">
  78. {{ userInfo.xiufu === 1 ? '已修复' : '修复' }}
  79. </button>
  80. <button class="profit-btn button-click-effect" @click="handleDailyCashWithdraw">提现</button>
  81. </div>
  82. <div class="profit-amount">¥{{ userInfo.dayred }}</div>
  83. </div>
  84. <div class="profit-left">
  85. <div class="profit-header">
  86. <span class="item_label">医疗补贴</span>
  87. <button class="profit-btn button-click-effect" @click="handleMedicalWithdraw">提现</button>
  88. </div>
  89. <div class="profit-amount">¥{{ userInfo.money }}</div>
  90. </div>
  91. <div class="profit-right">
  92. <div class="profit-header">
  93. <span class="item_label">原始股权</span>
  94. <button class="profit-btn button-click-effect" @click="handleOriginalSharesWithdraw">兑换</button>
  95. </div>
  96. <div class="profit-amount">¥{{ userInfo.guquan }}</div>
  97. </div>
  98. </div>
  99. </div>
  100. <!-- 应用中心板块 -->
  101. <div class="app-center">
  102. <div class="section-title">
  103. <span>常用工具</span>
  104. </div>
  105. <div class="function-grid">
  106. <div class="function-item button-click-effect" @click="$router.push('/user-center')">
  107. <img src="@/assets/221.png" alt="实名认证" />
  108. <span>实名认证</span>
  109. </div>
  110. <div class="function-item button-click-effect" @click="$router.push('/bank-card')">
  111. <img src="@/assets/222.png" alt="银行卡绑定" />
  112. <span>银行卡绑定</span>
  113. </div>
  114. <div class="function-item button-click-effect" @click="$router.push('/member')">
  115. <img src="@/assets/223.png" alt="我的团队" />
  116. <span>我的团队</span>
  117. </div>
  118. <div class="function-item button-click-effect" @click="$router.push('/order-list')">
  119. <img src="@/assets/224.png" alt="提现记录" />
  120. <span>提现记录</span>
  121. </div>
  122. <div class="function-item button-click-effect" @click="$router.push('/asset-center')">
  123. <img src="@/assets/225.png" alt="资金明细" />
  124. <span>资金明细</span>
  125. </div>
  126. <!-- <div class="function-item button-click-effect" @click="$router.push('/asset-center')"> -->
  127. <!-- <div class="function-item button-click-effect" @click="$router.push('/order-management')">
  128. <img src="@/assets/226.png" alt="股权管理" />
  129. <span>股权管理</span>
  130. </div> -->
  131. <div class="function-item button-click-effect" @click="$router.push('/retirement-subsidy')">
  132. <img src="@/assets/227.png" alt="退休补贴" />
  133. <span>退休补贴</span>
  134. </div>
  135. <div class="function-item button-click-effect" @click="$router.push('/order-management')">
  136. <img src="@/assets/228.png" alt="订单管理" />
  137. <span>订单管理</span>
  138. </div>
  139. <!-- <div class="function-item button-click-effect" @click="$router.push('/lever-list')">
  140. <span>礼品<br/>福利</span>
  141. </div>
  142. <div class="function-item button-click-effect" @click="toAppDownload">
  143. <span>APP<br/>下载</span>
  144. </div> -->
  145. </div>
  146. </div>
  147. <!-- 退出登录按钮 -->
  148. <div class="logout-wrapper">
  149. <button class="logout-btn button-click-effect" @click="handleLogout">安全退出</button>
  150. </div>
  151. <!-- 自定义确认框 -->
  152. <div class="confirm-dialog" v-if="showConfirm">
  153. <div class="confirm-mask"></div>
  154. <div class="confirm-content">
  155. <div class="confirm-title">提示</div>
  156. <div class="confirm-message">确认退出登录吗?</div>
  157. <div class="confirm-btns">
  158. <button class="confirm-btn cancel" @click="cancelLogout">取消</button>
  159. <button class="confirm-btn confirm" @click="confirmLogout">确认</button>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. </template>
  165. <script>
  166. import { getUserInfo } from '@/api/home';
  167. import { logout, cashOut, withdrawPension } from '@/api/profile';
  168. import Toast from '@/components/Toast.vue';
  169. export default {
  170. name: 'UsreMei',
  171. components: {
  172. Toast
  173. },
  174. data() {
  175. return {
  176. userInfo: {
  177. xiufu: 1 // 初始设置为1,使修复按钮默认禁用状态
  178. },
  179. showConfirm: false
  180. }
  181. },
  182. mounted() {
  183. this.getUserInfo();
  184. },
  185. methods: {
  186. async getUserInfo() {
  187. const res = await getUserInfo();
  188. this.userInfo = res.data;
  189. },
  190. goToCharges() {
  191. this.$router.push('/charges');
  192. },
  193. goToFinancial() {
  194. this.$router.push('/financial');
  195. },
  196. goToSignin() {
  197. this.$router.push('/signin');
  198. },
  199. async handleCashOut() {
  200. try {
  201. await cashOut();
  202. this.$refs.toast.show('套现成功', 'success');
  203. // 刷新用户信息
  204. await this.getUserInfo();
  205. } catch (error) {
  206. console.error('套现失败:', error);
  207. this.$refs.toast.show('套现失败,请重试', 'error');
  208. }
  209. },
  210. async handlePensionWithdraw() {
  211. try {
  212. await withdrawPension();
  213. this.$refs.toast.show('提现成功', 'success');
  214. // 刷新用户信息
  215. await this.getUserInfo();
  216. } catch (error) {
  217. console.error('提现失败:', error);
  218. this.$refs.toast.show('提现失败,请重试', 'error');
  219. }
  220. },
  221. handleLogout() {
  222. this.showConfirm = true;
  223. },
  224. cancelLogout() {
  225. this.showConfirm = false;
  226. },
  227. toAppDownload() {
  228. window.open(this.userInfo.link[1].value, '_blank');
  229. },
  230. async confirmLogout() {
  231. try {
  232. await logout();
  233. this.$refs.toast.show('退出成功', 'success');
  234. setTimeout(() => {
  235. // 清除本地存储的token等信息
  236. localStorage.removeItem('token');
  237. // 跳转到登录页
  238. this.$router.replace('/login');
  239. }, 2000);
  240. } catch (error) {
  241. this.$refs.toast.show('退出失败,请重试', 'error');
  242. } finally {
  243. this.showConfirm = false;
  244. }
  245. },
  246. // 红旗资产提现
  247. handleRedFlagWithdraw() {
  248. this.$router.push('/mention?type=1');
  249. // this.$refs.toast.show('暂未开启', 'info');
  250. },
  251. // 退休补贴提现
  252. handleRetirementWithdraw() {
  253. this.$router.push('/mention?type=2');
  254. // this.$refs.toast.show('中央资金筹备中', 'info');
  255. },
  256. // 党员薪资提现
  257. handlePartySalaryWithdraw() {
  258. this.$router.push('/mention?type=3');
  259. // this.$refs.toast.show('统一打款', 'info');
  260. },
  261. // 每日现金提现
  262. handleDailyCashWithdraw() {
  263. this.$router.push('/mention?type=4');
  264. },
  265. // 修复分红
  266. xiufufenhong() {
  267. // 检查修复状态
  268. if (this.userInfo.xiufu === 1) {
  269. this.$refs.toast.show('已修复,无需重复操作', 'info');
  270. return;
  271. }
  272. this.$router.push({
  273. path: '/paymentnew',
  274. query: {
  275. item: {
  276. title: '分红数据库',
  277. money: '280'
  278. }
  279. }
  280. })
  281. },
  282. // 医疗补贴提现
  283. async handleMedicalWithdraw() {
  284. try {
  285. // 先重新获取最新的用户信息,确保isyiliao参数是最新的
  286. console.log('获取最新用户信息...');
  287. await this.getUserInfo();
  288. console.log('医疗补贴提现 - isyiliao值:', this.userInfo.isyiliao);
  289. // 确保isyiliao参数存在且有效
  290. if (this.userInfo.isyiliao !== undefined && this.userInfo.isyiliao !== null) {
  291. if (this.userInfo.isyiliao === 1) {
  292. console.log('跳转到提现页面');
  293. this.$router.push(`/mention?type=5&t=${Date.now()}`);
  294. } else if (this.userInfo.isyiliao === 0) {
  295. console.log('跳转到支付页面');
  296. this.$router.push({
  297. path: '/paymentnewyiliao',
  298. query: {
  299. item: {
  300. title: '医疗补贴资金',
  301. money: '510'
  302. },
  303. t: Date.now()
  304. }
  305. });
  306. } else {
  307. console.log('isyiliao值异常:', this.userInfo.isyiliao);
  308. this.$refs.toast.show('数据异常,请重试', 'error');
  309. }
  310. } else {
  311. console.log('isyiliao参数未获取到,重新尝试...');
  312. this.$refs.toast.show('正在获取数据,请稍后重试', 'info');
  313. }
  314. } catch (error) {
  315. console.error('获取用户信息失败:', error);
  316. this.$refs.toast.show('获取数据失败,请重试', 'error');
  317. }
  318. },
  319. // 原始股权提现
  320. handleOriginalSharesWithdraw() {
  321. // this.$router.push('/mention?type=6');
  322. this.$refs.toast.show('等待开启兑换','info');
  323. },
  324. }
  325. }
  326. </script>
  327. <style scoped>
  328. .usremei-container {
  329. min-height: 100vh;
  330. background-image: url('../assets/dabag.png');
  331. background-size: cover;
  332. background-position: center;
  333. padding: 20px;
  334. padding-top: 60px;
  335. padding-bottom: 80px; /* 为底部tab预留空间 */
  336. box-sizing: border-box; /* 确保padding不会增加容器高度 */
  337. overflow-y: auto; /* 允许内容滚动 */
  338. position: relative; /* 为fixed定位提供参考 */
  339. }
  340. .profile-card {
  341. margin-bottom: 20px;
  342. position: relative;
  343. }
  344. .avatar-section {
  345. display: flex;
  346. align-items: center;
  347. justify-content: space-between;
  348. margin-top: -20px;
  349. /* position: absolute;
  350. top: -40px;
  351. left: 20px; */
  352. }
  353. .info-rows{
  354. }
  355. .avatar {
  356. width: 80px;
  357. height: 80px;
  358. background: #fff;
  359. border-radius: 50%;
  360. display: flex;
  361. align-items: center;
  362. justify-content: center;
  363. margin-right: 15px;
  364. }
  365. .item_label{
  366. color:#000;
  367. font-weight:550;
  368. }
  369. .avatar img {
  370. width: 40px;
  371. height: 40px;
  372. object-fit: contain;
  373. }
  374. .info-row {
  375. display: flex;
  376. justify-content: space-between;
  377. align-items: center;
  378. margin-bottom: 5px;
  379. font-size: 16px;
  380. }
  381. .name {
  382. font-size: 20px;
  383. font-weight: bold;
  384. }
  385. .sign-icon {
  386. width: 50px;
  387. height: 40px;
  388. }
  389. .label {
  390. color: #fff;
  391. font-size:16px;
  392. }
  393. .value {
  394. color: #fff;
  395. margin-top: 5px;
  396. font-size:16px;
  397. }
  398. .bank-card {
  399. background: url('../assets/gebg.png');
  400. background-size: cover;
  401. border-radius: 12px;
  402. padding: 20px;
  403. }
  404. .bank-content {
  405. display: flex;
  406. align-items: center;
  407. justify-content: space-between;
  408. gap: 15px;
  409. }
  410. .bank-logo {
  411. width: 50px; /* 稍微缩小logo */
  412. height: 50px;
  413. flex-shrink: 0;
  414. }
  415. .bank-text {
  416. flex: 2; /* 给文字更多空间 */
  417. min-width: 0;
  418. }
  419. .bank-name {
  420. font-weight: bold;
  421. font-size: 10px; /* 稍微减小字号 */
  422. color: #333;
  423. margin-bottom: 10px;
  424. line-height: 1.2;
  425. white-space: normal; /* 允许换行 */
  426. }
  427. .balance {
  428. font-size: 18px;
  429. color: #85370d;
  430. font-weight: bold;
  431. }
  432. .button-group {
  433. display: flex;
  434. flex-direction: column;
  435. gap: 6px; /* 减小按钮间距 */
  436. flex-shrink: 0;
  437. width: 90px; /* 固定按钮组宽度 */
  438. }
  439. .action-btn, .profit-btn, .logout-btn {
  440. position: relative;
  441. overflow: hidden;
  442. transition: all 0.2s;
  443. }
  444. .action-btn {
  445. background-color: #fb3f6c;
  446. color: #fff;
  447. border: none;
  448. border-radius: 4px;
  449. padding: 6px 8px;
  450. font-size: 12px;
  451. cursor: pointer;
  452. white-space: nowrap;
  453. width: 100%;
  454. }
  455. .action-btn:active {
  456. transform: scale(0.98);
  457. opacity: 0.9;
  458. }
  459. .profit-btn {
  460. background-color: #ea0a1c;
  461. color: #fff;
  462. border: none;
  463. border-radius: 4px;
  464. padding: 6px 12px;
  465. font-size: 12px;
  466. cursor: pointer;
  467. position: relative;
  468. overflow: hidden;
  469. }
  470. .profit-btn:active {
  471. transform: scale(0.98);
  472. opacity: 0.9;
  473. }
  474. /* 修复按钮样式 */
  475. .repair-btn {
  476. background-color: #4caf50;
  477. color: #fff;
  478. border: none;
  479. border-radius: 4px;
  480. padding: 5px 6px;
  481. font-size: 12px;
  482. cursor: pointer;
  483. position: relative;
  484. overflow: hidden;
  485. transition: all 0.2s;
  486. }
  487. .repair-btn:active {
  488. transform: scale(0.98);
  489. opacity: 0.9;
  490. }
  491. .repair-btn.repair-disabled {
  492. background-color: #000 !important;
  493. color: #fff !important;
  494. cursor: not-allowed !important;
  495. opacity: 1 !important;
  496. }
  497. .repair-btn.repair-disabled:active {
  498. transform: none !important;
  499. opacity: 1 !important;
  500. }
  501. .function-item {
  502. display: flex;
  503. flex-direction: column;
  504. align-items: center;
  505. justify-content: center;
  506. gap: 8px;
  507. cursor: pointer;
  508. transition: all 0.2s;
  509. background: transparent;
  510. padding: 5px;
  511. }
  512. .function-item:active {
  513. transform: scale(0.95);
  514. opacity: 0.8;
  515. }
  516. @keyframes ripple {
  517. 0% {
  518. transform: scale(0, 0);
  519. opacity: 0.5;
  520. }
  521. 20% {
  522. transform: scale(25, 25);
  523. opacity: 0.3;
  524. }
  525. 100% {
  526. opacity: 0;
  527. transform: scale(40, 40);
  528. }
  529. }
  530. .action-btn::after,
  531. .profit-btn::after,
  532. .logout-btn::after {
  533. content: '';
  534. position: absolute;
  535. top: 50%;
  536. left: 50%;
  537. width: 5px;
  538. height: 5px;
  539. background: rgba(255, 255, 255, 0.5);
  540. opacity: 0;
  541. border-radius: 100%;
  542. transform: scale(1, 1) translate(-50%);
  543. transform-origin: 50% 50%;
  544. }
  545. .action-btn:active::after,
  546. .profit-btn:active::after,
  547. .logout-btn:active::after {
  548. animation: ripple 0.4s ease-out;
  549. }
  550. /* 调整信息行的位置,让它不会被头像遮挡 */
  551. .info-row:first-of-type {
  552. margin-top: 10px;
  553. }
  554. /* 移动端适配 */
  555. @media screen and (max-width: 375px) {
  556. .usremei-container {
  557. padding: 15px;
  558. padding-top: 50px;
  559. padding-bottom: 70px;
  560. }
  561. .profile-card,
  562. .bank-card {
  563. padding: 15px;
  564. }
  565. .bank-content {
  566. flex-direction: column;
  567. align-items: flex-start;
  568. }
  569. .bank-text {
  570. width: 100%;
  571. margin: 10px 0;
  572. }
  573. .button-group {
  574. width: 100%;
  575. }
  576. .action-btn {
  577. width: 100%;
  578. }
  579. }
  580. .profit-section {
  581. display: flex;
  582. flex-direction: column;
  583. gap: 15px;
  584. margin-top: 15px;
  585. margin-bottom: 15px;
  586. }
  587. .profit-block {
  588. display: grid;
  589. grid-template-columns: repeat(2, 1fr);
  590. gap: 10px;
  591. padding: 10px;
  592. background: #fff0e1;
  593. /* border-radius: 12px; */
  594. }
  595. .profit-left, .profit-right {
  596. padding: 9px;
  597. background: #fff0e1;
  598. border-radius: 8px;
  599. }
  600. .profit-header {
  601. display: flex;
  602. justify-content: space-between;
  603. align-items: center;
  604. margin-bottom: 8px;
  605. }
  606. .profit-header span {
  607. color: #85370d;
  608. font-size: 14px;
  609. }
  610. .profit-amount {
  611. font-size: 20px;
  612. font-weight: bold;
  613. color: #85370d;
  614. }
  615. /* 移动端适配 */
  616. @media screen and (max-width: 375px) {
  617. .profit-block {
  618. gap: 8px;
  619. padding: 8px;
  620. }
  621. .profit-left, .profit-right {
  622. padding: 8px;
  623. }
  624. .profit-amount {
  625. font-size: 18px;
  626. }
  627. }
  628. .app-center {
  629. border-radius: 12px;
  630. margin-top: 15px;
  631. }
  632. .section-title {
  633. display: flex;
  634. align-items: center;
  635. gap: 10px;
  636. margin-bottom: 20px;
  637. color: #fff;
  638. }
  639. .title-line {
  640. width: 2px;
  641. height: 16px;
  642. background-color: #ff6b00;
  643. }
  644. .section-title span {
  645. font-size: 16px;
  646. font-weight: bold;
  647. color: #fff;
  648. }
  649. .function-grid {
  650. display: grid;
  651. grid-template-columns: repeat(4, 1fr);
  652. gap: 20px 10px;
  653. /* background-color: #fff; */
  654. padding: 10px;
  655. border-radius: 12px;
  656. }
  657. .function-item img {
  658. width: 50px;
  659. height: 50px;
  660. object-fit: contain;
  661. }
  662. .function-item span {
  663. font-size: 12px;
  664. color: #fff;
  665. text-align: center;
  666. line-height: 1.3;
  667. font-weight: bold;
  668. }
  669. /* 移动端适配补充 */
  670. @media screen and (max-width: 375px) {
  671. .app-center {
  672. padding: 15px;
  673. }
  674. .function-grid {
  675. gap: 15px 8px;
  676. }
  677. .function-item img {
  678. width: 24px;
  679. height: 24px;
  680. }
  681. .function-item span {
  682. font-size: 11px;
  683. }
  684. }
  685. .logout-wrapper {
  686. margin-top: 30px;
  687. margin-bottom: 20px;
  688. padding: 0 20px;
  689. display: flex;
  690. justify-content: center;
  691. align-items: center;
  692. }
  693. .logout-btn {
  694. width: 60%;
  695. background-color: #fff;
  696. color: #000;
  697. border: none;
  698. border-radius: 20px;
  699. padding: 12px 0;
  700. font-size: 16px;
  701. cursor: pointer;
  702. position: relative;
  703. overflow: hidden;
  704. }
  705. .logout-btn:active {
  706. transform: scale(0.98);
  707. opacity: 0.9;
  708. }
  709. /* 移动端适配补充 */
  710. @media screen and (max-width: 375px) {
  711. .logout-btn {
  712. padding: 10px 0;
  713. font-size: 14px;
  714. }
  715. }
  716. .button-click-effect {
  717. position: relative !important;
  718. overflow: hidden !important;
  719. transition: all 0.2s !important;
  720. }
  721. .button-click-effect:active {
  722. transform: scale(0.98) !important;
  723. opacity: 0.9 !important;
  724. }
  725. /* 确认框样式 */
  726. .confirm-dialog {
  727. position: fixed;
  728. top: 0;
  729. left: 0;
  730. width: 100%;
  731. height: 100%;
  732. z-index: 9999;
  733. }
  734. .confirm-mask {
  735. position: absolute;
  736. top: 0;
  737. left: 0;
  738. width: 100%;
  739. height: 100%;
  740. background: rgba(0, 0, 0, 0.5);
  741. }
  742. .confirm-content {
  743. position: absolute;
  744. top: 50%;
  745. left: 50%;
  746. transform: translate(-50%, -50%);
  747. width: 80%;
  748. max-width: 300px;
  749. background: #fff;
  750. border-radius: 12px;
  751. overflow: hidden;
  752. }
  753. .confirm-title {
  754. padding: 15px;
  755. text-align: center;
  756. font-size: 16px;
  757. font-weight: bold;
  758. color: #333;
  759. border-bottom: 1px solid #eee;
  760. }
  761. .confirm-message {
  762. padding: 20px 15px;
  763. text-align: center;
  764. font-size: 14px;
  765. color: #666;
  766. line-height: 1.5;
  767. }
  768. .confirm-btns {
  769. display: flex;
  770. border-top: 1px solid #eee;
  771. }
  772. .confirm-btn {
  773. flex: 1;
  774. padding: 12px;
  775. text-align: center;
  776. font-size: 14px;
  777. background: #fff;
  778. border: none;
  779. cursor: pointer;
  780. transition: all 0.2s;
  781. }
  782. .confirm-btn.cancel {
  783. color: #666;
  784. border-right: 1px solid #eee;
  785. }
  786. .confirm-btn.confirm {
  787. color: #cf0101;
  788. font-weight: bold;
  789. }
  790. .confirm-btn:active {
  791. opacity: 0.8;
  792. background: #f5f5f5;
  793. }
  794. </style>