mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2026-01-28 09:28:12 +00:00
解决 upload 回调路径错误问题
This commit is contained in:
parent
5df168bf69
commit
5de3c2ccdd
@ -122,7 +122,7 @@ export default {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
position: relative;
|
||||
background-color: $color-primary;
|
||||
background-color: #2f3447;
|
||||
|
||||
.box {
|
||||
display: flex;
|
||||
|
||||
@ -158,7 +158,7 @@ export default {
|
||||
font-size: 12px;
|
||||
|
||||
span {
|
||||
background-color: $color-primary;
|
||||
background-color: #2f3447;
|
||||
color: #fff;
|
||||
border-radius: 3px;
|
||||
padding: 2px 5px;
|
||||
@ -190,7 +190,7 @@ export default {
|
||||
position: absolute;
|
||||
bottom: -2px;
|
||||
left: 0;
|
||||
background-color: $color-primary;
|
||||
background-color: #2f3447;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -925,7 +925,7 @@ export default {
|
||||
.date {
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
background-color: $color-primary;
|
||||
background-color: #2f3447;
|
||||
border-radius: 2px;
|
||||
margin-left: 40px;
|
||||
padding: 1px 3px;
|
||||
|
||||
@ -447,7 +447,7 @@ export default {
|
||||
// 上传
|
||||
this.$service.common
|
||||
.request({
|
||||
url: res.host,
|
||||
url: res._host || res.host,
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data"
|
||||
@ -460,9 +460,9 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
.then(url => {
|
||||
if (mode === "local") {
|
||||
resolve(res);
|
||||
resolve(url);
|
||||
} else {
|
||||
resolve(`${res.host}/app/${fileName}`);
|
||||
}
|
||||
@ -481,7 +481,7 @@ export default {
|
||||
.upload()
|
||||
.then(res => {
|
||||
if (isDev) {
|
||||
res.host = "@/oss-upload";
|
||||
res._host = "@/oss-upload";
|
||||
}
|
||||
|
||||
next(res);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user