Browse Source

no message

feature/v2.3
xpz2018 4 years ago
parent
commit
cfbcbb0b0e
1 changed files with 8 additions and 1 deletions
  1. 9
      pages/home/employee/index.js

9
pages/home/employee/index.js

@ -41,7 +41,10 @@ Scene({
}, },
onEvent: function(message){ onEvent: function(message){
if (message.what == 120) { if (message.what == 120) {
this.fetchMemberList()
var that = this
this.timeout = setTimeout(() => {
that.fetchMemberList()
}, 1000)
} }
}, },
fetchMemberList: function(){ fetchMemberList: function(){
@ -106,6 +109,10 @@ Scene({
} }
}, },
onUnload: function(){ onUnload: function(){
if(this.timeout){
clearTimeout(this.timeout)
this.timeout = null
}
event.remove('EventMessage', this) event.remove('EventMessage', this)
} }
}) })
Loading…
Cancel
Save