From bbaba61b51820718d7d3392580852bdda6d37bbd Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Sat, 20 Dec 2025 23:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=B4=A6=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user.ts | 9 +++++- src/bundle/wallet/bill.vue | 53 +++++++++++++++++++++++++------- src/bundle/wallet/pay-bill.vue | 56 ++++++++++++++++++++++++++++++++++ src/bundle/wallet/wallet.vue | 22 ++++++++----- src/pages.json | 8 +++++ 5 files changed, 129 insertions(+), 19 deletions(-) create mode 100644 src/bundle/wallet/pay-bill.vue diff --git a/src/api/user.ts b/src/api/user.ts index 203d57f..640d211 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -163,4 +163,11 @@ export function checkDouyinCoupon(data: ICheckDouyinCouponParams) { */ export function getUserMember() { return http.Post('/api/user/UserMember') -} \ No newline at end of file +} + +/** + * 流水账单详情 + */ +export function getUserBillDetails(id: number) { + return http.Post('/api/user/accountDetails', {id}) +} diff --git a/src/bundle/wallet/bill.vue b/src/bundle/wallet/bill.vue index da385fb..7242092 100644 --- a/src/bundle/wallet/bill.vue +++ b/src/bundle/wallet/bill.vue @@ -16,7 +16,7 @@ - 订单号:1744601722882174 + 订单号:{{ bill.source_sn }} @@ -24,11 +24,11 @@ 消费类型 - 茶艺师预定 + {{ billType }} 交易方式 - 微信支付 + {{ bill.change_object == 1 ? '余额支付' : '微信支付' }} 消费金额 @@ -39,22 +39,22 @@ - + - + 消费门店 - 茶艺师的昵称 - + {{ bill.store.name }} + 下单时间 - 2025-04-25 04:43 + {{ bill.create_time }} 支付时间 - 2025-04-25 04:43 + {{ bill.create_time }} @@ -63,8 +63,39 @@ diff --git a/src/bundle/wallet/wallet.vue b/src/bundle/wallet/wallet.vue index 78d6bf1..9949dd7 100644 --- a/src/bundle/wallet/wallet.vue +++ b/src/bundle/wallet/wallet.vue @@ -89,6 +89,7 @@ import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js" import { useUserStore } from '@/store' import { getUserInfo, getUserMoneyLog } from '@/api/user' +import { router } from '@/utils/tools' const OSS = inject('OSS') const userStore = useUserStore() @@ -156,18 +157,25 @@ * 去充值 */ handleToRecharge: () => { - uni.navigateTo({ - url: '/bundle/wallet/recharge' - }) + router.navigateTo('/bundle/wallet/recharge') }, /** * 跳转对应账单详情 */ - handleToBillDetail: (id: number) => { - uni.navigateTo({ - url: `/bundle/wallet/bill?id=${id}` - }) + handleToBillDetail: (item: any) => { + switch (item.change_type) { + case 1: // 包间预定 + case 2: // 包间续订 + case 3: // 套餐购买 + case 4: // 开通会员 + router.navigateTo(`/bundle/wallet/bill?id=${item.id}`) + break + case 5: // 退款 + case 6: // 充值 + router.navigateTo(`/bundle/wallet/pay-bill?id=${item.id}`) + break + } } } diff --git a/src/pages.json b/src/pages.json index d7bbdb8..bd5329a 100644 --- a/src/pages.json +++ b/src/pages.json @@ -316,6 +316,14 @@ "navigationStyle": "custom" } }, + { + "path": "wallet/pay-bill", + "type": "page", + "layout": "default", + "style": { + "navigationStyle": "custom" + } + }, { "path": "wallet/recharge", "type": "page",