diff --git a/src/websocket/custom/getZip.js b/src/websocket/custom/getZip.js index 772536e..fa1c96f 100644 --- a/src/websocket/custom/getZip.js +++ b/src/websocket/custom/getZip.js @@ -11,6 +11,7 @@ const handleZip = (id, ws) => { class counter { constructor(remark) { this.count = 0 + sendMessage({code: 0, progress: this.count, remark}) this.timer = setInterval(() => { sendMessage({code: 0, progress: ++this.count, remark}) }, 6000) @@ -19,6 +20,7 @@ const handleZip = (id, ws) => { set(progress, remark) { if (this.timer) clearInterval(this.timer) this.count = progress + sendMessage({code: 0, progress: this.count, remark}) this.timer = setInterval(() => { sendMessage({code: 0, progress: ++this.count, remark}) }, 4000)