Commit 0989cd03 authored by liyang's avatar liyang

fix: 修复文件上传URL端口映射问题,将8882替换为8082

parent d0a1bb3e
...@@ -105,7 +105,17 @@ service.interceptors.response.use(res => { ...@@ -105,7 +105,17 @@ service.interceptors.response.use(res => {
Notification.error({ title: msg }) Notification.error({ title: msg })
return Promise.reject('error') return Promise.reject('error')
} else { } else {
return res.data const data = res.data
if (data.data && typeof data.data === 'object') {
if (data.data.imgUrl) {
data.data.imgUrl = data.data.imgUrl.replace(':8882', ':8082')
} else if (data.data.url) {
data.data.url = data.data.url.replace(':8882', ':8082')
}
} else if (data.data && typeof data.data === 'string') {
data.data = data.data.replace(':8882', ':8082')
}
return data
} }
}, },
error => { error => {
......
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