ci: 集成icon和layout
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import type { HookFetchPlugin } from 'hook-fetch';
|
||||
import { useUserStore } from '@/store';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import hookFetch from 'hook-fetch';
|
||||
import { sseTextDecoderPlugin } from 'hook-fetch/plugins';
|
||||
import { useUserStore } from '@/store';
|
||||
|
||||
interface BaseResponse {
|
||||
code: number;
|
||||
@@ -34,6 +34,7 @@ function jwtPlugin(): HookFetchPlugin<BaseResponse> {
|
||||
return response;
|
||||
}
|
||||
if (response.result?.code === 401) {
|
||||
// 如果没有权限,也不退出,则是弹框提示登录
|
||||
userStore.logout();
|
||||
}
|
||||
ElMessage.error(response.result?.msg);
|
||||
|
||||
Reference in New Issue
Block a user