📅  最后修改于: 2022-03-11 15:01:35.745000             🧑  作者: Mango
ngOnInit() {
this.battleInit();
this.id = setInterval(() => {
this.battleInit();
}, 5000);
}
ngOnDestroy() {
if (this.id) {
clearInterval(this.id);
}
}