fix:超时时间

This commit is contained in:
刘玉霞 2024-12-02 10:22:15 +08:00
parent d2e2c4804c
commit 495cf2c733
2 changed files with 5 additions and 7 deletions

View File

@ -46,6 +46,7 @@ export function menusQuery(params: object = {}) {
url: '/api/menus/query',
method: 'POST',
data: params,
timeout: 80 * 1000,
})
}
@ -166,7 +167,6 @@ export function equipTree(params: object = {}) {
})
}
// 设备分页查询
export function equipQuery(params: object = {}) {
return createAxios({
@ -185,7 +185,7 @@ export function equipAdd(params: object = {}) {
})
}
// 设备删除
// 设备删除
export function equipDelete(params: object = {}) {
return createAxios({
url: '/api/equipment/delete',
@ -211,7 +211,7 @@ export function equipUpdate(params: object = {}) {
// })
// }
export const equipImport = (data:FormData, v:string) => {
export const equipImport = (data: FormData, v: string) => {
const token = encrypt_aes(adminInfo.token, v)
return createAxios(
{
@ -247,7 +247,6 @@ export function equipType(params: object = {}) {
})
}
// 设备详情物模型
export function equipDetailsModel(params: object = {}) {
return createAxios({
@ -258,7 +257,7 @@ export function equipDetailsModel(params: object = {}) {
}
// 设备详情机构
export function equipDetailsOrg(params: object = {} ) {
export function equipDetailsOrg(params: object = {}) {
return createAxios({
url: '/api/org/list',
method: 'POST',

View File

@ -42,10 +42,9 @@ export const getUrlPort = (): string => {
function createAxios<Data = any, T = ApiPromise<Data>>(axiosConfig: AxiosRequestConfig, options: Options = {}, loading: LoadingOptions = {}): T {
const config = useConfig()
const adminInfo = useAdminInfo()
const Axios = axios.create({
baseURL: getUrl(),
timeout: 1000 * 10,
timeout: axiosConfig.timeout ? axiosConfig.timeout : 1000 * 10,
headers: {
'think-lang': config.lang.defaultLang,
server: true,