From 7bcc5c3de8f61431c5c5f2cbd316fe503473b74c Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 19 Jan 2023 10:03:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E8=B7=9F=E8=B8=AA=E7=BB=86?= =?UTF-8?q?=E7=B2=92=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/websocket/custom/getZip.js | 2 ++ 1 file changed, 2 insertions(+) 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)