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);