diff --git a/src/router/constant.ts b/src/router/constant.ts index 82d5911fe..d39a67e56 100644 --- a/src/router/constant.ts +++ b/src/router/constant.ts @@ -4,7 +4,7 @@ export const PARENT_LAYOUT_NAME = 'ParentLayout'; export const PAGE_NOT_FOUND_NAME = 'PageNotFound'; -export const EXCEPTION_COMPONENT = () => import('../views/sys/exception/Exception.vue'); +export const EXCEPTION_COMPONENT = () => import('/@/views/sys/exception/Exception.vue'); /** * @description: default layout diff --git a/src/utils/http/axios/Axios.ts b/src/utils/http/axios/Axios.ts index 113c32aea..f2d57be1b 100644 --- a/src/utils/http/axios/Axios.ts +++ b/src/utils/http/axios/Axios.ts @@ -1,5 +1,5 @@ import type { AxiosRequestConfig, AxiosInstance, AxiosResponse, AxiosError } from 'axios'; -import type { RequestOptions, Result, UploadFileParams } from '../../../../types/axios'; +import type { RequestOptions, Result, UploadFileParams } from '/#/axios'; import type { CreateAxiosOptions } from './axiosTransform'; import axios from 'axios'; import qs from 'qs'; diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index 1e946dc89..c73af07f3 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -140,7 +140,7 @@ const transform: AxiosTransform = { const token = getToken(); if (token && (config as Recordable)?.requestOptions?.withToken !== false) { // jwt token - config.headers.Authorization = options.authenticationScheme + (config as Recordable).headers.Authorization = options.authenticationScheme ? `${options.authenticationScheme} ${token}` : token; } @@ -184,7 +184,7 @@ const transform: AxiosTransform = { return Promise.reject(error); } } catch (error) { - throw new Error(error); + throw new Error(error as unknown as string); } checkStatus(error?.response?.status, msg, errorMessageMode); diff --git a/src/views/sys/login/LoginForm.vue b/src/views/sys/login/LoginForm.vue index d8a0740e8..edc217394 100644 --- a/src/views/sys/login/LoginForm.vue +++ b/src/views/sys/login/LoginForm.vue @@ -82,7 +82,7 @@