From 0d90490fd7383ee43fcc6953d152106591355120 Mon Sep 17 00:00:00 2001 From: yangrz Date: Tue, 2 Apr 2024 12:30:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=95=86=E6=88=B7=E3=80=81?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E5=B7=B2=E7=BB=8F=E6=98=AF=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=EF=BC=8C=E5=88=99=E8=BF=9B=E5=85=A5=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=E5=90=8E=E8=87=AA=E5=8A=A8=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=88=B0=E5=90=84=E8=87=AA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agentApp/common/api.js | 14 ++++++++++---- agentApp/pages/agent-login/index.vue | 11 ++++++++++- agentApp/pages/merchant-login/index.vue | 11 ++++++++++- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/agentApp/common/api.js b/agentApp/common/api.js index 37b1a6e..7242ce7 100644 --- a/agentApp/common/api.js +++ b/agentApp/common/api.js @@ -53,8 +53,11 @@ export const userWithdrawList = (params) => http.post(baseUrl + '/api/user/withd // 带上代理token -const agentConfig = function() { +const agentConfig = function(toast) { return { + custom: { + toast + }, header: { 'Agent-Token': uni.getStorageSync('agent_token') } @@ -62,7 +65,7 @@ const agentConfig = function() { } export const agentSmsLogin = (params) => http.post(baseUrl + '/api/agent/smsLogin', params) -export const agentAccountInfo = (params) => http.post(baseUrl + '/api/agent/accountInfo', params, agentConfig()) +export const agentAccountInfo = (params, toast) => http.post(baseUrl + '/api/agent/accountInfo', params, agentConfig(toast)) export const agentMerchantList = (params) => http.post(baseUrl + '/api/agent/merchantList', params, agentConfig()) export const agentOrderList = (params) => http.post(baseUrl + '/api/agent/orderList', params, agentConfig()) export const agentFillAlipayAccount = (params) => http.post(baseUrl + '/api/agent/fillAlipayAccount', params, agentConfig()) @@ -71,8 +74,11 @@ export const agentWithdrawList = (params) => http.post(baseUrl + '/api/agent/wit // 带上商户token -const merchantConfig = function() { +const merchantConfig = function(toast) { return { + custom: { + toast + }, header: { 'Merchant-Token': uni.getStorageSync('merchant_token') } @@ -80,7 +86,7 @@ const merchantConfig = function() { } export const merchantSmsLogin = (params) => http.post(baseUrl + '/api/merchant/smsLogin', params) -export const merchantAccountInfo = (params) => http.post(baseUrl + '/api/merchant/accountInfo', params, merchantConfig()) +export const merchantAccountInfo = (params, toast) => http.post(baseUrl + '/api/merchant/accountInfo', params, merchantConfig(toast)) export const merchantOrderList = (params) => http.post(baseUrl + '/api/merchant/orderList', params, merchantConfig()) export const merchantOrderRefund = (params) => http.post(baseUrl + '/api/merchant/orderRefund', params, merchantConfig()) export const merchantFillAlipayAccount = (params) => http.post(baseUrl + '/api/merchant/fillAlipayAccount', params, merchantConfig()) diff --git a/agentApp/pages/agent-login/index.vue b/agentApp/pages/agent-login/index.vue index 27726dc..ca8ae9b 100644 --- a/agentApp/pages/agent-login/index.vue +++ b/agentApp/pages/agent-login/index.vue @@ -41,7 +41,8 @@