Commit c3565225 by 姜雷

修改请求过滤文件类型请求结果

parent 73fe7f65
......@@ -41,7 +41,9 @@ const createBaseFetch = config => {
if (res.code !== 1000) {
if (
response.headers &&
/application\/octet-stream/.test(response.headers['content-type'])
/application\/octet-stream/.test(
response.headers['content-type'].toLowerCase()
)
) {
return response;
}
......
......@@ -56,7 +56,9 @@ service.interceptors.response.use(response => {
if (res.code !== SUCCESS_CODE) {
if (
response.headers &&
response.headers['content-type'] === 'application/octet-stream'
/application\/octet-stream/.test(
response.headers['content-type'].toLowerCase()
)
) {
return response;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment