diff --git a/packages/@w6s/cli/templates/H5/template/src/utils/http/https.ts b/packages/@w6s/cli/templates/H5/template/src/utils/http/https.ts index ce1e5c1..d3c1bc4 100644 --- a/packages/@w6s/cli/templates/H5/template/src/utils/http/https.ts +++ b/packages/@w6s/cli/templates/H5/template/src/utils/http/https.ts @@ -51,10 +51,10 @@ export function apiGet( // handleHeader let param = "?"; Object.keys(handleData(params)).forEach((key) => { - param += handleData(params)[key]; + param += `${key}=${handleData(params)[key]}&`; }); return service - .get(`${url}${param}`, { headers }) + .get(`${url}${param.substr(0, param.length - 1)}`, { headers }) .then((res) => res) .catch((err) => { throw err;