fix: lint
This commit is contained in:
@@ -118,7 +118,9 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
|
||||
response.data = apiEncrypt.decryptResponse(response.data);
|
||||
} catch (error) {
|
||||
console.error('响应数据解密失败:', error);
|
||||
throw new Error(`响应数据解密失败: ${(error as Error).message}`);
|
||||
throw new Error(`响应数据解密失败: ${(error as Error).message}`, {
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
}
|
||||
return response;
|
||||
@@ -158,6 +160,7 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
|
||||
return;
|
||||
}
|
||||
// 如果没有错误信息,则会根据状态码进行提示
|
||||
// oxlint-disable-next-line typescript/no-floating-promises
|
||||
message.error(errorMessage || msg);
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -21,7 +21,6 @@ export function useDescription(options?: Partial<DescriptionProps>) {
|
||||
inheritAttrs: false,
|
||||
setup(_props, { attrs, slots }) {
|
||||
return () => {
|
||||
// @ts-ignore - 避免类型实例化过深
|
||||
return h(Description, { ...propsState, ...attrs }, slots);
|
||||
};
|
||||
},
|
||||
|
||||
@@ -83,6 +83,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
if (accessStore.loginExpired) {
|
||||
accessStore.setLoginExpired(false);
|
||||
} else {
|
||||
// oxlint-disable-next-line no-unused-expressions
|
||||
onSuccess
|
||||
? await onSuccess?.()
|
||||
: await router.push(
|
||||
@@ -91,6 +92,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
}
|
||||
|
||||
if (userInfo?.nickname) {
|
||||
// oxlint-disable-next-line typescript/no-floating-promises
|
||||
notification.success({
|
||||
title: $t('authentication.loginSuccess'),
|
||||
content: `${$t('authentication.loginSuccessDesc')}:${userInfo?.nickname}`,
|
||||
@@ -132,6 +134,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
|
||||
async function fetchUserInfo() {
|
||||
// 加载
|
||||
// eslint-disable-next-line no-useless-assignment
|
||||
let authPermissionInfo: AuthPermissionInfo | null = null;
|
||||
authPermissionInfo = await getAuthPermissionInfoApi();
|
||||
// userStore
|
||||
|
||||
Reference in New Issue
Block a user