From 730f09176e1cf1c8220b49c2b8130aebc47d786a Mon Sep 17 00:00:00 2001 From: taozi <9108791@qq.com> Date: Thu, 9 Dec 2021 16:00:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=B7=A8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/request.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/request.js b/utils/request.js index 7081157..38a5fcf 100644 --- a/utils/request.js +++ b/utils/request.js @@ -71,20 +71,20 @@ function baseRequest(options) { // 合并传参过来的 headers // 如果接口需要登录,携带 token 去请求 -console.log(options) +console.log(options) options.headers = { - ...options.headers, + ...options.headers, // hahah: 'Bearer2 ', - } - if(options.method=='post'){ - options.headers.hahah='Bearer2 ' } + // if(options.method=='post'){ + // options.headers.hahah='Bearer2 ' + // } if (options.login === true) { options.headers = { ...options.headers, - Authorization: 'Bearer ' + token, + Authorization: 'Bearer ' + token, } }