index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929
  1. <template>
  2. <div class="wallet-page">
  3. <!-- 导航栏 -->
  4. <s-header name="我的钱包" :noback="false" :isBorder="false"></s-header>
  5. <div class="wallet-content">
  6. <!-- 新增提示栏 -->
  7. <van-notice-bar
  8. v-if="showNotice"
  9. left-icon="info"
  10. color="#ed6a0c"
  11. background="#fef6e6"
  12. scrollable
  13. >
  14. 温馨提示:今日收款金额
  15. {{ formatAmount(receivableBalance) }} 元将于T+1日结算后可提现
  16. </van-notice-bar>
  17. <!-- 余额概览 -->
  18. <div class="balance-section">
  19. <div class="section-title">
  20. <van-icon name="balance-list" color="#2d88c9" size="18" />
  21. <span>资金账户</span>
  22. </div>
  23. <div class="balance-cards">
  24. <!-- 今日收款卡片 -->
  25. <div class="balance-card today-card" v-if="user.payPlatform === '0'">
  26. <div class="card-header">
  27. <van-icon name="cash-back-record" color="white" size="18" />
  28. <div class="card-title">
  29. <h3>今日收款余额(元)</h3>
  30. </div>
  31. </div>
  32. <div class="amount">{{ formatAmount(receivableBalance) }}</div>
  33. <van-button icon="cash-back-record" @click="handleRecharge">
  34. 立即充值
  35. </van-button>
  36. </div>
  37. <!-- 可提现卡片 -->
  38. <div class="balance-card withdraw-card">
  39. <div class="card-header">
  40. <van-icon name="cash-on-deliver" color="white" size="18" />
  41. <div class="card-title">
  42. <h3>可提现余额(元)</h3>
  43. </div>
  44. </div>
  45. <div class="amount">{{ formatAmount(withdrawableBalance) }}</div>
  46. <van-button icon="cash-on-deliver" @click="handleWithdraw">
  47. 立即提现
  48. </van-button>
  49. </div>
  50. </div>
  51. </div>
  52. <!-- 记录入口 -->
  53. <div class="record-section">
  54. <div class="section-title">
  55. <van-icon name="records" color="#2d88c9" size="18" />
  56. <span>交易记录</span>
  57. </div>
  58. <div class="record-cards">
  59. <!-- <div class="record-card" @click="goToAutoRecord">
  60. <div class="card-icon auto">
  61. <van-icon name="passed" size="24" />
  62. </div>
  63. <div class="card-content">
  64. <h3>自动结算</h3>
  65. <p>查看系统自动结算记录</p>
  66. </div>
  67. <van-icon name="arrow" size="16" color="#ccc" />
  68. </div> -->
  69. <div class="record-card" @click="jumpTo('/withdrawList')">
  70. <div class="card-icon manual">
  71. <van-icon name="cash-on-deliver" size="24" />
  72. </div>
  73. <div class="card-content">
  74. <h3>手动提现</h3>
  75. <p>查看手动提现操作记录</p>
  76. </div>
  77. <van-icon name="arrow" size="16" color="#ccc" />
  78. </div>
  79. </div>
  80. </div>
  81. <!-- 银行卡管理 -->
  82. <div class="bank-section">
  83. <div class="section-title">
  84. <van-icon name="credit-pay" color="#2d88c9" size="18" />
  85. <span>银行卡管理</span>
  86. </div>
  87. <div class="bank-cards">
  88. <!-- 已绑卡状态 -->
  89. <div class="bank-card" v-if="hasBankCard">
  90. <div
  91. @click="
  92. jumpTo(user.payPlatform === '1' ? '/huifuBind' : '/joinPayBind')
  93. "
  94. >
  95. <div class="card-header">
  96. <van-icon name="card" size="20" />
  97. <span>已绑定</span>
  98. </div>
  99. <div class="card-number">{{ bankCardNo }}</div>
  100. </div>
  101. <div class="auto-settle-hint">
  102. <van-switch
  103. :model-value="autoSettle"
  104. size="20px"
  105. active-color="#2d88c9"
  106. @update:model-value="changeSettle"
  107. />
  108. <span v-if="autoSettle">已启用自动结算</span>
  109. <span v-else>已关闭自动结算</span>
  110. </div>
  111. </div>
  112. <!-- 未绑卡状态 -->
  113. <div
  114. class="bank-card empty-state"
  115. @click="
  116. jumpTo(user.payPlatform === '1' ? '/huifuBind' : '/joinPayBind')
  117. "
  118. v-else
  119. >
  120. <div class="empty-content">
  121. <p class="empty-title">尚未绑定银行卡</p>
  122. <p class="empty-desc">绑定后可享受快捷支付服务</p>
  123. <van-button type="primary" round size="small" class="bind-btn">
  124. <van-icon name="plus" size="16" />
  125. 立即绑卡
  126. </van-button>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. <div class="bottom-spacer"></div>
  132. <!--提现弹窗-->
  133. <van-popup
  134. v-model:show="showWithdrawPopup"
  135. position="bottom"
  136. round
  137. :style="{ height: '40%' }"
  138. >
  139. <div class="withdraw-popup">
  140. <h3 class="popup-title">提现金额</h3>
  141. <div class="amount-input">
  142. <span class="currency-symbol">¥</span>
  143. <van-field
  144. v-model="withdrawAmount"
  145. type="number"
  146. placeholder="请输入提现金额"
  147. :formatter="formatterAmount"
  148. />
  149. </div>
  150. <div class="balance-hint">
  151. 可提现余额 {{ formatAmount(withdrawableBalance) }} 元
  152. </div>
  153. <van-button
  154. type="primary"
  155. block
  156. round
  157. class="confirm-btn"
  158. @click="confirmWithdraw"
  159. >
  160. 确认提现
  161. </van-button>
  162. </div>
  163. </van-popup>
  164. </div>
  165. </div>
  166. </template>
  167. <script>
  168. import sHeader from "../../components/SimpleHeader";
  169. import {
  170. getBalance,
  171. withdraw,
  172. updateSettlement,
  173. updateMchSettle,
  174. } from "../../service/purse/index";
  175. import { onMounted, ref, reactive } from "vue";
  176. import { getOneJoinPayMch } from "../../service/joinpayMch";
  177. import {
  178. getHuifuId,
  179. getMerchantBusiness,
  180. addWithdraw,
  181. } from "@/service/huifuMch";
  182. import { getLoginUser } from "../../common/js/utils";
  183. import { useRouter } from "vue-router";
  184. import {
  185. showConfirmDialog,
  186. showFailToast,
  187. showSuccessToast,
  188. showToast,
  189. } from "vant";
  190. import { useI18n } from "vue-i18n";
  191. export default {
  192. components: { sHeader },
  193. setup() {
  194. const { t } = useI18n();
  195. const user = getLoginUser();
  196. const router = useRouter();
  197. const receivableBalance = ref(0.0); // 今日收款余额
  198. const withdrawableBalance = ref(0.0); // 可提现余额
  199. const autoSettle = ref(false);
  200. const hasBankCard = ref(false);
  201. const bankCardInfo = ref(null);
  202. const bankCardNo = ref("");
  203. // 通知栏显示控制
  204. const showNotice = ref(false);
  205. // 提现弹窗数据
  206. const showWithdrawPopup = ref(false);
  207. const withdrawAmount = ref("");
  208. const withdrawaParams = ref({
  209. adminId: user.id,
  210. amount: 0,
  211. payPlatform: user.payPlatform,
  212. companyType: user.companyType,
  213. });
  214. const handleRecharge = () => {
  215. showToast({ message: "暂未开放" });
  216. };
  217. // 新增金额格式化方法
  218. const formatterAmount = (value) => {
  219. // 只允许输入数字和小数点
  220. value = value.replace(/[^\d.]/g, "");
  221. // 处理多个小数点的情况
  222. const pointIndex = value.indexOf(".");
  223. if (pointIndex > -1) {
  224. value = value.slice(0, pointIndex + 3); // 限制小数点后两位
  225. }
  226. return value;
  227. };
  228. // 新增确认提现方法
  229. const confirmWithdraw = async () => {
  230. const amount = Number(withdrawAmount.value);
  231. if (!amount || amount <= 0) {
  232. showToast("请输入有效的提现金额");
  233. return;
  234. }
  235. if (amount > withdrawableBalance.value) {
  236. showToast("提现金额不可超过可用余额");
  237. return;
  238. }
  239. withdrawaParams.value.amount = amount;
  240. console.log("withdrawaParams", withdrawaParams.value);
  241. showConfirmDialog({
  242. message: "确定要提现 " + amount + " 元吗?",
  243. }).then(async () => {
  244. const { data } = await withdraw(withdrawaParams.value);
  245. if (data.code === "00000") {
  246. showSuccessToast("申请成功");
  247. setTimeout(async () => {
  248. await queryBalance();
  249. }, 1500);
  250. }
  251. });
  252. showWithdrawPopup.value = false;
  253. };
  254. // 点击提现
  255. const handleWithdraw = () => {
  256. if (!hasBankCard.value) {
  257. showConfirmDialog({
  258. title: "未绑定银行卡",
  259. message: "提现需要先绑定银行卡,是否立即绑定?",
  260. confirmButtonColor: "#2d88c9",
  261. }).then(() => {
  262. router.push(user.payPlatform === "1" ? "/huifuBind" : "/joinPayBind");
  263. });
  264. return;
  265. }
  266. if (
  267. bankCardInfo.value.settMode === 1 ||
  268. bankCardInfo.value.settType === 1
  269. ) {
  270. showToast("当前银行卡为自动结算,请先切换成手动提现");
  271. return;
  272. }
  273. showWithdrawPopup.value = true;
  274. };
  275. const goToAutoRecord = () => {
  276. showToast({ message: "暂未开放" });
  277. };
  278. const goToManualRecord = () => {
  279. showToast({ message: "暂未开放" });
  280. };
  281. onMounted(async () => {
  282. await getBankCard();
  283. await queryBalance();
  284. if (
  285. user.payPlatform === "0" &&
  286. bankCardInfo.value &&
  287. (bankCardInfo.value.settMode === 2 || bankCardInfo.value.settType === 2)
  288. ) {
  289. showNotice.value = true;
  290. }
  291. // 查询汇付是否开启取现功能
  292. if (
  293. user.payPlatform === "1" &&
  294. bankCardInfo.value.huifuId != null &&
  295. bankCardInfo.value.tokenNo == null
  296. ) {
  297. const { data } = await getMerchantBusiness({ adminId: user.id });
  298. if (data.code === "00000") {
  299. if (data.data === null || data.data === "") {
  300. const { res } = await addWithdraw({ adminId: user.id });
  301. if (res.code === "00000") {
  302. console.log("res", res.data);
  303. }
  304. }
  305. }
  306. }
  307. });
  308. // 查询余额
  309. const queryBalance = async () => {
  310. try {
  311. const { data } = await getBalance({ adminId: user.id });
  312. if (data.code === "00000") {
  313. if (data.data.receivableBalance != null) {
  314. receivableBalance.value = data.data.receivableBalance;
  315. }
  316. if (data.data.withdrawableBalance != null) {
  317. withdrawableBalance.value = data.data.withdrawableBalance;
  318. }
  319. }
  320. } catch (error) {
  321. console.log("error", error);
  322. }
  323. };
  324. // 格式化金额
  325. const formatAmount = (amount) => {
  326. return new Intl.NumberFormat("en-US", {
  327. minimumFractionDigits: 2,
  328. maximumFractionDigits: 2,
  329. }).format(Number(amount));
  330. };
  331. // 获取绑定银行卡
  332. const getBankCard = async () => {
  333. if (user.payPlatform && user.payPlatform == "1") {
  334. // 汇付
  335. const { data } = await getHuifuId({ adminId: user.id });
  336. if (data.code === "00000" && data.data) {
  337. bankCardInfo.value = data.data;
  338. if (bankCardInfo.value.cardNo != null) {
  339. bankCardNo.value = formatBankCard(bankCardInfo.value.cardNo);
  340. hasBankCard.value = true;
  341. }
  342. if (data.data.settType === 1) {
  343. autoSettle.value = true;
  344. }
  345. }
  346. } else {
  347. // 汇聚
  348. const { data } = await getOneJoinPayMch({ adminId: user.id });
  349. if (data.code === "00000" && data.data) {
  350. bankCardInfo.value = data.data;
  351. if (bankCardInfo.value.bankAccountNo != null) {
  352. bankCardNo.value = formatBankCard(bankCardInfo.value.bankAccountNo);
  353. hasBankCard.value = true;
  354. }
  355. if (data.data.settMode === 1) {
  356. autoSettle.value = true;
  357. }
  358. }
  359. }
  360. };
  361. // 格式化银行卡号
  362. const formatBankCard = (cardNumber) => {
  363. if (!cardNumber) return "未获取卡号";
  364. const cleaned = cardNumber.toString().replace(/\D/g, "");
  365. // 动态分组逻辑
  366. const lastFour = cleaned.slice(-4);
  367. const starCount = Math.max(cleaned.length - 4, 0);
  368. const starGroups = Array(Math.ceil(starCount / 4))
  369. .fill("****")
  370. .join(" ");
  371. return `${starGroups} ${lastFour}`.trim();
  372. };
  373. // 跳转绑卡页面
  374. const jumpTo = (value) => {
  375. router.push({ path: value });
  376. };
  377. // 切换订单通知开关
  378. const changeSettle = (value) => {
  379. showConfirmDialog({
  380. title: t("user.tips"),
  381. message: autoSettle.value
  382. ? "确定关闭自动结算吗?"
  383. : "确定开启自动结算吗?",
  384. })
  385. .then(async () => {
  386. if (user.payPlatform === "1") {
  387. // 汇付
  388. const params = reactive({
  389. adminId: user.id,
  390. settType: value ? 1 : 2,
  391. });
  392. const { data } = await updateSettlement(params);
  393. if (data.code === "00000") {
  394. showSuccessToast(
  395. value ? t("user.openSuccess") : t("user.closeSuccess")
  396. );
  397. setTimeout(() => {
  398. router.go(0);
  399. }, 1500);
  400. } else {
  401. showFailToast(data.message);
  402. }
  403. }
  404. if (user.payPlatform === "0") {
  405. // 汇聚
  406. const params = reactive({
  407. adminId: user.id,
  408. settMode: value ? 1 : 2,
  409. });
  410. const { data } = await updateMchSettle(params);
  411. if (data.code === "00000") {
  412. showSuccessToast(
  413. value ? t("user.openSuccess") : t("user.closeSuccess")
  414. );
  415. setTimeout(() => {
  416. router.go(0);
  417. }, 1500);
  418. } else {
  419. showFailToast(data.message);
  420. }
  421. }
  422. })
  423. .catch((error) => {
  424. console.error(error);
  425. });
  426. };
  427. return {
  428. handleRecharge,
  429. goToAutoRecord,
  430. goToManualRecord,
  431. receivableBalance,
  432. withdrawableBalance,
  433. formatAmount,
  434. bankCardInfo,
  435. hasBankCard,
  436. autoSettle,
  437. formatBankCard,
  438. jumpTo,
  439. changeSettle,
  440. // 提现
  441. handleWithdraw,
  442. showWithdrawPopup,
  443. withdrawAmount,
  444. formatterAmount,
  445. confirmWithdraw,
  446. // 通知栏
  447. showNotice,
  448. // 数据
  449. bankCardNo,
  450. user,
  451. };
  452. },
  453. };
  454. </script>
  455. <style lang="less" scoped>
  456. /* 公共样式 */
  457. .wallet-page {
  458. background: #f8f9ff;
  459. }
  460. .wallet-content {
  461. background: #f5f6fa;
  462. height: calc(100% - 50px);
  463. overflow: auto;
  464. overflow-x: hidden;
  465. }
  466. .section-title {
  467. display: flex;
  468. align-items: center;
  469. gap: 4px;
  470. padding: 10px 10px;
  471. font-size: 18px;
  472. color: #2d88c9;
  473. font-weight: 700;
  474. }
  475. /**
  476. 余额卡片
  477. */
  478. .balance-section {
  479. margin: 10px 0px;
  480. }
  481. .balance-cards {
  482. display: grid;
  483. gap: 15px;
  484. padding: 0 12px;
  485. }
  486. /* 基础卡片样式 */
  487. .balance-card {
  488. border-radius: 16px;
  489. padding: 15px;
  490. position: relative;
  491. overflow: hidden;
  492. box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.12);
  493. transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  494. min-height: 180px;
  495. }
  496. /* 卡片悬停动效 */
  497. .balance-card:hover {
  498. transform: translateY(-5px);
  499. }
  500. /* 今日收款卡片 */
  501. .today-card {
  502. background: linear-gradient(135deg, #4f6cdf 0%, #6b8cff 100%);
  503. color: white;
  504. border: 1px solid rgba(255, 255, 255, 0.15);
  505. --start-color: #4f6cdf;
  506. --end-color: #6b8cff;
  507. }
  508. /* 可提现卡片 */
  509. .withdraw-card {
  510. background: linear-gradient(135deg, #38b48d 0%, #5cd4b0 100%);
  511. color: white;
  512. border: 1px solid rgba(255, 255, 255, 0.15);
  513. --start-color: #38b48d;
  514. --end-color: #5cd4b0;
  515. }
  516. /* 装饰性光斑 */
  517. .balance-card::after {
  518. content: "";
  519. position: absolute;
  520. width: 200px;
  521. height: 200px;
  522. background: radial-gradient(
  523. circle,
  524. rgba(255, 255, 255, 0.15) 0%,
  525. rgba(255, 255, 255, 0) 70%
  526. );
  527. top: -50px;
  528. right: -50px;
  529. }
  530. /* 卡片内容样式 */
  531. .card-header {
  532. display: flex;
  533. align-items: center;
  534. gap: 10px;
  535. margin-bottom: 10px;
  536. position: relative;
  537. z-index: 1;
  538. }
  539. .card-header .van-icon {
  540. background: rgba(255, 255, 255, 0.15);
  541. padding: 5px;
  542. border-radius: 10px;
  543. }
  544. .card-title h3 {
  545. margin: 0;
  546. font-size: 15px;
  547. font-weight: 500;
  548. letter-spacing: 0.5px;
  549. }
  550. .amount {
  551. font-size: 30px;
  552. font-weight: 600;
  553. margin: 10px 0;
  554. text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  555. position: relative;
  556. z-index: 1;
  557. }
  558. /* 按钮样式 */
  559. /* 限定在卡片内的按钮 */
  560. .balance-card .van-button {
  561. backdrop-filter: blur(8px);
  562. background: rgba(255, 255, 255, 0.15) !important;
  563. border: 1px solid rgba(255, 255, 255, 0.3) !important;
  564. color: white !important;
  565. border-radius: 20px;
  566. transition: all 0.3s ease;
  567. width: auto;
  568. }
  569. /* 仅影响卡片内的按钮悬停状态 */
  570. .balance-card .van-button:hover {
  571. background: rgba(255, 255, 255, 0.25) !important;
  572. transform: scale(1.05);
  573. }
  574. /* 提示文字 */
  575. .hint-text {
  576. font-size: 12px;
  577. opacity: 0.9;
  578. margin-top: 12px;
  579. display: flex;
  580. align-items: center;
  581. gap: 6px;
  582. }
  583. /* 响应式调整 */
  584. @media (max-width: 480px) {
  585. .amount {
  586. font-size: 28px;
  587. }
  588. .balance-card {
  589. min-height: 140px;
  590. padding: 16px;
  591. }
  592. }
  593. /* 动态光效增强 */
  594. @keyframes glow {
  595. 0% {
  596. opacity: 0.5;
  597. }
  598. 50% {
  599. opacity: 0.8;
  600. }
  601. 100% {
  602. opacity: 0.5;
  603. }
  604. }
  605. .balance-card::before {
  606. content: "";
  607. position: absolute;
  608. top: 0;
  609. left: 0;
  610. right: 0;
  611. bottom: 0;
  612. background: linear-gradient(
  613. 45deg,
  614. transparent 40%,
  615. rgba(255, 255, 255, 0.1) 50%,
  616. transparent 60%
  617. );
  618. animation: glow 3s infinite;
  619. pointer-events: none;
  620. }
  621. /* 记录入口 */
  622. .record-section {
  623. margin-top: 5px;
  624. }
  625. .record-cards {
  626. display: grid;
  627. gap: 12px;
  628. }
  629. .record-card {
  630. background: white;
  631. border-radius: 12px;
  632. padding: 0 10px;
  633. margin: 0 10px;
  634. display: flex;
  635. align-items: center;
  636. gap: 12px;
  637. box-shadow: 0 2px 8px rgba(77, 106, 221, 0.05);
  638. transition: transform 0.2s ease;
  639. &:active {
  640. transform: scale(0.98);
  641. }
  642. }
  643. .card-icon {
  644. width: 44px;
  645. height: 44px;
  646. border-radius: 10px;
  647. display: flex;
  648. align-items: center;
  649. justify-content: center;
  650. &.auto {
  651. background: rgba(77, 106, 221, 0.1);
  652. color: #2d88c9;
  653. }
  654. &.manual {
  655. background: rgba(255, 152, 0, 0.1);
  656. color: #ff9500;
  657. }
  658. }
  659. .card-content {
  660. flex: 1;
  661. h3 {
  662. font-size: 15px;
  663. color: #333;
  664. margin-bottom: 4px;
  665. }
  666. p {
  667. font-size: 12px;
  668. color: #999;
  669. }
  670. }
  671. /* 银行卡管理 */
  672. .bank-section {
  673. margin-top: 5px;
  674. }
  675. .bank-cards {
  676. display: grid;
  677. gap: 12px;
  678. }
  679. .bank-card {
  680. background: white;
  681. border-radius: 12px;
  682. padding: 10px 5px;
  683. margin: 0 10px;
  684. box-shadow: 0 4px 12px rgba(77, 106, 221, 0.08);
  685. position: relative;
  686. overflow: hidden;
  687. &::before {
  688. content: "";
  689. position: absolute;
  690. left: 0;
  691. top: 0;
  692. bottom: 0;
  693. width: 4px;
  694. background: #2d88c9;
  695. }
  696. &.backup::before {
  697. background: #6a82ee;
  698. }
  699. }
  700. .card-header {
  701. display: flex;
  702. align-items: center;
  703. gap: 8px;
  704. margin-bottom: 12px;
  705. span {
  706. font-size: 14px;
  707. color: #666;
  708. }
  709. .van-tag {
  710. transform: scale(0.9);
  711. }
  712. }
  713. .card-number {
  714. font-family: monospace;
  715. font-size: 18px;
  716. color: #333;
  717. letter-spacing: 2px;
  718. margin: 16px 10px;
  719. }
  720. .card-footer {
  721. display: flex;
  722. align-items: center;
  723. justify-content: space-between;
  724. color: #999;
  725. padding: 0 10px;
  726. font-size: 12px;
  727. }
  728. /* 统一按钮样式 */
  729. :deep(.van-button) {
  730. font-weight: 500;
  731. letter-spacing: 0.5px;
  732. }
  733. .auto-settle-hint {
  734. margin-top: 12px;
  735. padding-top: 12px;
  736. border-top: 1px dashed #eee;
  737. display: flex;
  738. align-items: center;
  739. gap: 8px;
  740. color: #666;
  741. font-size: 13px;
  742. padding: 10px 5px;
  743. }
  744. /* 未绑卡状态样式 */
  745. .bank-card.empty-state {
  746. background: linear-gradient(135deg, #ffffff 0%, #f6f7fc 100%);
  747. display: flex;
  748. align-items: center;
  749. justify-content: center;
  750. }
  751. .empty-content {
  752. text-align: center;
  753. padding: 10px;
  754. }
  755. .empty-icon {
  756. margin-bottom: 12px;
  757. filter: drop-shadow(0 2px 4px rgba(77, 106, 221, 0.1));
  758. }
  759. .empty-title {
  760. color: #2d3447;
  761. font-size: 16px;
  762. margin-bottom: 8px;
  763. }
  764. .empty-desc {
  765. color: #a3aac7;
  766. font-size: 12px;
  767. margin-bottom: 16px;
  768. }
  769. .bind-btn {
  770. background: #2d88c9;
  771. padding: 8px 24px;
  772. box-shadow: 0 3px 8px rgba(77, 106, 221, 0.2);
  773. }
  774. .bind-btn .van-icon {
  775. margin-right: 6px;
  776. vertical-align: -2px;
  777. }
  778. /* 占位元素样式 */
  779. .bottom-spacer {
  780. height: 50px;
  781. height: calc(60px + env(safe-area-inset-bottom));
  782. pointer-events: none;
  783. /* 防止遮挡点击 */
  784. }
  785. /**
  786. * 提现弹窗样式
  787. */
  788. .withdraw-popup {
  789. padding: 20px;
  790. display: flex;
  791. flex-direction: column;
  792. .popup-title {
  793. text-align: center;
  794. font-size: 18px;
  795. color: #333;
  796. margin-bottom: 20px;
  797. }
  798. .amount-input {
  799. display: flex;
  800. align-items: center;
  801. margin: 15px 0;
  802. border-bottom: 1px solid #eee;
  803. .currency-symbol {
  804. font-size: 24px;
  805. color: #333;
  806. margin-right: 8px;
  807. }
  808. :deep(.van-field) {
  809. padding: 10px 0;
  810. font-size: 22px;
  811. input {
  812. font-size: 22px;
  813. font-weight: 500;
  814. }
  815. }
  816. }
  817. .balance-hint {
  818. font-size: 12px;
  819. color: #999;
  820. margin-bottom: auto;
  821. }
  822. .confirm-btn {
  823. margin-top: 20px;
  824. background: #2d88c9;
  825. border: none;
  826. &:active {
  827. opacity: 0.9;
  828. }
  829. }
  830. }
  831. </style>