From d05e4fc8f0ff69827ab0a6345eabfb9fc0faba0e Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 27 Aug 2024 10:23:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E9=87=8D=E7=BD=AE=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E8=A6=81=E6=B1=82service.ts=E6=B7=BB=E5=8A=A0code=20?= =?UTF-8?q?=3D=3D=201002000010=E8=BF=94=E5=9B=9E=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/axios/service.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index 36261ac26..9f38c95eb 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -182,6 +182,14 @@ service.interceptors.response.use( '
5 分钟搭建本地环境
' }) return Promise.reject(new Error(msg)) + } else if (code === 1002000010) { + if (msg === '无效的刷新令牌') { + // hard coding:忽略这个提示,直接登出 + console.log(msg) + } else { + ElNotification.error({ title: msg }) + } + return Promise.reject(data) } else if (code !== 200) { if (msg === '无效的刷新令牌') { // hard coding:忽略这个提示,直接登出