From d1a1bd0f0ac5dbc66dd627888bf457809d75689e Mon Sep 17 00:00:00 2001 From: "LAPTOP-86ICAA31\\Administrator" <55056727@qq.com> Date: Fri, 10 Feb 2023 17:58:38 +0800 Subject: [PATCH] no message --- .env | 2 +- src/layouts/tabs/TabsView.vue | 3 ++ src/pages/agent/list.vue | 93 +++++++++++++++++++++++++------------ src/pages/login/i18n.js | 2 +- src/pages/order/list.vue | 50 +++++++++++++------- src/services/Common.js | 27 +++++++++-- src/services/Merchants/Merchants.js | 11 ++--- src/utils/axios-interceptors.js | 9 ++++ 8 files changed, 139 insertions(+), 58 deletions(-) diff --git a/.env b/.env index 73b61df..032f2b5 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ VUE_APP_PUBLIC_PATH=/ -VUE_APP_NAME=捷配管理后台 +VUE_APP_NAME=捷配审单云管理后台 VUE_APP_ROUTES_KEY=admin.routes VUE_APP_PERMISSIONS_KEY=admin.permissions VUE_APP_ROLES_KEY=admin.roles diff --git a/src/layouts/tabs/TabsView.vue b/src/layouts/tabs/TabsView.vue index fcf3b63..d356d7b 100644 --- a/src/layouts/tabs/TabsView.vue +++ b/src/layouts/tabs/TabsView.vue @@ -328,6 +328,9 @@ export default { \ No newline at end of file diff --git a/src/services/Common.js b/src/services/Common.js index 5821f68..1be736f 100644 --- a/src/services/Common.js +++ b/src/services/Common.js @@ -62,13 +62,26 @@ function padLeftZero (str) { //订单类型:orderType //订单状态:orderStatus //解析状态:parseStatue +//平台类别:platformType export function resSelects(type='',val=''){ // console.log(type,val) let list = []; if (type==='orderType'){ list = [ - {value:'1',text:'打样'}, - {value:'2',text:'批量'}, + {value:'0',text:'内贸'}, + {value:'1',text:'外贸'}, + {value:'2',text:'精密'}, + {value:'3',text:'铝基板'}, + {value:'4',text:'调度中心'}, + ] + } + else if (type==='sourceType'){ + list = [ + {value:'0',text:'内贸'}, + {value:'1',text:'外贸'}, + {value:'2',text:'精密'}, + {value:'3',text:'铝基板'}, + {value:'4',text:'调度中心'}, ] } else if (type==='orderStatus'){ @@ -88,9 +101,17 @@ export function resSelects(type='',val=''){ {value:'3',text:'解析失败'}, ] } + else if (type==='platformType'){ + list = [ + {value:'1',text:'内贸'}, + {value:'2',text:'外贸'}, + {value:'3',text:'调度平台'}, + {value:'4',text:'精密铝基板'}, + ] + } else return false; //返回内容 - if(val!=='' && typeof val=='number'){ + if(val!==''){ for(let i in list){ if (val.toString() === list[i].value) return list[i].text; } diff --git a/src/services/Merchants/Merchants.js b/src/services/Merchants/Merchants.js index 37a9061..4b7b27c 100644 --- a/src/services/Merchants/Merchants.js +++ b/src/services/Merchants/Merchants.js @@ -1,14 +1,9 @@ import { requestApi, METHOD } from '@/utils/request'; //新增商户 -export function NewMerchants(name) { - return new Promise((resolve, reject) => { - requestApi('/api/app/access-manager-server/insert?description='+name, METHOD.POST).then(res => { - resolve(res); - }).catch(err=>{ - reject(err); - }) - }) +export function NEMerchants(params) { + if (params?.id) return requestApi('/api/app/access-manager-server/update', METHOD.PUT, params) + else return requestApi('/api/app/access-manager-server/insert', METHOD.POST, params) } //获取开放接口列表 diff --git a/src/utils/axios-interceptors.js b/src/utils/axios-interceptors.js index d52ee7c..e67fe5a 100644 --- a/src/utils/axios-interceptors.js +++ b/src/utils/axios-interceptors.js @@ -118,6 +118,15 @@ const resCommon = { */ onFulfilled(response, options) { const { message } = options; + // if (response?.success&&!response.success){ + // console.log(response); + // } + if (response.code === 40008){ + message.error('认证 token 已过期,请重新登录'); + Cookie.remove(xsrfHeaderName); + router.push('/loginjmp'); + return Promise.reject(error); + } if (response.code === 200 || response.code === 204) { if (!response.isSuccess) { message.error(response.message);