From 0b4e4a33b359b8b25ce94432ceb674c5797b5fef Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Wed, 10 Sep 2025 19:42:09 +0800 Subject: [PATCH] =?UTF-8?q?recharge=20=E6=96=B0=E5=A2=9E=E9=87=91=E5=B8=81?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pay.js | 2 +- src/api/userInfo.js | 2 +- src/views/Recharge.vue | 2 +- src/views/RechargeFreightAgent.vue | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/api/pay.js b/src/api/pay.js index 695d3a9..decb95b 100644 --- a/src/api/pay.js +++ b/src/api/pay.js @@ -16,7 +16,7 @@ export const getPayAplication = async (applicationId) => { export const getAppCommodityCard = async (params) => { try { const response = await get( - `/order/web/pay/commodity?applicationId=${params.applicationId}&payCountryId=${params.payCountryId}®ionId=${params.regionId}&type=GOLD` + `/order/web/pay/commodity?applicationId=${params.applicationId}&payCountryId=${params.payCountryId}®ionId=${params.regionId}&type=${params.type}` ); return response; } catch (error) { diff --git a/src/api/userInfo.js b/src/api/userInfo.js index 3c62b09..8bbc42b 100644 --- a/src/api/userInfo.js +++ b/src/api/userInfo.js @@ -15,7 +15,7 @@ export const searchUser = async (userId) => { export const searchPayRechargeUser = async (params) => { try { const response = await get( - `/order/web/pay/user-profile?sysOrigin=${params.sysOrigin}&account=${params.account}&type=GOLD` + `/order/web/pay/user-profile?sysOrigin=${params.sysOrigin}&account=${params.account}&type=${params.type}` ) return response } catch (error) { diff --git a/src/views/Recharge.vue b/src/views/Recharge.vue index 393eba8..10b8f29 100644 --- a/src/views/Recharge.vue +++ b/src/views/Recharge.vue @@ -166,7 +166,7 @@ const checkUserId = async () => { const targetUserInfo = await searchUser(targetUserId.value); console.log("targetUserInfo:", targetUserInfo); if (targetUserInfo.status && targetUserInfo.body.id) { - router.push({ path: "/recharge-freight-agent", query: { targetUserId: targetUserId.value } }); + router.push({ path: "/recharge-freight-agent", query: { targetUserId: targetUserId.value, isFreightAgent: targetUserInfo.body.isFreightAgent } }); } else { // 信息提示id有误 showWarning("User info not found"); diff --git a/src/views/RechargeFreightAgent.vue b/src/views/RechargeFreightAgent.vue index 6c5544c..5d6628b 100644 --- a/src/views/RechargeFreightAgent.vue +++ b/src/views/RechargeFreightAgent.vue @@ -241,9 +241,9 @@ onMounted(async () => { let params = { sysOrigin: PayAplication.body.appCode, account: route.query.targetUserId, + type: route.query.isFreightAgent === 'true' ? 'FREIGHT_GOLD' : 'GOLD' }; const userInfo = await searchPayRechargeUser(params); - console.log("userInfo:", userInfo); if (userInfo.body && userInfo.body.regionId && userInfo.body.countryList.length != 0) { userProfile.value = { ...userInfo.body.userProfile, type: "GOLD" }; @@ -259,6 +259,7 @@ onMounted(async () => { applicationId: applicationId.value, payCountryId: selectedCountry.value.id, regionId: userInfo.body.regionId, + type: route.query.isFreightAgent === 'true' ? 'FREIGHT_GOLD' : 'GOLD' }; const appCommodityCard = await getAppCommodityCard(appCommodityCardParams); console.log("appCommodityCard:", appCommodityCard);