js之定时器、延时器用法
定时器: this.checkTimer = setInterval(this.checkDayAndNight, 2* 60000);
清除定时器 clearInterval(this.checkTimer);
延时器: setTimeout(()=>{ dispatch({ type: 'commandbyhead/getPoliceCaseCount', payload: {} });}, 4*1000);定时器: this.checkTimer = setInterval(this.checkDayAndNight, 2* 60000);
清除定时器 clearInterval(this.checkTimer);
延时器: setTimeout(()=>{ dispatch({ type: 'commandbyhead/getPoliceCaseCount', payload: {} });}, 4*1000);