From 8a0affd072c4e1ae21684c25a721de61e5414b99 Mon Sep 17 00:00:00 2001 From: edwin <978603887@qq.com> Date: Thu, 10 Dec 2020 17:58:57 +0800 Subject: [PATCH] =?UTF-8?q?cli/h5=20https=E5=B0=81=E8=A3=85=E7=9A=84axios?= =?UTF-8?q?=20get=E6=96=B9=E6=B3=95=E5=8F=82=E6=95=B0=E6=8B=BC=E6=8E=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@w6s/cli/templates/H5/template/src/utils/http/https.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;