Skip to content

Commit

Permalink
fix(http): 修复请求参数污染默认参数问题(fix #28)
Browse files Browse the repository at this point in the history
  • Loading branch information
yulimchen committed Apr 20, 2023
1 parent 09f772b commit 8795d91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Http {

// 通用请求函数
public request<T>(paramConfig: AxiosRequestConfig): Promise<T> {
const config = Object.assign(Http.axiosConfigDefault, paramConfig);
const config = { ...Http.axiosConfigDefault, ...paramConfig };
return new Promise((resolve, reject) => {
Http.axiosInstance
.request(config)
Expand Down

0 comments on commit 8795d91

Please sign in to comment.