From d87d1b5f8dacc466ca8521258b4cfd549e824df4 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Sat, 14 Mar 2026 18:24:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=94=AF?= =?UTF-8?q?=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/wallet/list.vue | 8 +++--- src/pages/wallet/recharge.vue | 48 +++++++++++++---------------------- 2 files changed, 22 insertions(+), 34 deletions(-) diff --git a/src/pages/wallet/list.vue b/src/pages/wallet/list.vue index d051300..284a7d5 100644 --- a/src/pages/wallet/list.vue +++ b/src/pages/wallet/list.vue @@ -148,13 +148,13 @@ const doTransferMoney = (v: any) => { :key="i" @tap="router.jump('/pages/wallet/detail', { id: v.id })"> - - 卡号: {{ v.cardNumber }} + + 卡号: {{ v.cardNumber }} - @@ -182,7 +182,7 @@ const doTransferMoney = (v: any) => { @tap.stop="openFreezeDialog(v)"> 申请冻结 - 去充值 diff --git a/src/pages/wallet/recharge.vue b/src/pages/wallet/recharge.vue index a0ac185..c19c2fa 100644 --- a/src/pages/wallet/recharge.vue +++ b/src/pages/wallet/recharge.vue @@ -9,14 +9,14 @@ import { walletApi, payApi } from "@@/api" const data = { payType: [ // { text: "模拟支付", disabled: false, type: "0", value: "mock" }, - { text: "微信支付", disabled: true, type: "1", value: "wx_pub" }, - { text: "支付宝支付", disabled: true, type: "2", value: "alipay_wap" }, + { text: "微信支付", disabled: false, type: "1", value: "wx_pub" }, + // { text: "支付宝支付", disabled: false, type: "2", value: "alipay_wap" }, ], } const state = reactive({ walletId: null, - currentPayType: null, + currentPayType: "1", currentRecharge: 0, userInfo: {}, detail: {}, @@ -65,21 +65,15 @@ const doPay = async () => { const targetRecharge = state.rechargeList[state.currentRecharge] const targetPayType = data.payType[state.currentPayType] if (isEmpty(targetRecharge)) throw new Error() - const _pa = { - payPrice: targetRecharge.payPrice, - walletId: state.walletId, - packageId: targetRecharge.id, - } - const { data: createData, code: createCode }: any = await walletApi.recharge(_pa) - console.log(createCode, "createCode") - if (createCode != 0) throw new Error() - const _payPa = { - id: createData.payOrderId, - walletId: state.walletId, - channelCode: targetPayType.value, - channelExtras: {}, - } + // const _pa = { + // payPrice: targetRecharge.payPrice, + // walletId: state.walletId, + // packageId: targetRecharge.id, + // } + // const { data: createData, code: createCode }: any = await walletApi.recharge(_pa) + // if (createCode != 0) throw new Error() + getDetail() uni.hideLoading() uni.showToast({ title: "充值成功", icon: "none" }) @@ -110,26 +104,20 @@ const doPay = async () => { 充值 - + ¥{{ hooks.useMoney(v.payPrice) }} 支付 - + - + 确认充值 @@ -140,7 +128,7 @@ const doPay = async () => { background: #e9f5fe; border: 1px solid #e9f5fe !important; - & > text { + &>text { color: #0094ff !important; } }