feat: 角色命座

This commit is contained in:
bietiaop 2025-03-01 20:25:03 +08:00
parent 5830178362
commit 73715f015f
12 changed files with 324 additions and 14 deletions

View file

@ -74,7 +74,12 @@ export const downloadHakushFile = async (base, localBase, filename = '') => {
// 关闭文件
fs.closeSync(file);
// 返回文件内容
return JSON.parse(content.toString());
// 如果是JSON文件返回JSON对象
if (filename.endsWith('.json')) {
return JSON.parse(content.toString());
} else {
return filepath;
}
} else {
return null;
}