Commit 5915e06c authored by liyang's avatar liyang

fix: 修复文件上传URL端口映射问题,调整URL替换逻辑

parent 0989cd03
...@@ -106,7 +106,11 @@ service.interceptors.response.use(res => { ...@@ -106,7 +106,11 @@ service.interceptors.response.use(res => {
return Promise.reject('error') return Promise.reject('error')
} else { } else {
const data = res.data const data = res.data
if (data.data && typeof data.data === 'object') { if (data.imgUrl) {
data.imgUrl = data.imgUrl.replace(':8882', ':8082')
} else if (data.url) {
data.url = data.url.replace(':8882', ':8082')
} else if (data.data && typeof data.data === 'object') {
if (data.data.imgUrl) { if (data.data.imgUrl) {
data.data.imgUrl = data.data.imgUrl.replace(':8882', ':8082') data.data.imgUrl = data.data.imgUrl.replace(':8882', ':8082')
} else if (data.data.url) { } else if (data.data.url) {
......
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