提交
This commit is contained in:
1 parent
683f14828f
commit
fdf7d391a6
40 files changed
+6242
-19470
No files matched your search
@@ -83,10 +83,13 @@ export function fetchRefreshToken(refreshToken: string) {
|
||||
|
||||
/**
|
||||
* 登出
|
||||
* @param accessToken 可选:主动退出时传入当前 token,避免清空 store 后拦截器拿不到 Authorization
|
||||
*/
|
||||
export function fetchLogout() {
|
||||
export function fetchLogout(accessToken?: string) {
|
||||
return request.post({
|
||||
url: '/web/auth/logout'
|
||||
url: '/web/auth/logout',
|
||||
headers: accessToken ? { Authorization: `Bearer ${accessToken}` } : undefined,
|
||||
showErrorMessage: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user