工程导入

This commit is contained in:
2025-10-20 17:00:58 +08:00
parent 2a7eda5ee3
commit a2f81dbe29
10 changed files with 822 additions and 179 deletions

View File

@ -227,10 +227,10 @@ function createWindow(): void {
}
);*/
http.get(url, (response) => {
let contentLength = parseInt(
response.headers["content-length"]
);
let downloadedLength = 0;
// let contentLength = parseInt(
// response.headers["content-length"]
// );
// let downloadedLength = 0;
response.pipe(fs.createWriteStream(path));
response.on("end", () => {
callBack("success");
@ -239,7 +239,7 @@ function createWindow(): void {
});
})
.on("error", (err) => {
console.log("完成");
console.log(err, "完成");
callBack("error");
});
}