From f2f2984c3e8d864a9c170366958920f044fc09c0 Mon Sep 17 00:00:00 2001 From: mabo Date: Wed, 23 Jun 2021 16:49:35 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/pages/GoodsList.vue | 2 +- buyer/src/plugins/request.js | 2 + manager/src/libs/axios.js | 10 +-- .../my-components/lili/upload-pic-thumb.vue | 83 +++++++++-------- seller/src/config/index.js | 16 ++-- seller/src/libs/axios.js | 10 +-- seller/src/libs/routerJson.js | 28 +++--- seller/src/router/router.js | 2 +- .../views/goods/goods-seller/addGoods.scss | 4 +- .../goods/goods-seller/goodsOperation.vue | 73 ++++----------- .../my-components/lili/upload-pic-thumb.vue | 90 ++++++++++--------- 11 files changed, 141 insertions(+), 179 deletions(-) diff --git a/buyer/src/pages/GoodsList.vue b/buyer/src/pages/GoodsList.vue index 718ae499..7020c2f4 100644 --- a/buyer/src/pages/GoodsList.vue +++ b/buyer/src/pages/GoodsList.vue @@ -69,7 +69,7 @@ >人评价
- {{ item.storeName }} + 自营{{ item.storeName }}
diff --git a/buyer/src/plugins/request.js b/buyer/src/plugins/request.js index 5a897bb0..c5457098 100644 --- a/buyer/src/plugins/request.js +++ b/buyer/src/plugins/request.js @@ -142,6 +142,8 @@ service.interceptors.response.use( refresh(error) isRefreshToken = 0; } + } else if (errorResponse.status === 404) { + // 避免刷新token时也提示报错信息 } else { if (error.message) { let _message = diff --git a/manager/src/libs/axios.js b/manager/src/libs/axios.js index 6bd6d6c1..5d8c68ec 100644 --- a/manager/src/libs/axios.js +++ b/manager/src/libs/axios.js @@ -64,14 +64,6 @@ service.interceptors.response.use( } return data; break; - case 403: - // 权限不足 - if (data.message !== null) { - Message.error(data.message); - } else { - Message.error("权限不足"); - } - break; case 500: // 系统异常 if (data.message !== null) { @@ -89,6 +81,8 @@ service.interceptors.response.use( if (error.response) { if (error.response.status === 401) { // 这种情况一般调到登录页 + } else if (error.response.status === 404) { + // 避免刷新token报错 } else if (error.response.status === 403) { isRefreshToken++; if(isRefreshToken === 1) { diff --git a/manager/src/views/my-components/lili/upload-pic-thumb.vue b/manager/src/views/my-components/lili/upload-pic-thumb.vue index d9583ca6..03ec4086 100644 --- a/manager/src/views/my-components/lili/upload-pic-thumb.vue +++ b/manager/src/views/my-components/lili/upload-pic-thumb.vue @@ -1,47 +1,48 @@