VirtualCard.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255
  1. <template>
  2. <view v-if="cardList.length" class="page">
  3. <view class="card-swiper">
  4. <swiper class="swiper-container" :current="currentIndex" @change="handleSwiperChange">
  5. <swiper-item v-for="(card, index) in cardList" :key="card.id">
  6. <view class="card-wrapper">
  7. <view class="card-info" :class="{ flipping: isFlipping[card.id] }"
  8. @click.stop="(e: MouseEvent) => toggleCardNo(card, e)">
  9. <view v-if="card.type == 'Virtual'" class="card-name">
  10. {{ card.type || "Virtual" }}
  11. </view>
  12. <view v-if="card.type == 'Physical'" class="card-name">
  13. {{ card.type || "Physical" }}
  14. </view>
  15. <image class="card-type" src="/static/images/c-type.png" alt="" srcset="" />
  16. <image class="logo" src="/static/images/logo1.png" alt="" srcset="" />
  17. <template v-if="showCardNo[card.id]">
  18. <view class="number">
  19. {{ card?.cardNumber }}
  20. <view class="copy" @click.stop="cardCopy(card.cardNumber, 'cardNumber')"><cwg-icon name="copy"
  21. :size="13" color="" /></view>
  22. </view>
  23. <view class="card-b">
  24. <view class="valid">
  25. <view class="lable">{{ t("cards.p13") }}</view>
  26. <view>{{ card.firstName }} {{ card.lastName }}</view>
  27. </view>
  28. <view class="valid">
  29. <view class="lable">{{ t("cards.p14") }}</view>
  30. <view>{{ card.expireDate || "--" }}</view>
  31. </view>
  32. <view class="valid" @click.stop="setCvv">
  33. <view class="lable" v-if="!card.expireDate">CVV</view>
  34. <view v-if="!card.expireDate" class="cvv">
  35. ***
  36. <view class="copy"><cwg-icon name="icon_visiable" :size="13" color="" /></view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <template v-else>
  42. <view v-if="currentCard.status == 'success' && currentCard?.activateStatus" class="zw">{{
  43. card.cardNumber }}</view>
  44. <view v-else class="zw">{{ "**** **** **** ****" }}</view>
  45. </template>
  46. </view>
  47. </view>
  48. </swiper-item>
  49. </swiper>
  50. <view v-if="cardList.length > 1" class="swiper-indicators">
  51. <view v-for="(card, index) in cardList" :key="card.id" class="indicator-dot"
  52. :class="{ active: index === currentIndex }" @click="currentIndex = index"></view>
  53. </view>
  54. </view>
  55. <template v-if="currentCard.status == 'success' && currentCard?.activateStatus">
  56. <view class="actions">
  57. <template v-if="
  58. currentCard.freezeType == 1 && currentCard.freezeStatus == 'success'
  59. ">
  60. <view class="action-btn" @click="ucardOperation(currentCard, 2)">
  61. <cwg-icon name="icon_recharge" :size="28" color="#EA002A" />
  62. <view>{{ t("card.Btn.b3") }}</view>
  63. </view>
  64. <view class="action-btn" @click="ucardOperation(currentCard, 3)">
  65. <cwg-icon name="icon_card password reset" :size="28" color="#EA002A" />
  66. <view>{{ t("card.Btn.b4") }}</view>
  67. </view>
  68. </template>
  69. <template v-else>
  70. <view class="action-btn action-btn1">
  71. <cwg-icon name="icon_recharge" :size="28" color="#999" />
  72. <view>{{ t("card.Btn.b3") }}</view>
  73. </view>
  74. <view class="action-btn action-btn1">
  75. <cwg-icon name="icon_card password reset" :size="28" color="#999" />
  76. <view>{{ t("card.Btn.b4") }}</view>
  77. </view>
  78. </template>
  79. <view v-if="currentCard.freezeType == '1'" class="action-btn" @click="ucardOperation(currentCard, 4)">
  80. <cwg-icon name="icon_unfreeze" :size="28" color="#EA002A" />
  81. <view v-if="currentCard.freezeStatus == 'success'">{{
  82. t("card.Btn.b5")
  83. }}</view>
  84. <view v-else>{{ t("card.Btn.b14") }}</view>
  85. </view>
  86. <view v-if="currentCard.freezeType == '2'" class="action-btn" @click="ucardOperation(currentCard, 5)">
  87. <cwg-icon name="icon_freeze" :size="28" color="#EA002A" />
  88. <view v-if="currentCard.freezeStatus == 'success'">{{
  89. t("card.Btn.b6")
  90. }}</view>
  91. <view v-else>{{ t("card.Btn.b15") }}</view>
  92. </view>
  93. </view>
  94. <view class="balance-wrap">
  95. <!-- <view class="balance-content">{{ t('cards.currency') }}</view> -->
  96. <view class="balance-content">{{ t("card.Btn.b10") }}</view>
  97. </view>
  98. <view class="balance-wrap balance-wrap1">
  99. <view class="global-con-l">
  100. <!-- <view class="global-con-l" @click="setModelValue"> -->
  101. <image class="l-img" :src="imageSrc(currency)" alt="" srcset="" />
  102. <view class="r">
  103. <view>{{ currency }}</view>
  104. </view>
  105. <!-- <cwg-icon name="icon_dropdown" :size="24" /> -->
  106. </view>
  107. <view class="balance">
  108. <view class="balance-amount">{{
  109. isOpen ? amount + " " + "USD" : "*****"
  110. }}</view>
  111. <cwg-icon :name="isOpen ? 'icon_visiable' : 'icon_unvisiable'" :size="24" @click.stop="debouncedGetBalance" />
  112. </view>
  113. </view>
  114. <view class="trans-header">
  115. <view class="trans-title">{{ t("cards.transactions") }}</view>
  116. <view class="all" @click="goRechargeRecord">{{
  117. t("card.Status.t22")
  118. }}</view>
  119. <!-- <i class="i-mdi-calendar-month-outline" @click="showDatePicker = true" /> -->
  120. </view>
  121. <cwg-tabs :list="tabList" @click="handleTabClick" />
  122. <view class="transaction-list">
  123. <!-- Recharge Records -->
  124. <view v-if="jiluIndex === 0">
  125. <RechargeList :pageSize="4" ref="rechargeListRef" :cardNo="currentCard.cardNo" />
  126. </view>
  127. <!-- Transfer Records -->
  128. <view v-if="jiluIndex === 1">
  129. <TransactionList :pageSize="4" ref="rechargeListRef" :cardNo="currentCard.cardNo" />
  130. </view>
  131. </view>
  132. </template>
  133. <template v-else>
  134. <view class="actions1">
  135. <view class="card-btn">
  136. <view class="yue st">
  137. <view class="a">{{ t("card.Info.t15") }}</view>
  138. <view v-if="
  139. !currentCard.activateStatus &&
  140. (currentCard.applyStatus == null ||
  141. currentCard.applyStatus == 'wait_process' ||
  142. currentCard.applyStatus == 'processing')
  143. " v-t="'card.Info.t16'" class="v"></view>
  144. <view v-if="currentCard.applyStatus == 'fail'" v-t="'card.Info.t17'" class="v"></view>
  145. <view v-if="currentCard.activateStatus == 'unactivate'" v-t="'card.Info.t18'" class="v"></view>
  146. <view v-if="
  147. currentCard.activateStatus &&
  148. (currentCard.status == 'processing' ||
  149. currentCard.status == 'wait_process')
  150. " v-t="'card.Info.t19'" class="v"></view>
  151. <view v-if="currentCard.activateStatus == 'fail'" v-t="'card.Info.t20'" class="v"></view>
  152. </view>
  153. <!-- 查询进度 -->
  154. <view v-if="!currentCard.activateStatus" class="btn1 btn2" @click="viewApply(currentCard)">
  155. <view v-t="'card.Btn.b11'"></view>
  156. </view>
  157. <!-- 激活 -->
  158. <view v-if="currentCard.activateStatus" class="btn1 btn2" :class="currentCard.activateStatus == 'unactivate' ||
  159. currentCard.activateStatus == 'fail'
  160. ? ''
  161. : 'btn3'
  162. " @click="ucardOperation(currentCard, 1)">
  163. <view v-t="'card.Btn.b1'"></view>
  164. </view>
  165. <!-- 重新开卡 -->
  166. <view v-if="
  167. (currentCard.tradeStatus == '3' ||
  168. (currentCard.tradeStatus == '2' &&
  169. currentCard.tradeType == '2')) &&
  170. currentCard.applyStatus == 'fail'
  171. " class="btn1 btn2" @click="updateCardTypes(card, 1)">
  172. <view v-t="'card.Btn.b12'"></view>
  173. </view>
  174. </view>
  175. </view>
  176. </template>
  177. <CardHandle v-if="dialogInfoTradingAdd" :dialog-info-trading-add="dialogInfoTradingAdd" :form-list="formList"
  178. @close-add="dialogInfoTradingAdd = false" />
  179. </view>
  180. </template>
  181. <script setup lang="ts">
  182. import { ref, onMounted, watch, computed, onUnmounted } from "vue";
  183. import type { CardInfo, TransactionInfo } from "@/api/ucard";
  184. import dayjs from "dayjs";
  185. import { showToast } from "@/utils/toast";
  186. import { useI18n } from "vue-i18n";
  187. import useRouter from "@/hooks/useRouter";
  188. import { ucardApi } from "@/api/ucard";
  189. import _ from 'lodash';
  190. import useTransferStore from "@/stores/use-transfer-store";
  191. import useUserStore from "@/stores/use-user-store";
  192. import useCardStore from "@/stores/use-card-store";
  193. import CardHandle from "./CardHandle.vue";
  194. import RechargeList from "@/pages/recharge-record/components/RechargeList.vue";
  195. import TransactionList from "@/pages/recharge-record/components/TransactionList.vue";
  196. const debouncedGetBalance = _.debounce(getBalance, 300, { leading: true, trailing: false });
  197. const router = useRouter();
  198. const cardStore = useCardStore();
  199. const userStore = useUserStore();
  200. const transferStore = useTransferStore();
  201. const cardList = computed(() => cardStore.userCard);
  202. const userInfo = computed(() => userStore.userInfo);
  203. const { t } = useI18n();
  204. const currentCard = ref<CardInfo | null>({});
  205. const formList = ref({});
  206. const balance = ref<{ amount: number; currency: string; value: string }[]>([
  207. {
  208. amount: 0,
  209. currency: "USD",
  210. value: "USD",
  211. },
  212. ]);
  213. const transactions = ref<TransactionInfo[]>([]);
  214. const showCardNo = ref<{ [key: string]: boolean }>({});
  215. const isFlipping = ref<{ [key: string]: boolean }>({});
  216. const isOpen = ref(false);
  217. const currentIndex = ref(0);
  218. const dialogInfoTradingAdd = ref(false);
  219. const images = import.meta.glob("/static/images/currency/*.png", {
  220. eager: true,
  221. });
  222. const tabList = ref([
  223. { name: t("cards.rechargeB1") },
  224. { name: t("Shop.Index.Transaction") }
  225. ]);
  226. const handleTabClick = (item, index) => {
  227. console.log('点击了标签:', item, '索引:', index);
  228. jiluIndex.value = index;
  229. };
  230. function imageSrc(currency: string) {
  231. return images[`/static/images/currency/${currency}.png`]?.default;
  232. }
  233. function setCvv() {
  234. dialogInfoTradingAdd.value = true;
  235. formList.value = currentCard.value;
  236. }
  237. const jiluIndex = ref(0);
  238. const transStatusMap = {
  239. succeed: t("card.Status.t1"),
  240. success: t("card.Status.t1"),
  241. failed: t("card.Status.t1"),
  242. fail: t("card.Status.t1"),
  243. processing: t("card.Status.t3"),
  244. auth: t("card.Status.t4"),
  245. wait_process: t("card.Status.t5"),
  246. };
  247. function cardCopy(data) {
  248. let title = t("common.copy1");
  249. console.log(title);
  250. uni.setClipboardData({
  251. data,
  252. success: () => {
  253. uni.showToast({ title });
  254. },
  255. });
  256. }
  257. function setDate(date) {
  258. return dayjs(date).format("YYYY-MM-DD HH:mm:ss");
  259. }
  260. const currency = ref("USD");
  261. const amount = ref(0);
  262. const modelValue = ref(false);
  263. function setModelValue() {
  264. modelValue.value = true;
  265. }
  266. function changeSelect(e) {
  267. amount.value = e.amount;
  268. currency.value = e.currency;
  269. }
  270. const showDatePicker = ref(false);
  271. const dateRange = ref<[string, string] | undefined>(undefined);
  272. dateRange.value = ["", ""];
  273. const minDate = new Date(new Date().getFullYear() - 10, 0, 1);
  274. const maxDate = new Date(new Date().getFullYear() + 10, 0, 1);
  275. function onConfirmStart(value: [string, string]) {
  276. dateRange.value = ["", ""];
  277. if (value && value.length === 2) {
  278. dateRange.value = value;
  279. }
  280. showDatePicker.value = false;
  281. handleDateRangeChange();
  282. }
  283. function formatter(day: any) {
  284. if (day.type === "start") {
  285. day.bottomInfo = t("cards.start");
  286. } else if (day.type === "end") {
  287. day.bottomInfo = t("cards.end");
  288. } else {
  289. day.bottomInfo = "";
  290. }
  291. return day;
  292. }
  293. function goRechargeRecord() {
  294. router.push(`/pages/recharge-record/list?cardNo=${currentCard.value?.cardNo}`);
  295. }
  296. async function getBalance() {
  297. console.log(isOpen.value, 'isOpen.valueisOpen.value');
  298. if (isOpen.value) {
  299. isOpen.value = false;
  300. return;
  301. }
  302. try {
  303. balance.value = [
  304. {
  305. amount: 0,
  306. currency: "USD",
  307. value: "USD",
  308. },
  309. ];
  310. if (!currentCard.value?.cardNo) return;
  311. const res = await ucardApi.ucardBalance({
  312. cardNo: currentCard.value?.cardNo,
  313. uniqueId: currentCard.value?.uniqueId,
  314. });
  315. if (res.code == 200) {
  316. currency.value = "USD";
  317. amount.value = res.data.amount;
  318. isOpen.value = true;
  319. } else {
  320. balance.value = [
  321. {
  322. amount: 0,
  323. currency: "USD",
  324. value: "USD",
  325. },
  326. ];
  327. currency.value = "USD";
  328. amount.value = 0;
  329. isOpen.value = false;
  330. }
  331. } catch (error: any) {
  332. showToast(error?.message || String(error));
  333. balance.value = [
  334. {
  335. amount: 0,
  336. currency: "USD",
  337. value: "USD",
  338. },
  339. ];
  340. isOpen.value = false;
  341. }
  342. }
  343. function toggleCardNo(card: any, event: MouseEvent) {
  344. if (!card.id) return;
  345. if (!(card.status == "success" && card?.activateStatus)) return;
  346. event.stopPropagation();
  347. isFlipping.value[card.id] = !isFlipping.value[card.id];
  348. showCardNo.value[card.id] = !showCardNo.value[card.id];
  349. }
  350. function handleSwiperChange(e: any) {
  351. const newIndex = e?.detail?.current ?? 0;
  352. currentIndex.value = newIndex;
  353. // 切换卡片时重置卡号显示状态
  354. cardList.value.forEach((card) => {
  355. if (!card.id) return;
  356. showCardNo.value[card.id] = false;
  357. isFlipping.value[card.id] = false;
  358. });
  359. }
  360. async function ucardOperation(card, type) {
  361. if (card.freezeType == "2" && type != "5") {
  362. showToast(t("card.Msg.m10"));
  363. return;
  364. }
  365. if (card.blocked) {
  366. showToast(t("card.New2.p6"));
  367. return;
  368. }
  369. if (card.freezeStatus != "success") {
  370. if (card.freezeType == "1") {
  371. showToast(t("card.Btn.b14"));
  372. } else {
  373. showToast(t("card.Btn.b15"));
  374. }
  375. return;
  376. }
  377. router.push({
  378. path: "/pages/card/operations",
  379. query: { id: card.id, type },
  380. });
  381. }
  382. function viewApply(item: any) {
  383. router.push({
  384. path: "/pages/apply-record/detail",
  385. query: {
  386. id: item.id,
  387. type: "card",
  388. },
  389. });
  390. }
  391. function goToTransactionDetail(record: TransactionInfo) {
  392. const amount = Number(record.amount || 0);
  393. const fee = Number(record.fee || 0);
  394. const normalizedStatus = normalizeStatus(record.status);
  395. const detailPayload = {
  396. category: 'recharge' as const,
  397. orderNo: record.merchantOrderNo || record.orderNo || '',
  398. type: '充值',
  399. amount,
  400. fee,
  401. actualAmount: amount - fee,
  402. currency: record.currency || 'USD',
  403. orderStatus: normalizedStatus,
  404. statusMessage: getStatusText(record.status),
  405. createTime: formatDateTime(record.addTime || record.time),
  406. completeTime: '',
  407. merchant: '',
  408. bankCard: record.cardNumber || '',
  409. remark: record.remark || '',
  410. approvalSteps: [] as any[]
  411. };
  412. cardStore.saveOrderDetail(detailPayload);
  413. uni.navigateTo({
  414. url: '/pages/recharge-record/detail'
  415. });
  416. }
  417. watch(
  418. currentIndex,
  419. (newIndex) => {
  420. if (cardList.value[newIndex]) {
  421. currentCard.value = cardList.value[newIndex];
  422. if (
  423. cardList.value[newIndex].cardNo &&
  424. cardList.value[newIndex].activateStatus == "success"
  425. ) {
  426. isOpen.value = false;
  427. }
  428. }
  429. },
  430. { immediate: true }
  431. );
  432. onMounted(async () => {
  433. cardList.value.forEach((card) => {
  434. showCardNo.value[card.id] = false;
  435. isFlipping.value[card.id] = false;
  436. });
  437. });
  438. onUnmounted(() => {
  439. debouncedGetBalance.cancel();
  440. });
  441. </script>
  442. <style scoped lang="scss">
  443. @import "@/uni.scss";
  444. .page {
  445. padding: 0 px2rpx(24) px2rpx(130) px2rpx(24);
  446. }
  447. .card-wrapper {
  448. position: absolute;
  449. width: 100%;
  450. height: 100%;
  451. transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  452. will-change: transform;
  453. }
  454. .card-info {
  455. background: url(/static/images/card/physical.png) no-repeat center center;
  456. background-size: cover;
  457. border-radius: px2rpx(16);
  458. padding: px2rpx(16);
  459. color: var(--main-yellow);
  460. width: 100%;
  461. height: 100%;
  462. display: flex;
  463. justify-content: flex-start;
  464. align-items: baseline;
  465. flex-wrap: wrap;
  466. /* transform-style: preserve-3d;
  467. transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); */
  468. /* flex-direction: column; */
  469. .logo {
  470. width: px2rpx(120);
  471. height: auto;
  472. margin-bottom: px2rpx(16);
  473. }
  474. .card-type {
  475. width: px2rpx(74);
  476. height: px2rpx(39);
  477. position: absolute;
  478. bottom: px2rpx(16);
  479. right: px2rpx(16);
  480. z-index: 1;
  481. }
  482. .card-name {
  483. position: absolute;
  484. top: px2rpx(16);
  485. right: px2rpx(16);
  486. font-size: var(--font-size-14);
  487. font-weight: 500;
  488. color: #fff;
  489. font-family: Rubik;
  490. }
  491. &.flipping {
  492. transform: rotateX(360deg);
  493. }
  494. .zw {
  495. position: absolute;
  496. left: px2rpx(16);
  497. bottom: px2rpx(16);
  498. color: #fff;
  499. font-family: Rubik;
  500. font-size: px2rpx(12);
  501. font-style: normal;
  502. font-weight: 700;
  503. display: flex;
  504. align-items: center;
  505. }
  506. .card-b {
  507. display: flex;
  508. flex-wrap: wrap;
  509. justify-content: center;
  510. align-items: center;
  511. gap: px2rpx(16);
  512. span {
  513. display: block;
  514. }
  515. .valid {
  516. font-size: var(--font-size-14);
  517. font-weight: 500;
  518. color: var(--black);
  519. gap: px2rpx(8);
  520. line-height: px2rpx(20);
  521. }
  522. .lable {
  523. font-size: var(--font-size-10);
  524. font-weight: 400;
  525. }
  526. .cvv {
  527. display: flex;
  528. align-items: center;
  529. gap: px2rpx(8);
  530. font-size: var(--font-size-14);
  531. font-weight: 500;
  532. color: var(--black);
  533. .copy,
  534. .icon {
  535. display: flex;
  536. }
  537. }
  538. }
  539. .copy {
  540. width: px2rpx(18);
  541. height: px2rpx(18);
  542. border-radius: 50%;
  543. background: rgba(255, 255, 255, 0.6);
  544. display: flex;
  545. align-items: center;
  546. justify-content: center;
  547. cursor: pointer;
  548. color: #000;
  549. }
  550. }
  551. .card-front,
  552. .card-back {
  553. position: absolute;
  554. top: 0;
  555. left: 0;
  556. width: 100%;
  557. height: 100%;
  558. padding: px2rpx(24) px2rpx(20) px2rpx(16) px2rpx(20);
  559. backface-visibility: hidden;
  560. -webkit-backface-visibility: hidden;
  561. }
  562. .card-back {
  563. transform: rotateY(180deg);
  564. }
  565. .owner {
  566. font-size: var(--font-size-14);
  567. line-height: 2;
  568. margin-bottom: px2rpx(8);
  569. display: flex;
  570. align-items: center;
  571. gap: px2rpx(8);
  572. i {
  573. font-size: var(--font-size-18);
  574. color: var(--main-yellow);
  575. }
  576. }
  577. .number {
  578. color: var(--black);
  579. font-size: var(--font-size-18);
  580. font-weight: 500;
  581. line-height: 3;
  582. margin: px2rpx(20) 0;
  583. display: flex;
  584. align-items: center;
  585. gap: px2rpx(8);
  586. }
  587. .actions {
  588. display: flex;
  589. justify-content: space-between;
  590. margin: px2rpx(20) 0 px2rpx(16) 0;
  591. gap: px2rpx(8);
  592. background-color: #fff;
  593. width: 100%;
  594. }
  595. .action-btn {
  596. color: var(--white);
  597. border: none;
  598. border-radius: px2rpx(12);
  599. padding: 0 px2rpx(12);
  600. font-size: var(--font-size-14);
  601. cursor: pointer;
  602. display: flex;
  603. flex-direction: column;
  604. align-items: center;
  605. gap: px2rpx(8);
  606. transition: all 0.3s ease;
  607. text-align: center;
  608. color: #1a1a1a;
  609. flex: 1;
  610. height: px2rpx(100);
  611. flex-shrink: 0;
  612. border-radius: px2rpx(15);
  613. box-shadow: 0px 5px 30px 0px rgba(5, 0, 1, 0.05);
  614. .icon {
  615. margin: px2rpx(16) 0 px2rpx(4) 0;
  616. }
  617. span {
  618. line-height: px2rpx(20);
  619. }
  620. }
  621. .action-btn1 {
  622. background: rgba(153, 153, 153, 0.03) !important;
  623. color: #999 !important;
  624. pointer-events: none !important;
  625. }
  626. .balance-wrap {
  627. display: flex;
  628. align-items: center;
  629. justify-content: space-between;
  630. margin: px2rpx(24) 0;
  631. font-size: var(--font-size-14);
  632. }
  633. .balance-wrap1 {
  634. background-color: #f9fafb;
  635. border-radius: px2rpx(12);
  636. padding: px2rpx(16) px2rpx(12);
  637. display: flex;
  638. align-items: center;
  639. justify-content: space-between;
  640. margin-bottom: px2rpx(12);
  641. .global-con-l {
  642. display: flex;
  643. width: px2rpx(164);
  644. align-items: center;
  645. gap: px2rpx(12);
  646. border-radius: px2rpx(12);
  647. // box-shadow: 0px 5px 30px 0px rgba(5, 0, 1, 0.05);
  648. color: var(--white);
  649. p {
  650. color: #000;
  651. font-family: Roboto;
  652. font-size: px2rpx(16);
  653. font-style: normal;
  654. font-weight: 600;
  655. line-height: px2rpx(24);
  656. }
  657. .l-img {
  658. width: px2rpx(36);
  659. height: px2rpx(36);
  660. border: 1px solid #f4f4f4;
  661. border-radius: 50%;
  662. }
  663. }
  664. }
  665. .balance-content {
  666. font-size: var(--font-size-20);
  667. color: var(--white);
  668. font-weight: bold;
  669. }
  670. .balance-title {
  671. font-size: var(--font-size-12);
  672. color: var(--white);
  673. }
  674. .currency {
  675. display: flex;
  676. align-items: center;
  677. font-size: var(--font-size-14);
  678. margin-right: px2rpx(12);
  679. color: var(--white);
  680. }
  681. .flag {
  682. width: px2rpx(24);
  683. height: px2rpx(24);
  684. border-radius: 50%;
  685. margin-right: px2rpx(6);
  686. }
  687. .balance {
  688. display: flex;
  689. align-items: center;
  690. font-size: var(--font-size-14);
  691. font-weight: bold;
  692. color: var(--white);
  693. .balance-amount {
  694. display: inline-flex;
  695. padding-right: px2rpx(8);
  696. }
  697. }
  698. .transactions {
  699. border-radius: px2rpx(16);
  700. margin-bottom: px2rpx(16);
  701. padding-bottom: px2rpx(16);
  702. }
  703. .trans-icon {
  704. width: px2rpx(48);
  705. height: px2rpx(48);
  706. display: flex;
  707. background: var(--main-bg);
  708. box-shadow: 0 4px 12px rgba(214, 255, 0, 0.1);
  709. border-radius: px2rpx(8);
  710. margin-right: px2rpx(12);
  711. align-items: center;
  712. justify-content: center;
  713. .trans-icon-inner {
  714. width: px2rpx(48);
  715. height: px2rpx(48);
  716. background: rgba(212, 206, 206, 0.24);
  717. border-radius: 50%;
  718. display: flex;
  719. align-items: center;
  720. justify-content: center;
  721. }
  722. i {
  723. color: #000;
  724. width: px2rpx(24);
  725. height: px2rpx(24);
  726. border-radius: 50%;
  727. }
  728. }
  729. .trans-header {
  730. display: flex;
  731. justify-content: space-between;
  732. align-items: center;
  733. margin: px2rpx(32) 0;
  734. color: var(--white);
  735. i {
  736. font-size: var(--font-size-20);
  737. cursor: pointer;
  738. }
  739. }
  740. ::v-deep .van-calendar {
  741. background: var(--action-bg);
  742. }
  743. ::v-deep .van-calendar__month-mark {
  744. display: none;
  745. }
  746. ::v-deep .van-calendar__header-subtitle {
  747. color: var(--white);
  748. }
  749. ::v-deep .van-calendar__header-title {
  750. color: var(--white);
  751. }
  752. ::v-deep .van-calendar__month-title {
  753. color: var(--main-yellow);
  754. }
  755. .trans-title {
  756. font-size: var(--font-size-20);
  757. color: var(--white);
  758. font-weight: bold;
  759. }
  760. .date-field {
  761. width: px2rpx(200);
  762. :deep(.van-field__control) {
  763. color: var(--white);
  764. }
  765. :deep(.van-field__placeholder) {
  766. color: var(--gray);
  767. }
  768. }
  769. :deep(.van-popup) {
  770. background: var(--action-bg);
  771. }
  772. :deep(.van-picker__toolbar) {
  773. background: var(--action-bg);
  774. border-bottom: 1px solid var(--border);
  775. }
  776. :deep(.van-picker__title) {
  777. color: var(--white);
  778. }
  779. :deep(.van-picker__confirm) {
  780. color: var(--main-yellow);
  781. }
  782. :deep(.van-picker__cancel) {
  783. color: var(--gray);
  784. }
  785. :deep(.van-picker-column) {
  786. color: var(--white);
  787. }
  788. :deep(.van-picker-column__item) {
  789. color: var(--white);
  790. }
  791. :deep(.van-picker-column__item--selected) {
  792. color: var(--main-yellow);
  793. }
  794. .transaction {
  795. display: flex;
  796. align-items: center;
  797. justify-content: space-between;
  798. padding: px2rpx(10) 0;
  799. /* border-bottom: 1px solid var(--border); */
  800. font-size: var(--font-size-16);
  801. }
  802. .transaction:last-child {
  803. border-bottom: none;
  804. }
  805. .trans-left {
  806. width: px2rpx(200);
  807. }
  808. .trans-right {
  809. width: px2rpx(100);
  810. div {
  811. text-align: right;
  812. }
  813. }
  814. .trans-type {
  815. color: var(--white);
  816. font-size: var(--font-size-16);
  817. font-weight: 600;
  818. line-height: 2;
  819. }
  820. .trans-desc {
  821. font-size: var(--font-size-12);
  822. color: var(--gray);
  823. }
  824. .trans-amount {
  825. font-size: var(--font-size-16);
  826. font-weight: 600;
  827. color: var(--white);
  828. line-height: 2;
  829. }
  830. .trans-date {
  831. color: var(--gray);
  832. font-size: var(--font-size-12);
  833. }
  834. .card-swiper {
  835. width: 100%;
  836. margin: px2rpx(20) 0 0 0;
  837. position: relative;
  838. overflow: hidden;
  839. display: flex;
  840. justify-content: center;
  841. flex-direction: column;
  842. align-items: center;
  843. padding-bottom: px2rpx(5);
  844. }
  845. .swiper-container {
  846. position: relative;
  847. width: 100%;
  848. height: px2rpx(219);
  849. touch-action: pan-y pinch-zoom;
  850. user-select: none;
  851. }
  852. .card-info {
  853. position: absolute;
  854. width: 100%;
  855. height: 100%;
  856. transition: transform 0.3s ease;
  857. will-change: transform;
  858. box-sizing: border-box;
  859. }
  860. .swiper-controls {
  861. display: flex;
  862. align-items: center;
  863. justify-content: center;
  864. margin-top: px2rpx(12);
  865. gap: px2rpx(16);
  866. }
  867. .swiper-btn {
  868. background: var(--action-bg);
  869. border: none;
  870. border-radius: 50%;
  871. width: px2rpx(32);
  872. height: px2rpx(32);
  873. display: flex;
  874. align-items: center;
  875. justify-content: center;
  876. cursor: pointer;
  877. color: var(--main-yellow);
  878. &:disabled {
  879. opacity: 0.5;
  880. cursor: not-allowed;
  881. }
  882. i {
  883. font-size: var(--font-size-20);
  884. }
  885. }
  886. .swiper-dots {
  887. display: flex;
  888. gap: px2rpx(8);
  889. }
  890. .dot {
  891. width: px2rpx(8);
  892. height: px2rpx(8);
  893. border-radius: 50%;
  894. background: var(--action-bg);
  895. cursor: pointer;
  896. transition: all 0.3s ease;
  897. &.active {
  898. background: var(--main-yellow);
  899. transform: scale(1.2);
  900. }
  901. }
  902. .swiper-indicators {
  903. display: flex;
  904. justify-content: center;
  905. margin-top: px2rpx(16);
  906. gap: px2rpx(8);
  907. }
  908. .indicator-dot {
  909. width: px2rpx(8);
  910. height: px2rpx(8);
  911. border-radius: 50%;
  912. background: var(--gray);
  913. cursor: pointer;
  914. transition: all 0.3s ease;
  915. &.active {
  916. background: var(--main-yellow);
  917. transform: scale(1.2);
  918. }
  919. }
  920. .flags {
  921. width: px2rpx(20);
  922. height: px2rpx(20);
  923. cursor: pointer;
  924. position: absolute;
  925. top: px2rpx(10);
  926. right: px2rpx(10);
  927. }
  928. .balance-content1 {
  929. margin-bottom: px2rpx(20);
  930. font-size: var(--font-size-20);
  931. color: var(--white);
  932. font-weight: bold;
  933. }
  934. .cwg-btn {
  935. margin-top: px2rpx(36);
  936. }
  937. .custom-toast {
  938. background: rgba(0, 0, 0, 0) !important;
  939. color: #fff;
  940. font-size: px2rpx(14);
  941. padding: px2rpx(10);
  942. border-radius: px2rpx(8);
  943. display: flex;
  944. align-items: center;
  945. gap: px2rpx(8);
  946. .van-icon {
  947. width: px2rpx(24);
  948. height: px2rpx(24);
  949. }
  950. .van-icon--copy {
  951. color: #fff;
  952. }
  953. }
  954. .actions1 {
  955. width: 100%;
  956. padding: px2rpx(20);
  957. margin-top: px2rpx(20);
  958. border: 1px solid rgba(214, 255, 0, 0.2);
  959. box-shadow: 0 0.053333rem 0.213333rem rgba(0, 0, 0, 0.08);
  960. }
  961. .card-btn {
  962. width: 100%;
  963. .yue {
  964. display: flex;
  965. align-items: center;
  966. box-sizing: border-box;
  967. line-height: px2rpx(50);
  968. width: 100%;
  969. height: px2rpx(50);
  970. background: rgba(208, 37, 55, 0.03);
  971. border-radius: px2rpx(8);
  972. text-align: left;
  973. padding-left: px2rpx(20);
  974. margin-bottom: px2rpx(20);
  975. }
  976. .a {
  977. font-size: px2rpx(14);
  978. color: #333333;
  979. font-weight: bold;
  980. padding: 0;
  981. }
  982. .v {
  983. font-size: px2rpx(14);
  984. color: #eb3f57;
  985. padding: 0;
  986. }
  987. .btn {
  988. width: px2rpx(193);
  989. height: px2rpx(40);
  990. border: 1px solid #eb3f57;
  991. border-radius: px2rpx(4);
  992. text-align: center;
  993. color: #eb3f57;
  994. font-size: px2rpx(16);
  995. font-family: Roboto;
  996. font-weight: 600;
  997. line-height: px2rpx(40);
  998. cursor: pointer;
  999. user-select: none;
  1000. }
  1001. .btn1 {
  1002. width: px2rpx(100);
  1003. height: px2rpx(94);
  1004. background: rgba(208, 37, 55, 0.03);
  1005. border: 1px solid rgba(208, 37, 55, 0.03);
  1006. border-radius: px2rpx(15);
  1007. text-align: center;
  1008. color: #eb3f57;
  1009. font-size: px2rpx(16);
  1010. font-family: Roboto;
  1011. font-weight: 600;
  1012. line-height: px2rpx(20);
  1013. padding: 0 px2rpx(8);
  1014. cursor: pointer;
  1015. user-select: none;
  1016. display: flex;
  1017. align-items: center;
  1018. justify-content: center;
  1019. flex-direction: column;
  1020. gap: px2rpx(8);
  1021. &:hover {
  1022. border: 1px solid #eb3f57;
  1023. }
  1024. img {
  1025. width: px2rpx(28);
  1026. height: px2rpx(28);
  1027. vertical-align: middle;
  1028. margin-right: px2rpx(5);
  1029. }
  1030. }
  1031. .btn2 {
  1032. width: px2rpx(162);
  1033. }
  1034. .btn3 {
  1035. background: rgba(153, 153, 153, 0.03) !important;
  1036. color: #999 !important;
  1037. pointer-events: none !important;
  1038. }
  1039. }
  1040. .status {
  1041. position: absolute;
  1042. top: px2rpx(15);
  1043. right: -px2rpx(30);
  1044. padding: px2rpx(4) px2rpx(40);
  1045. background: rgba(235, 63, 87, 0.1);
  1046. color: #eb3f57;
  1047. font-size: px2rpx(14);
  1048. font-weight: 500;
  1049. text-align: center;
  1050. transform: rotate(45deg);
  1051. transform-origin: center center;
  1052. }
  1053. .status1 {
  1054. position: absolute;
  1055. top: px2rpx(15);
  1056. right: -px2rpx(30);
  1057. padding: px2rpx(4) px2rpx(40);
  1058. background: rgba(67, 68, 68, 0.1);
  1059. color: #434444;
  1060. font-size: px2rpx(14);
  1061. font-weight: 500;
  1062. text-align: center;
  1063. transform: rotate(45deg);
  1064. transform-origin: center center;
  1065. }
  1066. .transaction-list {
  1067. display: flex;
  1068. flex-direction: column;
  1069. .transaction-item {
  1070. display: flex;
  1071. justify-content: space-between;
  1072. align-items: center;
  1073. padding: px2rpx(16) 0;
  1074. border-bottom: 1px solid #f3f4f6;
  1075. }
  1076. .transaction-item:last-child {
  1077. border-bottom: none;
  1078. }
  1079. .transaction-left {
  1080. display: flex;
  1081. align-items: center;
  1082. gap: px2rpx(12);
  1083. }
  1084. .transaction-icon {
  1085. width: px2rpx(40);
  1086. height: px2rpx(40);
  1087. background-color: #f9fafb;
  1088. border-radius: 50%;
  1089. display: flex;
  1090. align-items: center;
  1091. justify-content: center;
  1092. }
  1093. .icon-text {
  1094. font-size: px2rpx(20);
  1095. color: #6b7280;
  1096. }
  1097. .transaction-info {
  1098. display: flex;
  1099. flex-direction: column;
  1100. gap: px2rpx(4);
  1101. }
  1102. .transaction-status {
  1103. font-size: px2rpx(14);
  1104. color: #111827;
  1105. }
  1106. .transaction-time {
  1107. font-size: px2rpx(12);
  1108. color: #9ca3af;
  1109. }
  1110. .transaction-right {
  1111. display: flex;
  1112. flex-direction: column;
  1113. align-items: flex-end;
  1114. }
  1115. .transaction-amount {
  1116. font-size: px2rpx(16);
  1117. font-weight: 600;
  1118. color: #111827;
  1119. }
  1120. .transaction-amount.negative {
  1121. color: #ef4444;
  1122. }
  1123. }
  1124. </style>