uniapp 离开界面清除计时器
onLoad() {
// APP启动引导图逻辑判断显示
if (uni.getStorageSync("startImgStatus")) {
this.timer = setTimeout(() =>{
uni.switchTab({
url: "/pages/home"
});
},5000)
};
// APP启动引导图逻辑判断显示 End
this.getScreen();
},
onUnload() { if(this.timer) { clearTimeout(this.timer); this.timer = null; } },