docs: modify annotation
This commit is contained in:
parent
42b8aca37b
commit
4df7d44bf1
@ -16,17 +16,14 @@ export function reqResolve(config) {
|
|||||||
|
|
||||||
const token = getToken()
|
const token = getToken()
|
||||||
if (!token) {
|
if (!token) {
|
||||||
/**
|
// * 未登录或者token过期的情况下,跳转登录页重新登录
|
||||||
* * 未登录或者token过期的情况下
|
|
||||||
* * 跳转登录页重新登录,携带当前路由及参数,登录成功会回到原来的页面
|
|
||||||
*/
|
|
||||||
toLogin()
|
toLogin()
|
||||||
return Promise.reject({ code: '-1', message: '未登录' })
|
return Promise.reject({ code: '-1', message: '未登录' })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * jwt token
|
* * 加上 token
|
||||||
* ! 认证方案: Bearer
|
* ! 认证方案: JWT Bearer
|
||||||
*/
|
*/
|
||||||
config.headers.Authorization = config.headers.Authorization || 'Bearer ' + token
|
config.headers.Authorization = config.headers.Authorization || 'Bearer ' + token
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user