You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
468 B
JavaScript

// index.js
// 获取应用实例
const app = getApp()
Page({
data: {
status: 3,
flag:1,
interval: null
},
onLoad() {
let that=this
that.setData({
interval:setInterval(() => {
app.utils.util.getSessionId(that.bindData)
}, 1000)});
},
bindData(){
this.setData({
status: app.globalData.status,
flag: app.globalData.flag
})
if(this.data.interval){
clearInterval(this.data.interval)
}
}
})