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