diff --git a/config/proxy.js b/config/proxy.js index d2ca99f..6b7e5f9 100644 --- a/config/proxy.js +++ b/config/proxy.js @@ -9,7 +9,7 @@ export default { dev: { '/saasbase/': { - target: 'http://localhost:5006/', + target: 'http://localhost:5001/', changeOrigin: true, secure: false, //关闭证书验证 pathRewrite: { @@ -17,7 +17,7 @@ }, }, '/storemanagement/': { - target: 'http://localhost:5298/', + target: 'http://localhost:5002/', changeOrigin: true, secure: false, //关闭证书验证 pathRewrite: { @@ -25,7 +25,7 @@ }, }, '/storemanagementorder/': { - target: 'http://localhost:5248/', + target: 'http://localhost:5003/', changeOrigin: true, secure: false, //关闭证书验证 pathRewrite: { diff --git a/src/global_data.js b/src/global_data.js index b5b7104..c6e8541 100644 --- a/src/global_data.js +++ b/src/global_data.js @@ -8,3 +8,11 @@ export function getApiUrl() { export function getDataBaseUrl() { return '/saasbase'; } + +export function getStoremanagement() { + return '/storemanagement'; +} + +export function getStoremanagementorder() { + return '/storemanagementorder'; +} diff --git a/src/pages/order/orderflow/service.js b/src/pages/order/orderflow/service.js index 8222726..77b3ba3 100644 --- a/src/pages/order/orderflow/service.js +++ b/src/pages/order/orderflow/service.js @@ -2,11 +2,12 @@ /* eslint-disable */ import { request } from 'umi'; +import { getStoremanagement,getStoremanagementorder } from '@/global_data'; export default { /** 获取订单流水信息*/ orderList(data) { - return request(`/storemanagementorder/api/Order/PostDetail`, { + return request(getStoremanagementorder()+`/api/Order/PostDetail`, { method: 'Post', data: data, // params: { ...params }, @@ -18,13 +19,13 @@ export default { * 查询店铺信息(设备信息) */ srdList(data) { - return request('/storemanagement/api/shop/alllist', { + return request(getStoremanagement()+'/api/shop/alllist', { method: 'GET' }); }, GetFlowExport(data) { - return request(`/storemanagementorder/api/Order/GetFlowExport`, { + return request(getStoremanagementorder()+`/api/Order/GetFlowExport`, { method: 'Post', data: data diff --git a/src/pages/order/thirdAuthorize/service.js b/src/pages/order/thirdAuthorize/service.js index b172a16..9172e76 100644 --- a/src/pages/order/thirdAuthorize/service.js +++ b/src/pages/order/thirdAuthorize/service.js @@ -2,35 +2,36 @@ /* eslint-disable */ import { request } from 'umi'; +import { getStoremanagement,getStoremanagementorder } from '@/global_data'; export default { page(data) { data.isreport = true; - return request(`/storemanagementorder/api/ThirdAuthorize/Page`, { + return request(getStoremanagementorder()+`/api/ThirdAuthorize/Page`, { method: 'Post', data: data, }); }, GetAllStore() { - return request('/storemanagement/api/shop/alllist', { + return request(getStoremanagement()+'/api/shop/alllist', { method: 'GET' }); }, Create(data) { - return request('/storemanagementorder/api/ThirdAuthorize/Create', { + return request(getStoremanagementorder()+'/api/ThirdAuthorize/Create', { method: 'Post', data: data, }); }, Update(data) { - return request('/storemanagementorder/api/ThirdAuthorize/Update', { + return request(getStoremanagementorder()+'/api/ThirdAuthorize/Update', { method: 'Post', data: data, }); }, Del(data) { - return request('/storemanagementorder/api/ThirdAuthorize/Del?id='+data, { + return request(getStoremanagementorder()+'/api/ThirdAuthorize/Del?id='+data, { method: 'Post', }); }, diff --git a/src/pages/order/thirdOrder/service.js b/src/pages/order/thirdOrder/service.js index 44cc751..55d75cf 100644 --- a/src/pages/order/thirdOrder/service.js +++ b/src/pages/order/thirdOrder/service.js @@ -2,31 +2,29 @@ /* eslint-disable */ import { request } from 'umi'; +import { getStoremanagement,getStoremanagementorder } from '@/global_data'; export default { page(data) { data.isreport = true; - return request(`/storemanagementorder/api/Order/ThirdOrderPage`, { + return request(getStoremanagementorder()+`/api/Order/ThirdOrderPage`, { method: 'Post', data: data, }); }, getThirdOrderInfo(data) { - return request(`/storemanagementorder/api/Order/GetThirdOrderInfo?thirdOrderId=`+data, { + return request(getStoremanagementorder()+`/api/Order/GetThirdOrderInfo?thirdOrderId=`+data, { method: 'get', }); }, - - - /** 获取订单流水信息*/ orderList(data) { data.isreport = true; - return request(`/storemanagementorder/api/Order/PostDetail`, { + return request(getStoremanagementorder()+`/api/Order/PostDetail`, { method: 'Post', data: data, // params: { ...params }, @@ -38,13 +36,13 @@ export default { * 查询店铺信息(设备信息) */ srdList(data) { - return request('/storemanagement/api/shop/alllist', { + return request(getStoremanagement()+'/storemanagement/api/shop/alllist', { method: 'GET' }); }, GetFlowExport(data) { - return request(`/storemanagementorder/api/Order/GetFlowExport`, { + return request(getStoremanagementorder()+`/api/Order/GetFlowExport`, { method: 'Post', data: data