From ee80e8ff53dc28e8e22c66aacf66b6d2b5ce0c63 Mon Sep 17 00:00:00 2001 From: zhangtao <1176193409@qq.com> Date: Tue, 1 Aug 2023 10:24:13 +0800 Subject: [PATCH] add status signout --- src/utils/http/interceptors.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/http/interceptors.js b/src/utils/http/interceptors.js index 38f34b9..7048d67 100644 --- a/src/utils/http/interceptors.js +++ b/src/utils/http/interceptors.js @@ -41,6 +41,10 @@ export function setupInterceptor(service) { case -1: $message.error(response.data.msg) break + case -2: + $message.error(response.data.msg) + signoutRedirect() + break case 401: // 未登录(可能是token过期或者无效了) signoutRedirect() -- 2.27.0