From 4df7d44bf124c2ab960f7b40d08b69c534daace3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=BC=A0=E9=BE=99?= Date: Wed, 13 Jul 2022 22:58:09 +0800 Subject: [PATCH] docs: modify annotation --- src/utils/http/interceptors.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/utils/http/interceptors.js b/src/utils/http/interceptors.js index 6388807..160941a 100644 --- a/src/utils/http/interceptors.js +++ b/src/utils/http/interceptors.js @@ -16,17 +16,14 @@ export function reqResolve(config) { const token = getToken() if (!token) { - /** - * * 未登录或者token过期的情况下 - * * 跳转登录页重新登录,携带当前路由及参数,登录成功会回到原来的页面 - */ + // * 未登录或者token过期的情况下,跳转登录页重新登录 toLogin() return Promise.reject({ code: '-1', message: '未登录' }) } /** - * * jwt token - * ! 认证方案: Bearer + * * 加上 token + * ! 认证方案: JWT Bearer */ config.headers.Authorization = config.headers.Authorization || 'Bearer ' + token