From 0401612bad96d33d1d5148e6ff93f0fb86135145 Mon Sep 17 00:00:00 2001 From: hly <2783385703@qq.com> Date: Sat, 23 Aug 2025 18:02:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=B5=84=E9=87=91=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E8=B5=84=E9=87=91=E7=B1=BB=E5=9E=8B=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=B8=BAmoneyType=E5=B9=B6=E4=BF=AE=E5=A4=8D=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将type参数统一改为moneyType以保持一致性 - 修复提现和流水明细页面的资金类型传递问题 - 调整钱包页面跳转逻辑,正确传递资金类型参数 --- otherPages/binding/withdrawal/index.vue | 8 +++---- otherPages/myOrdersManage/transaction/index.vue | 11 ++++++--- otherPages/workbenchManage/myWallet/index.vue | 30 ++++++++++++++++++++++--- pages/userManage/index.vue | 4 ++-- 4 files changed, 41 insertions(+), 12 deletions(-) diff --git a/otherPages/binding/withdrawal/index.vue b/otherPages/binding/withdrawal/index.vue index 911ce57..fd95ec7 100644 --- a/otherPages/binding/withdrawal/index.vue +++ b/otherPages/binding/withdrawal/index.vue @@ -64,11 +64,11 @@ const fullName = ref('') const inputDialogRef = ref(null) const inputClose = ref(null) - const type = ref(null) + const moneyType = ref(0) onLoad((options) => { console.log('options', options); - type.value = options.type || 0; + moneyType.value = options.moneyType || 0; }); @@ -121,7 +121,7 @@ userId: store.state.user.userInfo.userId, amount: num.value, nameValue: val, - moneyType: type.value, + moneyType: moneyType.value, }).then(res => { if (res.code == 200) { store.dispatch("getUserInfo") @@ -137,7 +137,7 @@ success() { setTimeout(() => { uni.navigateTo({ - url: '/otherPages/myOrdersManage/transaction/index?type=1' + url: `/otherPages/myOrdersManage/transaction/index?type=1&moneyType=${type.value}` }) }, 1500) } diff --git a/otherPages/myOrdersManage/transaction/index.vue b/otherPages/myOrdersManage/transaction/index.vue index 44c6783..af847c6 100644 --- a/otherPages/myOrdersManage/transaction/index.vue +++ b/otherPages/myOrdersManage/transaction/index.vue @@ -20,9 +20,9 @@ {{ item.title }} - + {{ item.createTime }} @@ -70,10 +70,14 @@ } from "@dcloudio/uni-app" onLoad((options) => { + console.log(options); // 如果有type参数,设置默认选中的tab if (options.type) { type.value = parseInt(options.type) } + if (options.moneyType) { + moneyType.value = parseInt(options.moneyType) + } }) onShow(() => { @@ -83,12 +87,13 @@ const store = useStore() const list = ref([]); const type = ref(0); + const moneyType = ref(1); // 获取流水 const getRunningWater = async () => { let response = await amountLogList({ type: type.value, - moneyType:1, + moneyType : moneyType.value, userId: store.state.user.userInfo.userId }); if (response.code == 200) { diff --git a/otherPages/workbenchManage/myWallet/index.vue b/otherPages/workbenchManage/myWallet/index.vue index 31eba35..8b9c841 100644 --- a/otherPages/workbenchManage/myWallet/index.vue +++ b/otherPages/workbenchManage/myWallet/index.vue @@ -107,7 +107,7 @@ binBaseInfo, bindCode } from "@/api/home.js" -import { onShow } from '@dcloudio/uni-app' + import { onShow } from '@dcloudio/uni-app' const mounthName = ref('本月数据') const totalName = ref('累计数据') @@ -115,13 +115,37 @@ import { onShow } from '@dcloudio/uni-app' const handleGoto = (val) => { switch (val) { case 'detail': - tab.navigateTo('/otherPages/binding/partner/index') + uni.navigateTo({ + url: "/otherPages/myOrdersManage/transaction/index?moneyType=0" + }) + // tab.navigateTo('/otherPages/binding/partner/index?moneyType=0') // tab.navigateTo('/otherPages/workbenchManage/bindUser/index') break; case 'cash': - tab.navigateTo('/otherPages/binding/withdrawal/index') + uni.navigateTo({ + url: "/otherPages/binding/withdrawal/index?moneyType=0" + }) + // tab.navigateTo('/otherPages/binding/withdrawal/index?moneyType=0') break; } + + /* + // 处理流水明细点击 + const handleRunningWater = () => { + if (!checkLoginAndRedirect()) return + uni.navigateTo({ + url: "/otherPages/myOrdersManage/transaction/index?moneyType=1" + }) + } + + // 处理提现点击 + const handleWithdraw = () => { + if (!checkLoginAndRedirect()) return + uni.navigateTo({ + url: "/otherPages/binding/withdrawal/index?moneyType=1" + }) + } + */ } const state = reactive({ diff --git a/pages/userManage/index.vue b/pages/userManage/index.vue index 2994b12..9581a4c 100644 --- a/pages/userManage/index.vue +++ b/pages/userManage/index.vue @@ -303,7 +303,7 @@ const handleRunningWater = () => { if (!checkLoginAndRedirect()) return uni.navigateTo({ - url: "/otherPages/myOrdersManage/transaction/index" + url: "/otherPages/myOrdersManage/transaction/index?moneyType=1" }) } @@ -311,7 +311,7 @@ const handleWithdraw = () => { if (!checkLoginAndRedirect()) return uni.navigateTo({ - url: "/otherPages/binding/withdrawal/index?type=1" + url: "/otherPages/binding/withdrawal/index?moneyType=1" }) }