dzduole 1 月之前
父節點
當前提交
25a2c82782

二進制
art/fgui/assets/game/UIGame/asset/yxz_bqb1.png


二進制
art/fgui/assets/game/UIGame/asset/yxz_bqb2.png


二進制
art/fgui/assets/game/UIGame/asset/yxz_bqb3.png


二進制
art/fgui/assets/game/UIGame/asset/yxz_bqb4.png


二進制
art/fgui/assets/game/UIGame/asset/yxz_bqb5.png


二進制
art/fgui/assets/game/UIGame/asset/yxz_bqb6.png


二進制
art/fgui/assets/game/UIGame/asset/yxz_bqb7.png


二進制
art/fgui/assets/game/UIGame/asset/yxz_bqb8.png


二進制
client/laya/bin/asset/fgui/game_atlas0.png


+ 511 - 286
client/laya/bin/js/bundle.js

@@ -1074,117 +1074,6 @@
     }
     ui_UIBox.URL = "ui://isxx5ak7erstv4nm";
 
-    class UIBox extends UIBase {
-        constructor() {
-            super();
-            this.boxNum = 0;
-            this.boxMax = 10;
-            this.inAd = false;
-            this.isClose = false;
-        }
-        onConstructor() {
-            this.ui = ui_UIBox.createInstance();
-            this.contentPane = this.ui;
-            this.isEject = false;
-            this.addUIClick(this.ui.closeBtn, this.onCloseBox);
-            this.addUIClick(this.ui.openBtn, this.onOpenBox);
-            Laya.timer.loop(1000, this, this.update);
-        }
-        update() {
-            if (this.boxNum > 0 && this.boxNum < this.boxMax) {
-                this.boxNum -= 1;
-                this.upBar();
-            }
-        }
-        upBar() {
-            if (this.boxNum > this.boxMax)
-                this.boxNum = this.boxMax;
-            this.ui.bar.value = this.boxNum * 10;
-        }
-        show() {
-            super.show();
-            this.isClose = false;
-            this.boxNum = 0;
-            this.inAd = false;
-            this.upBar();
-            this.ui.t0.play();
-            this.ui.closeBtn.visible = false;
-            Laya.timer.once(3000, this, () => {
-                this.ui.closeBtn.visible = true;
-                this.ui.bar.alpha = 1;
-            });
-            Laya.timer.once(500, this, () => {
-                this.ui.t1.play();
-            });
-        }
-        hide() {
-            Laya.timer.clearAll(this);
-            Moyu.showBannerAd(false);
-            super.hide();
-        }
-        onOpenBox() {
-            this.boxNum++;
-            if (this.boxNum < this.boxMax) {
-                if (PlatMgr.getRand() < PlatMgr.boxInsertRate)
-                    Moyu.showInsertAd(0, PlatMgr.insertGap);
-            }
-            else if (this.boxNum == this.boxMax) {
-                if (PlatMgr.getRand() < PlatMgr.boxVideoRate) {
-                    this.ui.openBtn.c1.selectedIndex = 13;
-                    this.inAd = true;
-                }
-                else
-                    this.getAward();
-            }
-            else if (this.inAd) {
-                Moyu.showVideoAd(() => {
-                    this.getAward();
-                }, EAdType.box);
-            }
-            this.upBar();
-        }
-        onCloseBox() {
-            if (this.isClose)
-                this.hide();
-            else if (PlatMgr.getRand() < PlatMgr.boxBannerRate) {
-                this.isClose = true;
-                PlatMgr.showBanner(true, 0, 3000);
-            }
-            else
-                this.hide();
-        }
-        getAward() {
-            let str = "";
-            if (Math.random() < 0.5) {
-                let max = Moyu.isLegal ? 500 : 2500;
-                let num = xGame.tools.random(max, 500 + max);
-                DataMgr.setCoin(num);
-                str = "金币x" + num;
-            }
-            else {
-                let max = Moyu.isLegal ? 10 : 30;
-                let num = xGame.tools.random(max, 30 + max);
-                DataMgr.setDiamond(num);
-                str = "钻石x" + num;
-            }
-            xGame.showTip("恭喜获得-" + str);
-            this.hide();
-        }
-    }
-    UIBox.uiName = "UIBox";
-
-    class ui_UITry extends fgui.GComponent {
-        static createInstance() {
-            return (fgui.UIPackage.createObject("game", "UITry"));
-        }
-        onConstruct() {
-            this.n11 = (this.getChild("n11"));
-            this.myNode = (this.getChild("myNode"));
-            this.t0 = this.getTransition("t0");
-        }
-    }
-    ui_UITry.URL = "ui://isxx5ak7cj92v4o4";
-
     class GlobalManager {
         constructor() {
         }
@@ -1263,10 +1152,10 @@
         showInternAd(mark) {
             if (!Laya.Browser.onAndroid) {
                 console.log('zh:非android dev');
-                return;
+                return false;
             }
             if (!this.initBridge()) {
-                return;
+                return false;
             }
             let rs = this.bridge.call("showInternAd", mark);
             console.log('zh:showInternAd rs= ' + rs + '   ,mark=' + mark);
@@ -1274,13 +1163,16 @@
                 const result = JSON.parse(rs);
                 if (result.code === 200) {
                     console.log("zh:广告显示成功");
+                    return true;
                 }
                 else {
                     console.warn("zh:广告显示失败:", result.msg);
+                    return false;
                 }
             }
             catch (e) {
                 console.error("zh:解析桥接返回值失败:", e);
+                return false;
             }
         }
         showRewardAd(mark) {
@@ -1334,6 +1226,124 @@
         }
     }
 
+    class UIBox extends UIBase {
+        constructor() {
+            super();
+            this.boxNum = 0;
+            this.boxMax = 10;
+            this.inAd = false;
+            this.isClose = false;
+        }
+        onConstructor() {
+            this.ui = ui_UIBox.createInstance();
+            this.contentPane = this.ui;
+            this.isEject = false;
+            this.addUIClick(this.ui.closeBtn, this.onCloseBox);
+            this.addUIClick(this.ui.openBtn, this.onOpenBox);
+            Laya.timer.loop(1000, this, this.update);
+        }
+        update() {
+            if (this.boxNum > 0 && this.boxNum < this.boxMax) {
+                this.boxNum -= 1;
+                this.upBar();
+            }
+        }
+        upBar() {
+            if (this.boxNum > this.boxMax)
+                this.boxNum = this.boxMax;
+            this.ui.bar.value = this.boxNum * 10;
+        }
+        show() {
+            super.show();
+            this.isClose = false;
+            this.boxNum = 0;
+            this.inAd = false;
+            this.upBar();
+            this.ui.t0.play();
+            this.ui.closeBtn.visible = false;
+            Laya.timer.once(3000, this, () => {
+                this.ui.closeBtn.visible = true;
+                this.ui.bar.alpha = 1;
+            });
+            Laya.timer.once(500, this, () => {
+                this.ui.t1.play();
+            });
+        }
+        hide() {
+            Laya.timer.clearAll(this);
+            Moyu.showBannerAd(false);
+            super.hide();
+        }
+        onOpenBox() {
+            this.boxNum++;
+            if (this.boxNum < this.boxMax) {
+                if (PlatMgr.getRand() < PlatMgr.boxInsertRate)
+                    Moyu.showInsertAd(0, PlatMgr.insertGap);
+            }
+            else if (this.boxNum == this.boxMax) {
+                if (PlatMgr.getRand() < PlatMgr.boxVideoRate) {
+                    this.ui.openBtn.c1.selectedIndex = 13;
+                    this.inAd = true;
+                }
+                else
+                    this.getAward();
+            }
+            else if (this.inAd) {
+                console.log('zh:qjff_AD_for_UIBOX_onOpenBox');
+                if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIBOX_onOpenBox')) {
+                }
+                else {
+                    console.log('zh:AD 失败,直接发放奖励');
+                    this.qjff_AD_for_UIBOX_onOpenBox();
+                }
+            }
+            this.upBar();
+        }
+        qjff_AD_for_UIBOX_onOpenBox() {
+            this.getAward();
+        }
+        onCloseBox() {
+            if (this.isClose)
+                this.hide();
+            else if (PlatMgr.getRand() < PlatMgr.boxBannerRate) {
+                this.isClose = true;
+                PlatMgr.showBanner(true, 0, 3000);
+            }
+            else
+                this.hide();
+        }
+        getAward() {
+            let str = "";
+            if (Math.random() < 0.5) {
+                let max = Moyu.isLegal ? 500 : 2500;
+                let num = xGame.tools.random(max, 500 + max);
+                DataMgr.setCoin(num);
+                str = "金币x" + num;
+            }
+            else {
+                let max = Moyu.isLegal ? 10 : 30;
+                let num = xGame.tools.random(max, 30 + max);
+                DataMgr.setDiamond(num);
+                str = "钻石x" + num;
+            }
+            xGame.showTip("恭喜获得-" + str);
+            this.hide();
+        }
+    }
+    UIBox.uiName = "UIBox";
+
+    class ui_UITry extends fgui.GComponent {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "UITry"));
+        }
+        onConstruct() {
+            this.n11 = (this.getChild("n11"));
+            this.myNode = (this.getChild("myNode"));
+            this.t0 = this.getTransition("t0");
+        }
+    }
+    ui_UITry.URL = "ui://isxx5ak7cj92v4o4";
+
     class UITry extends UIBase {
         constructor() {
             super();
@@ -1452,6 +1462,7 @@
         }
         static gameInsert() {
             if (this.getRand() < this.gameInsertRate) {
+                console.log('zh:  游戏中插屏 hhhhhhhhhhhhhhhhhh');
                 Moyu.showInsertAd(xGame.tools.random(2000, 5100), this.insertGap);
             }
         }
@@ -4163,10 +4174,17 @@
             this.ui.t0.play();
         }
         videoAddCoin() {
-            Moyu.showVideoAd(() => {
-                xGame.common.playObjFlyAnim(this.coinNum, Prop.coin);
-                this.hide();
-            }, EAdType.addFailCoin);
+            console.log('zh:qjff_AD_for_UIAddCoin');
+            if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIAddCoin')) {
+            }
+            else {
+                console.log('zh:AD 失败,直接发放奖励');
+                this.qjff_AD_for_UIAddCoin();
+            }
+        }
+        qjff_AD_for_UIAddCoin() {
+            xGame.common.playObjFlyAnim(this.coinNum, Prop.coin);
+            this.hide();
         }
     }
     UIAddCoin.uiName = "UIAddCoin";
@@ -5933,11 +5951,19 @@
         clickAddLevel() {
             xGame.soundMgr.playSound(xGame.common.btnClickStr);
             Moyu.sendDataEvent("UpSkill", { id: this.data.index });
-            Moyu.showVideoAd(() => {
-                DataMgr.setBigSkill(this.data.index, 1);
-                this.updateSelf();
-                xGame.common.upSkillLevel = true;
-            }, EAdType.upSkill);
+            console.log('zh:qjff_AD_for_skilldisplay_clickAddLevel');
+            if (JSBridgeUtils.instance.showInternAd('qjff_AD_for_skilldisplay_clickAddLevel')) {
+                this.qjff_AD_for_skilldisplay_clickAddLevel();
+            }
+            else {
+                console.log('zh:AD 失败,直接发放奖励');
+                this.qjff_AD_for_skilldisplay_clickAddLevel();
+            }
+        }
+        qjff_AD_for_skilldisplay_clickAddLevel() {
+            DataMgr.setBigSkill(this.data.index, 1);
+            this.updateSelf();
+            xGame.common.upSkillLevel = true;
         }
         startGame() {
             if (this.data.index == 3) {
@@ -6325,24 +6351,112 @@
                 default:
                     break;
             }
-        }
-        getNameStr(type) {
-            switch (type) {
-                case Prop.diamond:
-                    return "Diamond";
-                case Prop.coin:
-                    return "Coins";
-                case Prop.gan1:
-                case Prop.gan2:
-                case Prop.gan3:
-                case Prop.gan4:
-                    return cfgTable.ballrodData[type - 1].name;
-                default:
-                    break;
+        }
+        getNameStr(type) {
+            switch (type) {
+                case Prop.diamond:
+                    return "Diamond";
+                case Prop.coin:
+                    return "Coins";
+                case Prop.gan1:
+                case Prop.gan2:
+                case Prop.gan3:
+                case Prop.gan4:
+                    return cfgTable.ballrodData[type - 1].name;
+                default:
+                    break;
+            }
+        }
+    }
+    UIGetAward.uiName = "UIGetAward";
+
+    class ui_UIRepentProp extends fgui.GComponent {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "UIRepentProp"));
+        }
+        onConstruct() {
+            this.c1 = this.getController("c1");
+            this.n11 = (this.getChild("n11"));
+            this.regretNode = (this.getChild("regretNode"));
+            this.helpLineNode = (this.getChild("helpLineNode"));
+            this.t0 = this.getTransition("t0");
+        }
+    }
+    ui_UIRepentProp.URL = "ui://isxx5ak7trk948v";
+
+    class UIRepentProp extends UIBase {
+        constructor() {
+            super();
+            this.viewType = 0;
+            this.regretType = 0;
+        }
+        onConstructor() {
+            this.ui = ui_UIRepentProp.createInstance();
+            this.contentPane = this.ui;
+            this.isEject = false;
+            this.addUIClick(this.ui.regretNode.cancelBtn, this.hideSelf);
+            this.addUIClick(this.ui.regretNode.videoBtn, this.videoRegret);
+            this.addUIClick(this.ui.helpLineNode.cancelBtn, this.hideSelf);
+            this.addUIClick(this.ui.helpLineNode.videoBtn, this.videoAddHelpLine);
+        }
+        show(viewType, regretType, callback) {
+            PlatMgr.showInsert(true);
+            this.viewType = viewType;
+            this.regretType = regretType;
+            this.callback = callback;
+            super.show();
+            this.ui.t0.play();
+            this.ui.c1.selectedIndex = this.viewType;
+            this.ui.regretNode.tipsTxt.text = this.regretType == 0 ? "Missed the target ball!" : "The cue ball has been pocketed!";
+            if (this.viewType == 0) {
+                let guide = DataMgr.getGuideHelpLine();
+                this.ui.helpLineNode.c1.selectedIndex = guide == 0 ? 1 : 0;
+                this.ui.helpLineNode.videoBtn.c1.selectedIndex = guide == 0 ? 1 : 0;
+            }
+            xGame.common.gameMgr.gamePause = true;
+        }
+        hideSelf() {
+            xGame.common.gameMgr.gamePause = false;
+            this.callback && this.callback(false);
+            this.hide();
+        }
+        videoRegret() {
+            console.log('zh:qjff_AD_for_UIrepentProp_videoRegret');
+            if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIrepentProp_videoRegret')) {
+            }
+            else {
+                console.log('zh:AD 失败,直接发放奖励');
+                this.qjff_AD_for_UIrepentProp_videoRegret();
+            }
+        }
+        qjff_AD_for_UIrepentProp_videoRegret() {
+            this.callback && this.callback(true);
+            this.hideSelf();
+        }
+        videoAddHelpLine() {
+            let guide = DataMgr.getGuideHelpLine();
+            if (guide == 0) {
+                this.callback && this.callback(true);
+                this.hideSelf();
+                DataMgr.setGuideHelpLine();
+                xGame.common.gameUI.ui.guideNode.visible = false;
+            }
+            else {
+                console.log('zh:qjff_AD_for_UIrepentProp_videoAddHelpLine');
+                if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIrepentProp_videoAddHelpLine')) {
+                }
+                else {
+                    console.log('zh:AD 失败,直接发放奖励');
+                    this.qjff_AD_for_UIrepentProp_videoAddHelpLine();
+                }
             }
         }
+        qjff_AD_for_UIrepentProp_videoAddHelpLine() {
+            this.callback && this.callback(true);
+            this.hideSelf();
+        }
     }
-    UIGetAward.uiName = "UIGetAward";
+    UIRepentProp.uiName = "UIRepentProp";
 
     class UIMain extends UIBase {
         constructor() {
@@ -6378,29 +6492,41 @@
                     let dui6 = xGame.uiMgr.getUI(UIGameEnd);
                     dui6.qjff_AD_for_uiGameEnd(parseInt(temp_level));
                     break;
-                case '5':
-                    let dui7 = xGame.uiMgr.getUI(UISign);
-                    dui7.qjff_AD_for_uisign();
+                case 'qjff_AD_for_uiAddProp_videoGetDiamond':
+                    let dui7 = xGame.uiMgr.getUI(UIAddProp);
+                    dui7.qjff_AD_for_uiAddProp_videoGetDiamond();
+                    break;
+                case 'qjff_AD_for_uiAddProp_videoGetCoin':
+                    let dui8 = xGame.uiMgr.getUI(UIAddProp);
+                    dui8.qjff_AD_for_uiAddProp_videoGetCoin();
+                    break;
+                case 'qjff_AD_for_UIrepentProp_videoRegret':
+                    let dui9 = xGame.uiMgr.getUI(UIRepentProp);
+                    dui9.qjff_AD_for_UIrepentProp_videoRegret();
                     break;
-                case '6':
-                    let dui8 = xGame.uiMgr.getUI(UISign);
-                    dui8.qjff_AD_for_uisign();
+                case 'qjff_AD_for_UIrepentProp_videoAddHelpLine':
+                    let dui10 = xGame.uiMgr.getUI(UIRepentProp);
+                    dui10.qjff_AD_for_UIrepentProp_videoAddHelpLine();
                     break;
-                case '7':
-                    let dui9 = xGame.uiMgr.getUI(UISign);
-                    dui9.qjff_AD_for_uisign();
+                case 'qjff_AD_for_UIBOX_onOpenBox':
+                    let dui11 = xGame.uiMgr.getUI(UIBox);
+                    dui11.qjff_AD_for_UIBOX_onOpenBox();
                     break;
-                case '5':
-                    let dui10 = xGame.uiMgr.getUI(UISign);
-                    dui10.qjff_AD_for_uisign();
+                case 'qjff_AD_for_UIAddCoin':
+                    let dui12 = xGame.uiMgr.getUI(UIAddCoin);
+                    dui12.qjff_AD_for_UIAddCoin();
                     break;
-                case '5':
-                    let dui11 = xGame.uiMgr.getUI(UISign);
-                    dui11.qjff_AD_for_uisign();
+                case '111a':
+                    let dui14 = xGame.uiMgr.getUI(UISign);
+                    dui14.qjff_AD_for_uisign();
                     break;
-                case '5':
-                    let dui12 = xGame.uiMgr.getUI(UISign);
-                    dui12.qjff_AD_for_uisign();
+                case '222a':
+                    let dui15 = xGame.uiMgr.getUI(UISign);
+                    dui15.qjff_AD_for_uisign();
+                    break;
+                case '333a':
+                    let dui16 = xGame.uiMgr.getUI(UISign);
+                    dui16.qjff_AD_for_uisign();
                     break;
                 default:
                     console.log('zh:未知的方法名字' + t);
@@ -6588,12 +6714,9 @@
         }
         startGlobal() {
             xGame.uiMgr.Show(UIMsg, "Coming Soon");
-            JSBridgeUtils.instance.showInternAd('全球');
         }
         startWeekly() {
             xGame.uiMgr.Show(UIMsg, "Coming Soon");
-            GlobalManager.instance.registerMethod('zhouSaiMonth', this.zhouSaiMonth);
-            JSBridgeUtils.instance.showRewardAd('zhouSaiMonth');
         }
         zhouSaiMonth() {
             console.log('zh:  zhouSaiMonth 被调用');
@@ -7086,80 +7209,6 @@
     }
     UIGameEnd.uiName = "UIGameEnd";
 
-    class ui_UIRepentProp extends fgui.GComponent {
-        static createInstance() {
-            return (fgui.UIPackage.createObject("game", "UIRepentProp"));
-        }
-        onConstruct() {
-            this.c1 = this.getController("c1");
-            this.n11 = (this.getChild("n11"));
-            this.regretNode = (this.getChild("regretNode"));
-            this.helpLineNode = (this.getChild("helpLineNode"));
-            this.t0 = this.getTransition("t0");
-        }
-    }
-    ui_UIRepentProp.URL = "ui://isxx5ak7trk948v";
-
-    class UIRepentProp extends UIBase {
-        constructor() {
-            super();
-            this.viewType = 0;
-            this.regretType = 0;
-        }
-        onConstructor() {
-            this.ui = ui_UIRepentProp.createInstance();
-            this.contentPane = this.ui;
-            this.isEject = false;
-            this.addUIClick(this.ui.regretNode.cancelBtn, this.hideSelf);
-            this.addUIClick(this.ui.regretNode.videoBtn, this.videoRegret);
-            this.addUIClick(this.ui.helpLineNode.cancelBtn, this.hideSelf);
-            this.addUIClick(this.ui.helpLineNode.videoBtn, this.videoAddHelpLine);
-        }
-        show(viewType, regretType, callback) {
-            PlatMgr.showInsert(true);
-            this.viewType = viewType;
-            this.regretType = regretType;
-            this.callback = callback;
-            super.show();
-            this.ui.t0.play();
-            this.ui.c1.selectedIndex = this.viewType;
-            this.ui.regretNode.tipsTxt.text = this.regretType == 0 ? "Missed the target ball!" : "The cue ball has been pocketed!";
-            if (this.viewType == 0) {
-                let guide = DataMgr.getGuideHelpLine();
-                this.ui.helpLineNode.c1.selectedIndex = guide == 0 ? 1 : 0;
-                this.ui.helpLineNode.videoBtn.c1.selectedIndex = guide == 0 ? 1 : 0;
-            }
-            xGame.common.gameMgr.gamePause = true;
-        }
-        hideSelf() {
-            xGame.common.gameMgr.gamePause = false;
-            this.callback && this.callback(false);
-            this.hide();
-        }
-        videoRegret() {
-            Moyu.showVideoAd(() => {
-                this.callback && this.callback(true);
-                this.hideSelf();
-            }, EAdType.regretBall);
-        }
-        videoAddHelpLine() {
-            let guide = DataMgr.getGuideHelpLine();
-            if (guide == 0) {
-                this.callback && this.callback(true);
-                this.hideSelf();
-                DataMgr.setGuideHelpLine();
-                xGame.common.gameUI.ui.guideNode.visible = false;
-            }
-            else {
-                Moyu.showVideoAd(() => {
-                    this.callback && this.callback(true);
-                    this.hideSelf();
-                }, EAdType.longHelpLine);
-            }
-        }
-    }
-    UIRepentProp.uiName = "UIRepentProp";
-
     class ui_UIVideoShare extends fgui.GComponent {
         static createInstance() {
             return (fgui.UIPackage.createObject("game", "UIVideoShare"));
@@ -10362,17 +10411,31 @@
             }
         }
         videoGetDiamond() {
+            console.log('zh:qjff_AD_for_uiAddProp_videoGetDiamond');
+            if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetDiamond')) {
+            }
+            else {
+                console.log('zh:AD 失败,直接发放奖励');
+                this.qjff_AD_for_uiAddProp_videoGetDiamond();
+            }
+        }
+        qjff_AD_for_uiAddProp_videoGetDiamond() {
             let num = cfgTable.moneyData[2].num;
-            Moyu.showVideoAd(() => {
-                xGame.common.playObjFlyAnim(num, Prop.diamond);
-                this.closeSelf();
-            }, EAdType.addDiamond);
+            xGame.common.playObjFlyAnim(num, Prop.diamond);
+            this.closeSelf();
         }
         videoGetCoin() {
-            Moyu.showVideoAd(() => {
-                xGame.common.playObjFlyAnim(2000, Prop.coin);
-                this.closeSelf();
-            }, EAdType.addCoin);
+            console.log('zh:qjff_AD_for_uiAddProp_videoGetCoin');
+            if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetCoin')) {
+            }
+            else {
+                console.log('zh:AD 失败,直接发放奖励');
+                this.qjff_AD_for_uiAddProp_videoGetCoin();
+            }
+        }
+        qjff_AD_for_uiAddProp_videoGetCoin() {
+            xGame.common.playObjFlyAnim(2000, Prop.coin);
+            this.closeSelf();
         }
         shareGetDiamond() {
             let times = DataMgr.getShareDiamondTimes();
@@ -10405,6 +10468,8 @@
                 }
             }
         }
+        qjff_AD_for_uiAddProp_shareGetDiamond() {
+        }
         openPutBallView() {
             let end = xGame.uiMgr.getUI(UIGameEnd);
             let skill = xGame.uiMgr.getUI(UISkill);
@@ -17602,10 +17667,17 @@
             this.hide();
         }
         videoRegret() {
-            Moyu.showVideoAd(() => {
-                this.callback && this.callback(true);
-                this.hideSelf();
-            }, EAdType.regretBall);
+            console.log('zh:qjff_AD_for_UIrepentProp_videoRegret');
+            if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIrepentProp_videoRegret')) {
+            }
+            else {
+                console.log('zh:AD 失败,直接发放奖励');
+                this.qjff_AD_for_UIrepentProp_videoRegret();
+            }
+        }
+        qjff_AD_for_UIrepentProp_videoRegret() {
+            this.callback && this.callback(true);
+            this.hideSelf();
         }
         videoAddHelpLine() {
             let guide = DataMgr.getGuideHelpLine();
@@ -17616,12 +17688,19 @@
                 xGame.common.gameUI.ui.guideNode.visible = false;
             }
             else {
-                Moyu.showVideoAd(() => {
-                    this.callback && this.callback(true);
-                    this.hideSelf();
-                }, EAdType.longHelpLine);
+                console.log('zh:qjff_AD_for_UIrepentProp_videoAddHelpLine');
+                if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIrepentProp_videoAddHelpLine')) {
+                }
+                else {
+                    console.log('zh:AD 失败,直接发放奖励');
+                    this.qjff_AD_for_UIrepentProp_videoAddHelpLine();
+                }
             }
         }
+        qjff_AD_for_UIrepentProp_videoAddHelpLine() {
+            this.callback && this.callback(true);
+            this.hideSelf();
+        }
     }
     UIRepentProp$1.uiName = "UIRepentProp";
 
@@ -18437,10 +18516,17 @@
             this.ui.t0.play();
         }
         videoAddCoin() {
-            Moyu.showVideoAd(() => {
-                xGame.common.playObjFlyAnim(this.coinNum, Prop.coin);
-                this.hide();
-            }, EAdType.addFailCoin);
+            console.log('zh:qjff_AD_for_UIAddCoin');
+            if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIAddCoin')) {
+            }
+            else {
+                console.log('zh:AD 失败,直接发放奖励');
+                this.qjff_AD_for_UIAddCoin();
+            }
+        }
+        qjff_AD_for_UIAddCoin() {
+            xGame.common.playObjFlyAnim(this.coinNum, Prop.coin);
+            this.hide();
         }
     }
     UIAddCoin$1.uiName = "UIAddCoin";
@@ -19366,11 +19452,19 @@
         clickAddLevel() {
             xGame.soundMgr.playSound(xGame.common.btnClickStr);
             Moyu.sendDataEvent("UpSkill", { id: this.data.index });
-            Moyu.showVideoAd(() => {
-                DataMgr.setBigSkill(this.data.index, 1);
-                this.updateSelf();
-                xGame.common.upSkillLevel = true;
-            }, EAdType.upSkill);
+            console.log('zh:qjff_AD_for_skilldisplay_clickAddLevel');
+            if (JSBridgeUtils.instance.showInternAd('qjff_AD_for_skilldisplay_clickAddLevel')) {
+                this.qjff_AD_for_skilldisplay_clickAddLevel();
+            }
+            else {
+                console.log('zh:AD 失败,直接发放奖励');
+                this.qjff_AD_for_skilldisplay_clickAddLevel();
+            }
+        }
+        qjff_AD_for_skilldisplay_clickAddLevel() {
+            DataMgr.setBigSkill(this.data.index, 1);
+            this.updateSelf();
+            xGame.common.upSkillLevel = true;
         }
         startGame() {
             if (this.data.index == 3) {
@@ -19659,17 +19753,31 @@
             }
         }
         videoGetDiamond() {
+            console.log('zh:qjff_AD_for_uiAddProp_videoGetDiamond');
+            if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetDiamond')) {
+            }
+            else {
+                console.log('zh:AD 失败,直接发放奖励');
+                this.qjff_AD_for_uiAddProp_videoGetDiamond();
+            }
+        }
+        qjff_AD_for_uiAddProp_videoGetDiamond() {
             let num = cfgTable.moneyData[2].num;
-            Moyu.showVideoAd(() => {
-                xGame.common.playObjFlyAnim(num, Prop.diamond);
-                this.closeSelf();
-            }, EAdType.addDiamond);
+            xGame.common.playObjFlyAnim(num, Prop.diamond);
+            this.closeSelf();
         }
         videoGetCoin() {
-            Moyu.showVideoAd(() => {
-                xGame.common.playObjFlyAnim(2000, Prop.coin);
-                this.closeSelf();
-            }, EAdType.addCoin);
+            console.log('zh:qjff_AD_for_uiAddProp_videoGetCoin');
+            if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetCoin')) {
+            }
+            else {
+                console.log('zh:AD 失败,直接发放奖励');
+                this.qjff_AD_for_uiAddProp_videoGetCoin();
+            }
+        }
+        qjff_AD_for_uiAddProp_videoGetCoin() {
+            xGame.common.playObjFlyAnim(2000, Prop.coin);
+            this.closeSelf();
         }
         shareGetDiamond() {
             let times = DataMgr.getShareDiamondTimes();
@@ -19702,6 +19810,8 @@
                 }
             }
         }
+        qjff_AD_for_uiAddProp_shareGetDiamond() {
+        }
         openPutBallView() {
             let end = xGame.uiMgr.getUI(UIGameEnd$1);
             let skill = xGame.uiMgr.getUI(UISkill$1);
@@ -20944,6 +21054,112 @@
     }
     UIGetAward$1.uiName = "UIGetAward";
 
+    class UIBox$1 extends UIBase {
+        constructor() {
+            super();
+            this.boxNum = 0;
+            this.boxMax = 10;
+            this.inAd = false;
+            this.isClose = false;
+        }
+        onConstructor() {
+            this.ui = ui_UIBox.createInstance();
+            this.contentPane = this.ui;
+            this.isEject = false;
+            this.addUIClick(this.ui.closeBtn, this.onCloseBox);
+            this.addUIClick(this.ui.openBtn, this.onOpenBox);
+            Laya.timer.loop(1000, this, this.update);
+        }
+        update() {
+            if (this.boxNum > 0 && this.boxNum < this.boxMax) {
+                this.boxNum -= 1;
+                this.upBar();
+            }
+        }
+        upBar() {
+            if (this.boxNum > this.boxMax)
+                this.boxNum = this.boxMax;
+            this.ui.bar.value = this.boxNum * 10;
+        }
+        show() {
+            super.show();
+            this.isClose = false;
+            this.boxNum = 0;
+            this.inAd = false;
+            this.upBar();
+            this.ui.t0.play();
+            this.ui.closeBtn.visible = false;
+            Laya.timer.once(3000, this, () => {
+                this.ui.closeBtn.visible = true;
+                this.ui.bar.alpha = 1;
+            });
+            Laya.timer.once(500, this, () => {
+                this.ui.t1.play();
+            });
+        }
+        hide() {
+            Laya.timer.clearAll(this);
+            Moyu.showBannerAd(false);
+            super.hide();
+        }
+        onOpenBox() {
+            this.boxNum++;
+            if (this.boxNum < this.boxMax) {
+                if (PlatMgr.getRand() < PlatMgr.boxInsertRate)
+                    Moyu.showInsertAd(0, PlatMgr.insertGap);
+            }
+            else if (this.boxNum == this.boxMax) {
+                if (PlatMgr.getRand() < PlatMgr.boxVideoRate) {
+                    this.ui.openBtn.c1.selectedIndex = 13;
+                    this.inAd = true;
+                }
+                else
+                    this.getAward();
+            }
+            else if (this.inAd) {
+                console.log('zh:qjff_AD_for_UIBOX_onOpenBox');
+                if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIBOX_onOpenBox')) {
+                }
+                else {
+                    console.log('zh:AD 失败,直接发放奖励');
+                    this.qjff_AD_for_UIBOX_onOpenBox();
+                }
+            }
+            this.upBar();
+        }
+        qjff_AD_for_UIBOX_onOpenBox() {
+            this.getAward();
+        }
+        onCloseBox() {
+            if (this.isClose)
+                this.hide();
+            else if (PlatMgr.getRand() < PlatMgr.boxBannerRate) {
+                this.isClose = true;
+                PlatMgr.showBanner(true, 0, 3000);
+            }
+            else
+                this.hide();
+        }
+        getAward() {
+            let str = "";
+            if (Math.random() < 0.5) {
+                let max = Moyu.isLegal ? 500 : 2500;
+                let num = xGame.tools.random(max, 500 + max);
+                DataMgr.setCoin(num);
+                str = "金币x" + num;
+            }
+            else {
+                let max = Moyu.isLegal ? 10 : 30;
+                let num = xGame.tools.random(max, 30 + max);
+                DataMgr.setDiamond(num);
+                str = "钻石x" + num;
+            }
+            xGame.showTip("恭喜获得-" + str);
+            this.hide();
+        }
+    }
+    UIBox$1.uiName = "UIBox";
+
     class UIMain$1 extends UIBase {
         constructor() {
             super();
@@ -20978,29 +21194,41 @@
                     let dui6 = xGame.uiMgr.getUI(UIGameEnd$1);
                     dui6.qjff_AD_for_uiGameEnd(parseInt(temp_level));
                     break;
-                case '5':
-                    let dui7 = xGame.uiMgr.getUI(UISign$1);
-                    dui7.qjff_AD_for_uisign();
+                case 'qjff_AD_for_uiAddProp_videoGetDiamond':
+                    let dui7 = xGame.uiMgr.getUI(UIAddProp$1);
+                    dui7.qjff_AD_for_uiAddProp_videoGetDiamond();
+                    break;
+                case 'qjff_AD_for_uiAddProp_videoGetCoin':
+                    let dui8 = xGame.uiMgr.getUI(UIAddProp$1);
+                    dui8.qjff_AD_for_uiAddProp_videoGetCoin();
+                    break;
+                case 'qjff_AD_for_UIrepentProp_videoRegret':
+                    let dui9 = xGame.uiMgr.getUI(UIRepentProp$1);
+                    dui9.qjff_AD_for_UIrepentProp_videoRegret();
+                    break;
+                case 'qjff_AD_for_UIrepentProp_videoAddHelpLine':
+                    let dui10 = xGame.uiMgr.getUI(UIRepentProp$1);
+                    dui10.qjff_AD_for_UIrepentProp_videoAddHelpLine();
                     break;
-                case '6':
-                    let dui8 = xGame.uiMgr.getUI(UISign$1);
-                    dui8.qjff_AD_for_uisign();
+                case 'qjff_AD_for_UIBOX_onOpenBox':
+                    let dui11 = xGame.uiMgr.getUI(UIBox$1);
+                    dui11.qjff_AD_for_UIBOX_onOpenBox();
                     break;
-                case '7':
-                    let dui9 = xGame.uiMgr.getUI(UISign$1);
-                    dui9.qjff_AD_for_uisign();
+                case 'qjff_AD_for_UIAddCoin':
+                    let dui12 = xGame.uiMgr.getUI(UIAddCoin$1);
+                    dui12.qjff_AD_for_UIAddCoin();
                     break;
-                case '5':
-                    let dui10 = xGame.uiMgr.getUI(UISign$1);
-                    dui10.qjff_AD_for_uisign();
+                case '111a':
+                    let dui14 = xGame.uiMgr.getUI(UISign$1);
+                    dui14.qjff_AD_for_uisign();
                     break;
-                case '5':
-                    let dui11 = xGame.uiMgr.getUI(UISign$1);
-                    dui11.qjff_AD_for_uisign();
+                case '222a':
+                    let dui15 = xGame.uiMgr.getUI(UISign$1);
+                    dui15.qjff_AD_for_uisign();
                     break;
-                case '5':
-                    let dui12 = xGame.uiMgr.getUI(UISign$1);
-                    dui12.qjff_AD_for_uisign();
+                case '333a':
+                    let dui16 = xGame.uiMgr.getUI(UISign$1);
+                    dui16.qjff_AD_for_uisign();
                     break;
                 default:
                     console.log('zh:未知的方法名字' + t);
@@ -21188,12 +21416,9 @@
         }
         startGlobal() {
             xGame.uiMgr.Show(UIMsg$1, "Coming Soon");
-            JSBridgeUtils.instance.showInternAd('全球');
         }
         startWeekly() {
             xGame.uiMgr.Show(UIMsg$1, "Coming Soon");
-            GlobalManager.instance.registerMethod('zhouSaiMonth', this.zhouSaiMonth);
-            JSBridgeUtils.instance.showRewardAd('zhouSaiMonth');
         }
         zhouSaiMonth() {
             console.log('zh:  zhouSaiMonth 被调用');

文件差異過大導致無法顯示
+ 0 - 0
client/laya/bin/js/bundle.js.map


+ 2 - 0
client/laya/src/game/PlatMgr.ts

@@ -149,7 +149,9 @@ export default class PlatMgr {
     {
         if(this.getRand()<this.gameInsertRate)
         {
+            console.log('zh:  游戏中插屏 hhhhhhhhhhhhhhhhhh')
             Moyu.showInsertAd(xGame.tools.random(2000,5100),this.insertGap);
+            //zh:todo 此处可以不接aad
         }
     }
     public static showRateBanner()

+ 27 - 4
client/laya/src/ui/UIAddCoin.ts

@@ -3,6 +3,9 @@ import { EAdType, Prop } from "../data/Define";
 import UIBase from "../fgui/core/UIBase";
 import ui_UIAddCoin from "../fgui/res/game/ui_UIAddCoin";
 import { xGame } from "../xGame";
+import GlobalManager from "../utils/GlobalManager";
+import JSBridgeUtils from "../utils/JSBridgeUtils";
+
 export default class UIAddCoin extends UIBase {
     protected ui: ui_UIAddCoin;
     //
@@ -23,10 +26,30 @@ export default class UIAddCoin extends UIBase {
         this.ui.t0.play();
     }
     videoAddCoin() {
-        Moyu.showVideoAd(() => {
-            xGame.common.playObjFlyAnim(this.coinNum, Prop.coin);
-            this.hide();
-        }, EAdType.addFailCoin);
+
+        console.log('zh:qjff_AD_for_UIAddCoin')
+        // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
+        // JSBridgeUtils.instance.showRewardAd('xxxxx');
+        //需要传递参数
+        //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+        if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIAddCoin')) {
+
+        } else {
+            console.log('zh:AD 失败,直接发放奖励')
+            this.qjff_AD_for_UIAddCoin();
+        }
+
+        // Moyu.showVideoAd(() => {
+        //     xGame.common.playObjFlyAnim(this.coinNum, Prop.coin);
+        //     this.hide();
+        // }, EAdType.addFailCoin);
     }
+
+    public qjff_AD_for_UIAddCoin() {
+        xGame.common.playObjFlyAnim(this.coinNum, Prop.coin);
+        this.hide();
+    }
+
+
 }
 UIAddCoin.uiName = "UIAddCoin";

+ 64 - 9
client/laya/src/ui/UIAddProp.ts

@@ -10,6 +10,11 @@ import UILevelDisplay from "./UILevelDisplay";
 import UIMain from "./UIMain";
 import UISkill from "./UISkill";
 import UIMsg from "./UIMsg";
+
+import GlobalManager from "../utils/GlobalManager";
+import JSBridgeUtils from "../utils/JSBridgeUtils";
+
+
 export default class UIAddProp extends UIBase {
     protected ui: ui_UIAddProp;
     //
@@ -123,18 +128,59 @@ export default class UIAddProp extends UIBase {
         }
     }
     videoGetDiamond() {
+        console.log('zh:qjff_AD_for_uiAddProp_videoGetDiamond')
+        // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
+        // JSBridgeUtils.instance.showRewardAd('xxxxx');
+        //需要传递参数
+        //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+        if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetDiamond')) {
+
+        } else {
+            console.log('zh:AD 失败,直接发放奖励')
+            this.qjff_AD_for_uiAddProp_videoGetDiamond();
+        }
+        // let num = cfgTable.moneyData[2].num;
+        // Moyu.showVideoAd(() => {
+        //     xGame.common.playObjFlyAnim(num, Prop.diamond);
+        //     this.closeSelf();
+        // }, EAdType.addDiamond)
+    }
+
+
+    public qjff_AD_for_uiAddProp_videoGetDiamond() {
         let num = cfgTable.moneyData[2].num;
-        Moyu.showVideoAd(() => {
-            xGame.common.playObjFlyAnim(num, Prop.diamond);
-            this.closeSelf();
-        }, EAdType.addDiamond)
+        xGame.common.playObjFlyAnim(num, Prop.diamond);
+        this.closeSelf();
     }
+
+
+
+
     videoGetCoin() {
-        Moyu.showVideoAd(() => {
-            xGame.common.playObjFlyAnim(2000, Prop.coin);
-            this.closeSelf();
-        }, EAdType.addCoin)
+
+        console.log('zh:qjff_AD_for_uiAddProp_videoGetCoin')
+        // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
+        // JSBridgeUtils.instance.showRewardAd('xxxxx');
+        //需要传递参数
+        //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+        if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetCoin')) {
+
+        } else {
+            console.log('zh:AD 失败,直接发放奖励')
+            this.qjff_AD_for_uiAddProp_videoGetCoin();
+        }
+        // Moyu.showVideoAd(() => {
+        //     xGame.common.playObjFlyAnim(2000, Prop.coin);
+        //     this.closeSelf();
+        // }, EAdType.addCoin)
     }
+
+    public qjff_AD_for_uiAddProp_videoGetCoin() {
+        xGame.common.playObjFlyAnim(2000, Prop.coin);
+        this.closeSelf();
+    }
+
+
     shareGetDiamond() {
         let times = DataMgr.getShareDiamondTimes();
         if (times >= xGame.common.maxShareDiamondTimes) {
@@ -158,7 +204,7 @@ export default class UIAddProp extends UIBase {
             }
             else {
                 //
-                Moyu.showVideoAd(() => {
+                Moyu.showVideoAd(() => {//分享
                     let diamond = xGame.common.randomNum(50, 100);
                     xGame.common.playObjFlyAnim(diamond, Prop.diamond);
                     DataMgr.setShareDiamondTimes(1);
@@ -168,6 +214,15 @@ export default class UIAddProp extends UIBase {
             }
         }
     }
+
+
+    public qjff_AD_for_uiAddProp_shareGetDiamond() {
+
+    }
+
+
+
+
     //进入摆球达人界面
     openPutBallView() {
         let end = xGame.uiMgr.getUI(UIGameEnd);

+ 76 - 64
client/laya/src/ui/UIBox.ts

@@ -4,14 +4,15 @@ import UIBase from "../fgui/core/UIBase";
 import ui_UIBox from "../fgui/res/game/ui_UIBox";
 import PlatMgr from "../game/PlatMgr";
 import { xGame } from "../xGame";
-
+import GlobalManager from "../utils/GlobalManager";
+import JSBridgeUtils from "../utils/JSBridgeUtils";
 export default class UIBox extends UIBase {
     protected ui: ui_UIBox;
     //
     private boxNum = 0;
-    private boxMax=10;
-    private inAd=false;
-    private isClose=false;
+    private boxMax = 10;
+    private inAd = false;
+    private isClose = false;
     public constructor() {
         super();
     }
@@ -21,100 +22,111 @@ export default class UIBox extends UIBase {
         this.isEject = false;
         this.addUIClick(this.ui.closeBtn, this.onCloseBox);
         this.addUIClick(this.ui.openBtn, this.onOpenBox);
-        Laya.timer.loop(1000,this,this.update);
+        Laya.timer.loop(1000, this, this.update);
     }
-    update()
-    {
-        if(this.boxNum>0 && this.boxNum<this.boxMax)
-        {
-            this.boxNum-=1;
+    update() {
+        if (this.boxNum > 0 && this.boxNum < this.boxMax) {
+            this.boxNum -= 1;
             this.upBar();
         }
     }
-    upBar()
-    {
-        if(this.boxNum>this.boxMax)
-            this.boxNum=this.boxMax;
-        this.ui.bar.value=this.boxNum*10;
+    upBar() {
+        if (this.boxNum > this.boxMax)
+            this.boxNum = this.boxMax;
+        this.ui.bar.value = this.boxNum * 10;
     }
     public show(): void {
         super.show();
-        this.isClose=false;
-        this.boxNum=0;
-        this.inAd=false;
+        this.isClose = false;
+        this.boxNum = 0;
+        this.inAd = false;
         this.upBar();
         this.ui.t0.play();
-        this.ui.closeBtn.visible=false;
-        Laya.timer.once(3000,this,()=>{
-            this.ui.closeBtn.visible=true;
-            this.ui.bar.alpha=1;
+        this.ui.closeBtn.visible = false;
+        Laya.timer.once(3000, this, () => {
+            this.ui.closeBtn.visible = true;
+            this.ui.bar.alpha = 1;
         })
-        Laya.timer.once(500,this,()=>{
+        Laya.timer.once(500, this, () => {
             this.ui.t1.play();
         })
     }
-    public hide()
-    {
+    public hide() {
         Laya.timer.clearAll(this);
         Moyu.showBannerAd(false);
         super.hide();
     }
-    onOpenBox()
-    {
+    onOpenBox() {
         this.boxNum++;
-        if(this.boxNum<this.boxMax)
-        {
-            if(PlatMgr.getRand()< PlatMgr.boxInsertRate)
-                Moyu.showInsertAd(0,PlatMgr.insertGap);
+        if (this.boxNum < this.boxMax) {
+            if (PlatMgr.getRand() < PlatMgr.boxInsertRate)
+                Moyu.showInsertAd(0, PlatMgr.insertGap);
         }
-        else if(this.boxNum==this.boxMax)
-        {
-            if(PlatMgr.getRand()< PlatMgr.boxVideoRate)
-            {
-                this.ui.openBtn.c1.selectedIndex=13;
-                this.inAd=true;
+        else if (this.boxNum == this.boxMax) {
+            if (PlatMgr.getRand() < PlatMgr.boxVideoRate) {
+                this.ui.openBtn.c1.selectedIndex = 13;
+                this.inAd = true;
             }
             else
                 this.getAward();
         }
-        else if(this.inAd)
-        {
-            Moyu.showVideoAd(() => {
-                this.getAward();
-            }, EAdType.box);
+        else if (this.inAd) {
+
+
+            console.log('zh:qjff_AD_for_UIBOX_onOpenBox')
+            // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
+            // JSBridgeUtils.instance.showRewardAd('xxxxx');
+            //需要传递参数
+            //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+            if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIBOX_onOpenBox')) {
+
+            } else {
+                console.log('zh:AD 失败,直接发放奖励')
+                this.qjff_AD_for_UIBOX_onOpenBox();
+            }
+
+
+
+            // Moyu.showVideoAd(() => {
+            //     this.getAward();
+            // }, EAdType.box);
         }
         this.upBar();
     }
-    onCloseBox()
-    {
-        if(this.isClose)
+
+
+
+
+    public qjff_AD_for_UIBOX_onOpenBox() {
+        this.getAward();
+    }
+
+
+    onCloseBox() {
+        if (this.isClose)
             this.hide();
-        else if(PlatMgr.getRand()<PlatMgr.boxBannerRate)
-        {
-            this.isClose=true;
-            PlatMgr.showBanner(true,0,3000);
+        else if (PlatMgr.getRand() < PlatMgr.boxBannerRate) {
+            this.isClose = true;
+            PlatMgr.showBanner(true, 0, 3000);
         }
         else
             this.hide();
     }
-    getAward()
-    {
-        let str="";
-        if(Math.random()<0.5)
-        {
-            let max=Moyu.isLegal?500:2500;
-            let num=xGame.tools.random(max,500+max);
+    getAward() {
+        let str = "";
+        if (Math.random() < 0.5) {
+            let max = Moyu.isLegal ? 500 : 2500;
+            let num = xGame.tools.random(max, 500 + max);
             DataMgr.setCoin(num);
-            str="金币x"+num;
-        } 
-        else
-        {
-            let max=Moyu.isLegal?10:30;
-            let num=xGame.tools.random(max,30+max);
+            str = "金币x" + num;
+        }
+        else {
+            let max = Moyu.isLegal ? 10 : 30;
+            let num = xGame.tools.random(max, 30 + max);
             DataMgr.setDiamond(num);
-            str="钻石x"+num;
+            str = "钻石x" + num;
         }
-        xGame.showTip("恭喜获得-"+str);
+        xGame.showTip("恭喜获得-" + str);
         this.hide();
     }
 }

+ 43 - 22
client/laya/src/ui/UIMain.ts

@@ -24,9 +24,13 @@ import UIModeSelection from "./UIModeSelection";
 import GlobalManager from "../utils/GlobalManager";
 import JSBridgeUtils from "../utils/JSBridgeUtils"; // 根据你的目录结构调整路径
 import SkillDisplay from "./item/SkillDisplay";
+
 import UITry from "./UITry";
 import UIPower from "./UIPower";
 import UIGetAward from "./UIGetAward";
+import UIRepentProp from "./UIRepentProp";
+import UIBox from "./UIBox";
+import UIAddCoin from "./UIAddCoin";
 
 
 export default class UIMain extends UIBase {
@@ -63,37 +67,54 @@ export default class UIMain extends UIBase {
                 dui5.qjff_AD_for_uigetAward();
                 break;
             case 'qjff_AD_for_uiGameEnd':
-                let temp_level =  Laya.LocalStorage.getItem('temp_qjff_AD_for_uiGameEnd_level');
+                let temp_level = Laya.LocalStorage.getItem('temp_qjff_AD_for_uiGameEnd_level');
                 let dui6 = <UIGameEnd>xGame.uiMgr.getUI(UIGameEnd);
                 dui6.qjff_AD_for_uiGameEnd(parseInt(temp_level))
                 break;
-            case '5':
-                let dui7 = <UISign>xGame.uiMgr.getUI(UISign);
-                dui7.qjff_AD_for_uisign();
+            case 'qjff_AD_for_uiAddProp_videoGetDiamond':
+
+                let dui7 = <UIAddProp>xGame.uiMgr.getUI(UIAddProp);
+                dui7.qjff_AD_for_uiAddProp_videoGetDiamond();
                 break;
 
-            case '6':
-                let dui8 = <UISign>xGame.uiMgr.getUI(UISign);
-                dui8.qjff_AD_for_uisign();
+            case 'qjff_AD_for_uiAddProp_videoGetCoin':
+                let dui8 = <UIAddProp>xGame.uiMgr.getUI(UIAddProp);
+                dui8.qjff_AD_for_uiAddProp_videoGetCoin();
                 break;
-            case '7':
-                let dui9 = <UISign>xGame.uiMgr.getUI(UISign);
-                dui9.qjff_AD_for_uisign();
+            case 'qjff_AD_for_UIrepentProp_videoRegret':
+                let dui9 = <UIRepentProp>xGame.uiMgr.getUI(UIRepentProp);
+                dui9.qjff_AD_for_UIrepentProp_videoRegret();
                 break;
 
-            case '5':
-                let dui10 = <UISign>xGame.uiMgr.getUI(UISign);
-                dui10.qjff_AD_for_uisign();
+            case 'qjff_AD_for_UIrepentProp_videoAddHelpLine':
+                let dui10 = <UIRepentProp>xGame.uiMgr.getUI(UIRepentProp);
+                dui10.qjff_AD_for_UIrepentProp_videoAddHelpLine();
                 break;
 
-            case '5':
-                let dui11 = <UISign>xGame.uiMgr.getUI(UISign);
-                dui11.qjff_AD_for_uisign();
+            case 'qjff_AD_for_UIBOX_onOpenBox':
+                let dui11 = <UIBox>xGame.uiMgr.getUI(UIBox);
+                dui11.qjff_AD_for_UIBOX_onOpenBox();
                 break;
 
-            case '5':
-                let dui12 = <UISign>xGame.uiMgr.getUI(UISign);
-                dui12.qjff_AD_for_uisign();
+            case 'qjff_AD_for_UIAddCoin':
+                let dui12 = <UIAddCoin>xGame.uiMgr.getUI(UIAddCoin);
+                dui12.qjff_AD_for_UIAddCoin();
+                break;
+            // case 'qjff_AD_for_skilldisplay_clickAddLevel':
+            //    // SkillDisplay s=new SkillDisplay();//改为插屏了
+            //   //  s.qjff_AD_for_skilldisplay_clickAddLevel();
+            //     break;
+            case '111a':
+                let dui14 = <UISign>xGame.uiMgr.getUI(UISign);
+                dui14.qjff_AD_for_uisign();
+                break;
+            case '222a':
+                let dui15 = <UISign>xGame.uiMgr.getUI(UISign);
+                dui15.qjff_AD_for_uisign();
+                break;
+            case '333a':
+                let dui16 = <UISign>xGame.uiMgr.getUI(UISign);
+                dui16.qjff_AD_for_uisign();
                 break;
 
             default:
@@ -332,15 +353,15 @@ export default class UIMain extends UIBase {
     startGlobal() {
         xGame.uiMgr.Show(UIMsg, "Coming Soon")
         //xGame.uiMgr.Show(UITry);
-        JSBridgeUtils.instance.showInternAd('全球');
+      //  JSBridgeUtils.instance.showInternAd('');
     }
     startWeekly() {
         //xGame.uiMgr.Show(UIBox);
         xGame.uiMgr.Show(UIMsg, "Coming Soon")
 
         //测试AD
-        GlobalManager.instance.registerMethod('zhouSaiMonth', this.zhouSaiMonth);
-        JSBridgeUtils.instance.showRewardAd('zhouSaiMonth');
+       // GlobalManager.instance.registerMethod('zhouSaiMonth', this.zhouSaiMonth);
+        //JSBridgeUtils.instance.showRewardAd('zhouSaiMonth');
     }
 
     zhouSaiMonth() {

+ 56 - 8
client/laya/src/ui/UIRepentProp.ts

@@ -5,6 +5,9 @@ import ui_UIRepentProp from "../fgui/res/game/ui_UIRepentProp";
 import PlatMgr from "../game/PlatMgr";
 import { xGame } from "../xGame";
 import UIMain from "./UIMain";
+import GlobalManager from "../utils/GlobalManager";
+import JSBridgeUtils from "../utils/JSBridgeUtils";
+
 export default class UIRepentProp extends UIBase {
     protected ui: ui_UIRepentProp;
     //
@@ -52,11 +55,33 @@ export default class UIRepentProp extends UIBase {
     }
     //看视频悔球
     videoRegret() {
-        Moyu.showVideoAd(() => {
-            this.callback && this.callback(true);
-            this.hideSelf();
-        }, EAdType.regretBall);
+
+        console.log('zh:qjff_AD_for_UIrepentProp_videoRegret')
+        // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
+        // JSBridgeUtils.instance.showRewardAd('xxxxx');
+        //需要传递参数
+        //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+        if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIrepentProp_videoRegret')) {
+
+        } else {
+            console.log('zh:AD 失败,直接发放奖励')
+            this.qjff_AD_for_UIrepentProp_videoRegret();
+        }
+
+        // Moyu.showVideoAd(() => {
+        //     this.callback && this.callback(true);
+        //     this.hideSelf();
+        // }, EAdType.regretBall);
+    }
+
+
+
+    public qjff_AD_for_UIrepentProp_videoRegret() {
+        this.callback && this.callback(true);
+        this.hideSelf();
     }
+
+
     //看视频增加超长延长线
     videoAddHelpLine() {
         let guide = DataMgr.getGuideHelpLine();
@@ -67,11 +92,34 @@ export default class UIRepentProp extends UIBase {
             xGame.common.gameUI.ui.guideNode.visible = false;
         }
         else {
-            Moyu.showVideoAd(() => {
-                this.callback && this.callback(true);
-                this.hideSelf();
-            }, EAdType.longHelpLine);
+            // Moyu.showVideoAd(() => {
+            //     this.callback && this.callback(true);
+            //     this.hideSelf();
+            // }, EAdType.longHelpLine);
+
+            console.log('zh:qjff_AD_for_UIrepentProp_videoAddHelpLine')
+            // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
+            // JSBridgeUtils.instance.showRewardAd('xxxxx');
+            //需要传递参数
+            //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+            if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIrepentProp_videoAddHelpLine')) {
+
+            } else {
+                console.log('zh:AD 失败,直接发放奖励')
+                this.qjff_AD_for_UIrepentProp_videoAddHelpLine();
+            }
         }
     }
+
+
+    public qjff_AD_for_UIrepentProp_videoAddHelpLine() {
+        this.callback && this.callback(true);
+        this.hideSelf();
+    }
+
+
+
+
+
 }
 UIRepentProp.uiName = "UIRepentProp"

+ 44 - 7
client/laya/src/ui/item/SkillDisplay.ts

@@ -8,6 +8,8 @@ import UIGameEnd from "../UIGameEnd";
 import UIMain from "../UIMain";
 import UIMatching from "../UIMatching";
 import UISkill from "../UISkill";
+import GlobalManager from "../../utils/GlobalManager";
+import JSBridgeUtils from "../../utils/JSBridgeUtils";
 
 export default class SkillDisplay {
     public ui: ui_skillItem;
@@ -64,15 +66,50 @@ export default class SkillDisplay {
             this.ui.tryNode.visible = false;
     }
     clickAddLevel() {
+
         xGame.soundMgr.playSound(xGame.common.btnClickStr);
         Moyu.sendDataEvent("UpSkill", { id: this.data.index });
-        //看视频升级
-        Moyu.showVideoAd(() => {
-            DataMgr.setBigSkill(this.data.index, 1);
-            this.updateSelf();
-            xGame.common.upSkillLevel = true;
-        }, EAdType.upSkill)
+
+
+
+        console.log('zh:qjff_AD_for_skilldisplay_clickAddLevel')
+        // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
+        // JSBridgeUtils.instance.showRewardAd('xxxxx');
+        //需要传递参数
+        //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+        // if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_skilldisplay_clickAddLevel')) {
+
+        // } else {
+        //     console.log('zh:AD 失败,直接发放奖励')
+        //     this.qjff_AD_for_skilldisplay_clickAddLevel();
+        // }
+
+        if (JSBridgeUtils.instance.showInternAd('qjff_AD_for_skilldisplay_clickAddLevel')) {
+            this.qjff_AD_for_skilldisplay_clickAddLevel();
+        } else {
+            console.log('zh:AD 失败,直接发放奖励')
+            this.qjff_AD_for_skilldisplay_clickAddLevel();
+        }
+
+
+
+
+        // //看视频升级
+        // Moyu.showVideoAd(() => {
+        //     DataMgr.setBigSkill(this.data.index, 1);
+        //     this.updateSelf();
+        //     xGame.common.upSkillLevel = true;
+        // }, EAdType.upSkill)
+    }
+
+
+    public qjff_AD_for_skilldisplay_clickAddLevel() {
+        DataMgr.setBigSkill(this.data.index, 1);
+        this.updateSelf();
+        xGame.common.upSkillLevel = true;
     }
+
+
     startGame() {
         //如果是关公刀法就提示返回
         if (this.data.index == 3) {
@@ -87,7 +124,7 @@ export default class SkillDisplay {
         let needCoin = xGame.common.bigMoveNeedCoin;
         xGame.common.passAwardCoin = 2000;
         let guide = DataMgr.getSkillGuide();
-        console.log('zh:startGame guide='+guide)
+        console.log('zh:startGame guide=' + guide)
 
         xGame.common.temSelfLevel = 0;
         if (guide == 0) {

+ 6 - 3
client/laya/src/utils/JSBridgeUtils.ts

@@ -75,13 +75,13 @@ export default class JSBridgeUtils {
         }, "testAsyncCallback", JSON.stringify(reqObj));
     }
     //************* */
-    public showInternAd(mark): void {
+    public showInternAd(mark): boolean {
         if (!Laya.Browser.onAndroid) {
             console.log('zh:非android dev')
-            return;
+            return false;
         }
         if (!this.initBridge()) {
-            return;
+           return false;
         }
         let rs = this.bridge.call("showInternAd", mark);
         console.log('zh:showInternAd rs= ' + rs + '   ,mark=' + mark);
@@ -90,12 +90,15 @@ export default class JSBridgeUtils {
             if (result.code === 200) {
                 console.log("zh:广告显示成功");
                 // 执行广告展示后的逻辑,例如记录日志、更新UI等
+                return true;
             } else {
                 console.warn("zh:广告显示失败:", result.msg);
                 // 可以弹出提示、上报错误、尝试重试等
+                  return false;
             }
         } catch (e) {
             console.error("zh:解析桥接返回值失败:", e);
+              return false;
         }
 
     }

部分文件因文件數量過多而無法顯示