Skip to content

Commit c7bb814

Browse files
author
dompling
committed
修复中文 url 异常问题
1 parent 9434723 commit c7bb814

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

widget.Install.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ const saveFileName = (fileName) => {
1515
const write = (fileName, content) => {
1616
let file = saveFileName(fileName);
1717
const filePath = Files.joinPath(RootPath, file);
18-
Files.write(filePath, content);
18+
Files.writeString(filePath, content);
1919
return true;
2020
};
2121

2222
const saveFile = async ({ moduleName, url }) => {
23-
const req = new Request(url);
24-
const content = await req.load();
23+
const req = new Request(encodeURI(url));
24+
const content = await req.loadString();
2525
write(`${moduleName}`, content);
2626
return true;
2727
};

0 commit comments

Comments
 (0)