From 4026dd06fa1bc63bfb973daa2676f090dbf2392d Mon Sep 17 00:00:00 2001 From: yanzili <978387851@qq.com> Date: Fri, 25 Jun 2021 13:16:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- report-ui/src/utils/request.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/report-ui/src/utils/request.js b/report-ui/src/utils/request.js index cd85d485..5c263a8b 100644 --- a/report-ui/src/utils/request.js +++ b/report-ui/src/utils/request.js @@ -12,7 +12,7 @@ const service = axios.create({ // request拦截器 service.interceptors.request.use( config => { - config.headers['Authorization'] = (getToken() == null || getToken() == undefined) ? '': getToken() + config.headers['Authorization'] = (getToken() == null || getToken() == undefined) ? '' : getToken() return config }, error => { @@ -29,7 +29,7 @@ service.interceptors.response.use( * code为非20000是抛错 可结合自己业务进行修改 */ const res = response.data - if (res.code !== 20000) { + if (res.code !== '200') { Message({ message: res.message, type: 'error',