From 086e476da8e73094e70036cbc88cb20f181ee523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E5=87=A0=E6=B5=B7?= Date: Sat, 10 Oct 2020 00:26:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20token=E6=A0=A1=E9=AA=8C=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E6=97=B6=E7=A7=BB=E9=99=A4token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/services/error.service.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/services/error.service.ts b/src/app/services/error.service.ts index 63aeec5..fd562e4 100644 --- a/src/app/services/error.service.ts +++ b/src/app/services/error.service.ts @@ -39,8 +39,18 @@ export class ErrorService { if (this.componentStateService.currentPath === this.ADMIN_PAGE_PREFIX) { this.notification.create('error', `请求失败<${response.code}>`, `${response.msg}`); } - // 3830 token签名错误 - if (response.code === 3830) { + /*** + * 3700, "登陆过期" + * 3710, "账户已注销" + * 3711, "账户不可用" + * 3800, "密码不正确" + * 3810, "Token过期" + * 3820, "Token格式不对" + * 3820, "Token格式不对" + * 3830, "Token签名错误" + * 3840, "不支持的Token" + */ + if (response.code > 3700 && response.code < 3900) { this.localStorageService.removeToken(); } }