mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-15 07:27:54 +00:00
解决上传路径编码问题
This commit is contained in:
parent
4efb765721
commit
4dbe419b88
@ -439,14 +439,15 @@ async function httpRequest(req: any, item?: any) {
|
|||||||
NProgress: false
|
NProgress: false
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
item.key = encodeURIComponent(key);
|
||||||
|
|
||||||
if (isLocal) {
|
if (isLocal) {
|
||||||
item.url = res;
|
item.url = res;
|
||||||
} else {
|
} else {
|
||||||
item.url = pathJoin(preview || host, key);
|
item.url = pathJoin(preview || host, item.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
item.fileId = fileId;
|
item.fileId = fileId;
|
||||||
item.key = key;
|
|
||||||
|
|
||||||
emit("success", item);
|
emit("success", item);
|
||||||
resolve(item.url);
|
resolve(item.url);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user