Commit b1226def by 朱哲铨

bug 修复

parent 84cfda63
......@@ -20,13 +20,14 @@ function zip(from, to) {
console.log("success");
let data = fs.readdirSync(dirName);
for (let i = 0; i < data.length; i++) {
let fileName = uuid.v4() + ".png";
let el = data[i];
let file_path = path.join(dirName, el);
console.log(file_path, to);
fs.renameSync(file_path, path.join(to, el));
fs.renameSync(file_path, path.join(to, fileName));
arr.push({
fileName: el,
productionFile: path.join(to, el)
fileName: fileName,
productionFile: path.join(to, fileName)
});
}
......@@ -69,8 +70,8 @@ export const downloadImage = list => {
.length > 0;
if (flag) {
fileName = list[i].productionFile.split("/")[
list[i].productionFile.split("/").length - 1
];
list[i].productionFile.split("/").length - 1
];
type = 1;
} else {
fileName = uuid.v4() + ".png";
......@@ -141,16 +142,16 @@ export const toSend = body => {
path.join(
process.cwd(),
"print/Profile/" +
body.fileName.replace(".png", "") +
".xml"
body.fileName.replace(".png", "") +
".xml"
)
);
fs.unlinkSync(
path.join(
process.cwd(),
"print/Output/" +
body.fileName.replace(".png", "") +
".arxp"
body.fileName.replace(".png", "") +
".arxp"
)
);
resolve("操作成功");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment