Commit 07775f31 authored by limingzhe's avatar limingzhe

fix: 多次load end

parent 895d9f9a
...@@ -235,6 +235,14 @@ cc.Class({ ...@@ -235,6 +235,14 @@ cc.Class({
loadEnd() { loadEnd() {
console.log('in ai_mz_02 load end ...,,, 1')
if (this.isDestroy) {
return;
}
console.log('in ai_mz_02 load end ...,,, 2')
this.initData(); this.initData();
this.initView(); this.initView();
// this.initMusic(); // this.initMusic();
...@@ -3254,6 +3262,7 @@ cc.Class({ ...@@ -3254,6 +3262,7 @@ cc.Class({
onDestroy() { onDestroy() {
console.log(' in ai_mz_02 onDestroy');
this.isDestroy = true; this.isDestroy = true;
this._timeoutIds.forEach(id => { this._timeoutIds.forEach(id => {
clearTimeout(id); clearTimeout(id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment