Skip to content

Commit

Permalink
Merge pull request #7 from Edwinye337826/fix/https
Browse files Browse the repository at this point in the history
fix:CLI/H5 https.ts get parameter concatenation bug
  • Loading branch information
hejianxian authored Mar 4, 2021
2 parents 91a6d9b + 8951c14 commit 4ce071b
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,8 @@ export function apiGet<T>(
params: Common.PlainObject = {},
headers: Common.PlainObject = {},
): Promise<AxiosResponse<T>> {
// handleHeader
let param = '?';
Object.keys(handleData(params)).forEach((key) => {
param += handleData(params)[key];
});
return service
.get(`${url}${param}`, { headers })
.get(url, { params, headers })
.then((res) => res)
.catch((err) => {
throw err;
Expand Down

0 comments on commit 4ce071b

Please sign in to comment.