Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ class RequestHttp {

// * 常用请求方法封装
get<T>(url: string, config: AxiosRequestConfig = {}): Promise<ResultData<T>> {
console.log("开始执行 get 请求", url, config);
return this.service.get(url, config);
const finalConfig = config.params ? config : { ...config, params: config };
return this.service.get(url, finalConfig);
}
post<T>(url: string, params?: object, _object = {}): Promise<ResultData<T>> {
return this.service.post(url, params, _object);
Expand Down