mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
feat: 修改超时时间
This commit is contained in:
parent
292dbf58c5
commit
8f14bac6d7
@ -115,6 +115,9 @@ func (f *FileInfo) search(dir, showHidden bool, af afero.Afero, search string, c
|
||||
Path: path,
|
||||
FileInfo: info,
|
||||
})
|
||||
if len(files) > count {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
@ -89,8 +89,12 @@ class RequestHttp {
|
||||
get<T>(url: string, params?: object, _object = {}): Promise<ResultData<T>> {
|
||||
return this.service.get(url, { params, ..._object });
|
||||
}
|
||||
post<T>(url: string, params?: object, _object = {}): Promise<ResultData<T>> {
|
||||
return this.service.post(url, params, _object);
|
||||
post<T>(url: string, params?: object, timeout?: number): Promise<ResultData<T>> {
|
||||
return this.service.post(url, params, {
|
||||
baseURL: import.meta.env.VITE_API_URL as string,
|
||||
timeout: timeout ? timeout : (ResultEnum.TIMEOUT as number),
|
||||
withCredentials: true,
|
||||
});
|
||||
}
|
||||
put<T>(url: string, params?: object, _object = {}): Promise<ResultData<T>> {
|
||||
return this.service.put(url, params, _object);
|
||||
|
@ -3,7 +3,7 @@ import http from '@/api';
|
||||
import { AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const GetFilesList = (params: File.ReqFile) => {
|
||||
return http.post<File.File>('files/search', params);
|
||||
return http.post<File.File>('files/search', params, 200000);
|
||||
};
|
||||
|
||||
export const GetFilesTree = (params: File.ReqFile) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user