Commit 64950607 by zhangxw

修改

1 parent 4f083e4f
...@@ -204,6 +204,7 @@ Page({ ...@@ -204,6 +204,7 @@ Page({
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
let { timer } = this.data
clearInterval(timer) // 清除定时器 clearInterval(timer) // 清除定时器
}, },
...@@ -211,6 +212,7 @@ Page({ ...@@ -211,6 +212,7 @@ Page({
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {
let { timer } = this.data
clearInterval(timer) // 清除定时器 clearInterval(timer) // 清除定时器
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!