|
@@ -447,7 +447,7 @@ export default {
|
|
// 上传
|
|
// 上传
|
|
this.$service.common
|
|
this.$service.common
|
|
.request({
|
|
.request({
|
|
- url: res.host,
|
|
|
|
|
|
+ url: res._host || res.host,
|
|
method: "POST",
|
|
method: "POST",
|
|
headers: {
|
|
headers: {
|
|
"Content-Type": "multipart/form-data"
|
|
"Content-Type": "multipart/form-data"
|
|
@@ -460,9 +460,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- .then(res => {
|
|
|
|
|
|
+ .then(url => {
|
|
if (mode === "local") {
|
|
if (mode === "local") {
|
|
- resolve(res);
|
|
|
|
|
|
+ resolve(url);
|
|
} else {
|
|
} else {
|
|
resolve(`${res.host}/app/${fileName}`);
|
|
resolve(`${res.host}/app/${fileName}`);
|
|
}
|
|
}
|
|
@@ -481,7 +481,7 @@ export default {
|
|
.upload()
|
|
.upload()
|
|
.then(res => {
|
|
.then(res => {
|
|
if (isDev) {
|
|
if (isDev) {
|
|
- res.host = "@/oss-upload";
|
|
|
|
|
|
+ res._host = "@/oss-upload";
|
|
}
|
|
}
|
|
|
|
|
|
next(res);
|
|
next(res);
|