追加跟踪细粒度
This commit is contained in:
@@ -11,6 +11,7 @@ const handleZip = (id, ws) => {
|
|||||||
class counter {
|
class counter {
|
||||||
constructor(remark) {
|
constructor(remark) {
|
||||||
this.count = 0
|
this.count = 0
|
||||||
|
sendMessage({code: 0, progress: this.count, remark})
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
sendMessage({code: 0, progress: ++this.count, remark})
|
sendMessage({code: 0, progress: ++this.count, remark})
|
||||||
}, 6000)
|
}, 6000)
|
||||||
@@ -19,6 +20,7 @@ const handleZip = (id, ws) => {
|
|||||||
set(progress, remark) {
|
set(progress, remark) {
|
||||||
if (this.timer) clearInterval(this.timer)
|
if (this.timer) clearInterval(this.timer)
|
||||||
this.count = progress
|
this.count = progress
|
||||||
|
sendMessage({code: 0, progress: this.count, remark})
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
sendMessage({code: 0, progress: ++this.count, remark})
|
sendMessage({code: 0, progress: ++this.count, remark})
|
||||||
}, 4000)
|
}, 4000)
|
||||||
|
|||||||
Reference in New Issue
Block a user