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',