From 89848ba321038e9760da8f4407338a730f88a413 Mon Sep 17 00:00:00 2001 From: haomingming Date: Fri, 6 Mar 2026 14:40:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E8=B4=A6=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 12 ++- pages_app/idcardAuth/bankCardList.vue | 100 +++++++++++++----- pages_app/idcardAuth/idcardAuth.vue | 89 ++++++++++++---- pages_app/myAccount/billDetail.vue | 135 ++++++++++++++++++++++++ pages_app/myAccount/billDetails.vue | 28 ++++- pages_app/myAccount/myAccount.vue | 31 ++++-- pages_app/myAccount/withdrawal.vue | 141 ++++++++++++++++++++------ static/account_icon.png | Bin 0 -> 1562 bytes static/withdrawals.png | Bin 0 -> 1530 bytes 9 files changed, 442 insertions(+), 94 deletions(-) create mode 100644 pages_app/myAccount/billDetail.vue create mode 100644 static/account_icon.png create mode 100644 static/withdrawals.png diff --git a/pages.json b/pages.json index 42f280e..980224a 100644 --- a/pages.json +++ b/pages.json @@ -901,6 +901,16 @@ } } }, + { + "path": "myAccount/billDetail", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "详情", + "app": { + "bounce": "none" + } + } + }, { "path": "myAccount/withdrawal", "style": { @@ -1686,7 +1696,7 @@ "list": [ { "name": "", - "path": "pages_app/patientMsg/patientMsg", + "path": "/pages_app/myAccount/myAccount", "query": "" } ] diff --git a/pages_app/idcardAuth/bankCardList.vue b/pages_app/idcardAuth/bankCardList.vue index 9b2d8c9..b4b6868 100644 --- a/pages_app/idcardAuth/bankCardList.vue +++ b/pages_app/idcardAuth/bankCardList.vue @@ -19,26 +19,36 @@ - - + + @@ -53,12 +63,17 @@ import navTo from '@/utils/navTo'; import api from '@/api/api'; import empty from "@/components/empty/empty.vue" const bankCards = ref([]); +const openedSwipeUuid = ref(''); import { onLoad,onBackPress } from '@dcloudio/uni-app'; const from = ref(''); +const returnTo = ref(''); onLoad((options) => { if(options.from){ from.value = options.from; } + if (options.returnTo) { + returnTo.value = decodeURIComponent(options.returnTo); + } }); onBackPress(() => { if(!from.value){ @@ -85,8 +100,11 @@ const goBack = () => { }; const addBankCard = () => { + const target = returnTo.value + ? `/pages_app/idcardAuth/idcardAuth?returnTo=${encodeURIComponent(returnTo.value)}` + : '/pages_app/idcardAuth/idcardAuth'; navTo({ - url: '/pages_app/idcardAuth/idcardAuth' + url: target }); }; @@ -146,6 +164,13 @@ const handleDeleteBankCard = (card) => { }); }; +const onSwipeChange = (e, card) => { + const state = typeof e === 'string' + ? e + : e?.position || e?.show || e?.detail?.position || e?.detail?.show || 'none'; + openedSwipeUuid.value = state === 'right' ? card.uuid : ''; +}; + // 获取银行logo文字 const getBankLogo = (bankName) => { const bankLogos = { @@ -181,7 +206,6 @@ onMounted(() => { :deep(.uni-nav-bar-right-text) { font-size: 32rpx; - font-weight: 600; } } @@ -189,15 +213,41 @@ onMounted(() => { .card-list { margin-top: calc(var(--status-bar-height) + 44px); padding: 30rpx; + + .swipe-right { + height: 100%; + display: flex; + align-items: stretch; + padding-right: 0; + box-sizing: border-box; + } + + .card-delete-btn { + min-width: 112rpx; + height: 100%; + padding: 0 24rpx; + border-radius: 0 16rpx 16rpx 0; + background: #E60012; + color: #ffffff; + font-size: 24rpx; + font-weight: 600; + display: flex; + align-items: center; + justify-content: center; + } .card-item { background: #ffffff; border-radius: 16rpx; padding: 30rpx; - margin-bottom: 20rpx; display: flex; align-items: center; box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); + + &.is-swiping { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } .card-logo { margin-right: 30rpx; @@ -242,12 +292,6 @@ onMounted(() => { } } - .card-delete { - font-size: 30rpx; - font-weight: 600; - color: #E60012; - padding: 8rpx 0 8rpx 20rpx; - } } } diff --git a/pages_app/idcardAuth/idcardAuth.vue b/pages_app/idcardAuth/idcardAuth.vue index aae72be..399b067 100644 --- a/pages_app/idcardAuth/idcardAuth.vue +++ b/pages_app/idcardAuth/idcardAuth.vue @@ -88,9 +88,11 @@ 银行卡号 @@ -103,7 +105,7 @@ 手机号 { + if (options.returnTo) { + returnTo.value = decodeURIComponent(options.returnTo); + } +}); const maskedMobile = computed(() => { const m = formData.value.mobile || ''; @@ -207,6 +217,18 @@ const maskedMobile = computed(() => { } return m || '***********'; }); + +const formatCardNumber = (value) => { + const digits = String(value || '').replace(/\D/g, '').slice(0, 19); + return digits.replace(/(\d{4})(?=\d)/g, '$1 '); +}; + +const cardNumberDisplay = computed(() => formatCardNumber(formData.value.cardNumber)); + +const onCardNumberInput = (e) => { + const value = e?.detail?.value || ''; + formData.value.cardNumber = String(value).replace(/\D/g, '').slice(0, 19); +}; const goBack = () => { uni.navigateBack(); }; @@ -344,9 +366,15 @@ const onConfirmSms = async () => { }); if (res.code === 200) { uni.showToast({ title: '银行卡添加成功', icon: 'none' }); - navTo({ - url: '/pages_app/idcardAuth/bankCardList' - }); + if (returnTo.value) { + uni.redirectTo({ + url: returnTo.value + }); + } else { + navTo({ + url: '/pages_app/idcardAuth/bankCardList' + }); + } } else { uni.showToast({ title: res.msg || '银行卡添加失败', icon: 'none' }); } @@ -484,42 +512,55 @@ const onCancelSms = () => { .form-item { - margin-bottom: 30rpx; display: flex; align-items: center; + position: relative; border-bottom: 2rpx solid #eee; - padding: 0 30rpx 20rpx; + height: 92rpx; + padding: 0 30rpx; + box-sizing: border-box; &:last-child { margin-bottom: 0; - padding-bottom: 0; } .form-label { - display: block; + display: flex; + align-items: center; + justify-content: flex-end; + height: 80rpx; font-size: 28rpx; color: #000000; width: 120rpx; font-weight: 500; + text-align: right; + text-align-last: auto; + letter-spacing: 0; + white-space: nowrap; + margin-right: 10rpx; } .form-input { flex: 1; height: 80rpx; + min-height: 80rpx; + line-height: 80rpx; padding: 0 20rpx; font-size: 28rpx; background: #ffffff; border: none; outline: none; + box-sizing: border-box; &:focus { border-color: #8B2316; } } .info-icon { - flex:1; position: absolute; - right: 20rpx; + right: 30rpx; + top: 50%; + transform: translateY(-50%); width: 40rpx; height: 40rpx; border-radius: 50%; @@ -539,20 +580,26 @@ const onCancelSms = () => { display: flex; align-items: center; position: relative; - width: 80%; + height: 80rpx; + flex: 1; + padding-right: 56rpx; + box-sizing: border-box; .form-input { - flex: 9; - height: 80rpx; - padding: 0 20rpx; + flex: 1; + height: 100%; + min-height: 100%; + line-height: 80rpx; + padding: 0; font-size: 28rpx; background: #ffffff; border: none; border-radius: 0; outline: none; - - &:focus { - /* 去除边框后无需变更边框颜色 */ + box-sizing: border-box; + + &.card-number-input.is-filled { + font-weight: 600; } } @@ -674,6 +721,10 @@ const onCancelSms = () => { background: #eeeeee; color: #8B2316; font-size: 26rpx; + padding: 0; + display: flex; + align-items: center; + justify-content: center; } .sms-actions { diff --git a/pages_app/myAccount/billDetail.vue b/pages_app/myAccount/billDetail.vue new file mode 100644 index 0000000..395c5f9 --- /dev/null +++ b/pages_app/myAccount/billDetail.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/pages_app/myAccount/billDetails.vue b/pages_app/myAccount/billDetails.vue index b48504e..d308c20 100644 --- a/pages_app/myAccount/billDetails.vue +++ b/pages_app/myAccount/billDetails.vue @@ -35,7 +35,7 @@ @scrolltolower="onLoadMore" :lower-threshold="100" > - + {{ item.typeName }} {{ item.userName }} @@ -65,6 +65,7 @@