Browse Source

【fix】修复BtnOpenPanel打开界面load失败的后无法再打开界面的bug

zouyong 5 năm trước cách đây
mục cha
commit
96f3eef46f

+ 4 - 4
assets/resources/module/turnable/turnable.prefab

@@ -1453,7 +1453,7 @@
     "asset": {
       "__uuid__": "18e0b7f8-059f-4a52-9e57-690fe778a31a"
     },
-    "fileId": "f9dlrKXStKP71ucstMn1TG",
+    "fileId": "9aBBiDARBNC4uoIbO9RyPa",
     "sync": false
   },
   {
@@ -1585,7 +1585,7 @@
     "asset": {
       "__uuid__": "18e0b7f8-059f-4a52-9e57-690fe778a31a"
     },
-    "fileId": "0eE50l6LRPepR1SkI1pnGQ",
+    "fileId": "d7xX2a5R5KRYQdFWu4mWEH",
     "sync": false
   },
   {
@@ -1717,7 +1717,7 @@
     "asset": {
       "__uuid__": "18e0b7f8-059f-4a52-9e57-690fe778a31a"
     },
-    "fileId": "b0wndPUiVDKZkpbSXj6Mmf",
+    "fileId": "d7R9TWscdI7Kyd+jYTTj2m",
     "sync": false
   },
   {
@@ -1930,7 +1930,7 @@
     "asset": {
       "__uuid__": "18e0b7f8-059f-4a52-9e57-690fe778a31a"
     },
-    "fileId": "bapR1iig1KbKI50SYc8m9O",
+    "fileId": "b17mSb6bVLd7JdgQGql6Yl",
     "sync": false
   },
   {

+ 0 - 19
assets/script/Main.ts

@@ -8,25 +8,6 @@ export default class Main extends cc.Component {
     mainfestUrl: cc.Asset = null;
 
     start() {
-        console.log("init");
         mk.ui.openPanel("module/login/login");
-
-        let a = this.testnew()
-    }
-
-    async testnew() {
-        let aa = '11111111  '
-        aa = await this.test();
-        console.log(aa);
-
-        setTimeout(() => {
-            console.log(aa)
-        }, 5000)
-    }
-
-    async test() {
-        let aa = '2222222222'
-        await mk.time.WaitForSeconds(1);
-        return aa;
     }
 }

+ 3 - 1
assets/script/game/component/BtnOpenPanel.ts

@@ -30,7 +30,9 @@ export default class BtnOpenPanel extends cc.Component {
 
     private async openPanel() {
         if (!this.panel_name) return;
-        await mk.ui.openPanel(this.panel_name, this.open_type);
+        let result = await mk.ui.openPanel(this.panel_name, this.open_type);
+        console.log("result:",result);
+        
         const c_count = this.onComplete.length;
         for (let i = 0; i < c_count; i++) {
             if (this.onComplete[i].handler) this.onComplete[i].emit([])

+ 1 - 2
assets/script/mk/system/PoolSystem.ts

@@ -4,8 +4,7 @@
  */
 export default class PoolSystem {
     constructor() {
-        console.log("PoolSystem:", new Date().getTime());
-
+        
     }
 
     private poolList: Map<string, cc.NodePool>;

+ 1 - 0
assets/script/mk/system/UISystem.ts

@@ -88,6 +88,7 @@ export default class UISystem extends cc.Component {
                     resolve(node_panel);
                 })
                 .catch((err) => {
+                    self.isPanelOpening = false;
                     reject(err);
                 })
         });