dzduole před 1 dnem
rodič
revize
faa97f346f

+ 7 - 0
art/fgui/.objs/metas/isxx5ak7/n43d3v0.info

@@ -0,0 +1,7 @@
+{
+  "objectStatus": {
+    "n5_osxc": {
+      "hidden": true
+    }
+  }
+}

+ 8 - 5
art/fgui/.objs/workspace.json

@@ -8,27 +8,30 @@
   ],
   "libview.iconScale": 0,
   "doc.openedDocs": [
+    "ui://isxx5ak7g1giv4ep",
     "ui://isxx5ak7g1giv4el",
-    "ui://isxx5ak7uqohv4lr",
-    "ui://isxx5ak7nmu9v57t",
     "ui://isxx5ak7uel8v58m"
   ],
   "test.device": "Huawei Mate20 Pro",
   "canvasColor": 10066329,
   "auxline2": true,
-  "doc.activeDoc": "ui://isxx5ak7uqohv4lr",
+  "doc.activeDoc": "ui://isxx5ak7uel8v58m",
   "libview.twoColumn": false,
   "libview.expandedNodes": [
     "isxx5ak7",
     "/",
     "isxx5ak7",
+    "/UIAddProp/",
+    "isxx5ak7",
     "/UISecretary/",
     "isxx5ak7",
     "/UISecretary/UIShop/",
     "isxx5ak7",
-    "/UISecretary/UIShop/component/",
+    "/UISecretary/UIShop/asset/",
+    "isxx5ak7",
+    "/UISecretary/UIShop/asset/daoju/",
     "isxx5ak7",
-    "/UISecretary/component/"
+    "/UISecretary/UIShop/component/"
   ],
   "auxline1": true,
   "snapToGrid": true,

+ 6 - 6
art/fgui/assets/game/UISecretary/UIShop/component/Component58_11.xml

@@ -1,11 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="616,637" designImageLayer="1">
-  <controller name="c1" alias="qiuGan" pages="0,球杆,1,道具" selected="1"/>
+  <controller name="c1" pages="0,球杆,1,道具" selected="1"/>
   <displayList>
-    <image id="n23_qlo0" name="n23" src="qlo041k" fileName="UISkill/asset/qq_dtd.png" xy="0,0" size="616,637"/>
-    <image id="n41_9d32" name="n41" src="qlo041j" fileName="UISkill/asset/qq_dtd2.png" xy="560,0" size="56,636" alpha="0.4">
+    <image id="n23_qlo0" name="n23" src="qlo041k" fileName="UISkill/asset/qq_dtd.png" xy="-1,0" size="616,637"/>
+    <image id="n41_9d32" name="n41" src="qlo041j" fileName="UISkill/asset/qq_dtd2.png" xy="559,0" size="56,636" alpha="0.4">
       <relation target="n23_qlo0" sidePair="left-left,top-top"/>
     </image>
+    <component id="n45_lp3l" name="n_qiuGan" src="lp3lv4j2" fileName="UISecretary/UIShop/component/Component98_3.xml" xy="560,1" controller="c1,0"/>
+    <component id="n44_s46i" name="n_daoju" src="s46iv4f0" fileName="UISecretary/UIShop/component/Component98_1.xml" xy="560,132" controller="c1,1"/>
     <list id="n37_qlo0" name="myList" xy="9,9" size="541,615" overflow="scroll" lineGap="10" defaultItem="ui://isxx5ak7uqohv4lr" align="center" autoClearItems="true">
       <gearDisplay controller="c1" pages="0"/>
       <item/>
@@ -15,9 +17,7 @@
       <item/>
       <item/>
     </list>
-    <component id="n45_lp3l" name="n_qiuGan" src="lp3lv4j2" fileName="UISecretary/UIShop/component/Component98_3.xml" xy="560,1" controller="c1,0"/>
-    <component id="n44_s46i" name="n_daoju" src="s46iv4f0" fileName="UISecretary/UIShop/component/Component98_1.xml" xy="560,132" controller="c1,1"/>
-    <list id="n47_so7l" name="djList" xy="9,8" size="541,615" overflow="scroll" defaultItem="ui://isxx5ak7uel8v58m">
+    <list id="n47_so7l" name="djList" xy="1,11" size="556,616" overflow="scroll" lineGap="10" defaultItem="ui://isxx5ak7uel8v58m" align="center" autoClearItems="true">
       <gearDisplay controller="c1" pages="1"/>
       <item/>
       <item/>

+ 16 - 0
art/fgui/assets/game/UISecretary/UIShop/component/btn_buy.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="241,75" extention="Button">
+  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
+  <displayList>
+    <image id="n0_so7l" name="n0" src="so7lv593" fileName="UISecretary/UIShop/asset/daoju/btn_byg.png" xy="0,0">
+      <gearDisplay controller="button" pages="0,2"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </image>
+    <image id="n1_so7l" name="n1" src="so7lv593" fileName="UISecretary/UIShop/asset/daoju/btn_byg.png" xy="0,0">
+      <gearDisplay controller="button" pages="1,3"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </image>
+    <text id="n2_so7l" name="n2" xy="25,16" size="190,42" fontSize="30" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" text="Buy"/>
+  </displayList>
+  <Button/>
+</component>

+ 5 - 7
art/fgui/assets/game/UISecretary/UIShop/component/daoJuDisplay.xml

@@ -2,12 +2,10 @@
 <component size="543,200" bgColorEnabled="true">
   <displayList>
     <image id="n6_so7l" name="n6" src="so7lv594" fileName="UISecretary/UIShop/asset/daoju/gf_k1.png" xy="1,0" size="543,200"/>
-    <image id="n2_so7l" name="n2" src="so7lv590" fileName="UISecretary/UIShop/asset/daoju/钻石1.png" xy="6,39"/>
-    <image id="n3_so7l" name="n3" src="so7lv593" fileName="UISecretary/UIShop/asset/daoju/btn_byg.png" xy="286,92" group="n5_so7l"/>
-    <text id="n4_so7l" name="n4" xy="299,104" size="215,52" group="n5_so7l" fontSize="30" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" strokeColor="#000000" text="Buy"/>
-    <group id="n5_so7l" name="btn_buy" xy="286,92" size="241,75"/>
-    <text id="n7_so7l" name="n_jiaGe" xy="377,46" size="63,42" fontSize="30" color="#ffff00" align="center" vAlign="middle" bold="true" strokeColor="#000000" text="0.99"/>
-    <text id="n8_so7l" name="n_zuanShi" xy="164,85" size="58,42" fontSize="30" color="#ffffff" align="center" bold="true" strokeColor="#000000" text="X50"/>
-    <loader id="n9_so7l" name="eftZuanShi" xy="0,0" size="543,200"/>
+    <text id="n7_so7l" name="n_jiaGe" xy="377,45" size="63,42" fontSize="30" color="#ffff00" align="center" vAlign="middle" bold="true" strokeColor="#000000" text="0.99"/>
+    <text id="n8_so7l" name="n_zuanShi" xy="175,88" size="58,42" fontSize="30" color="#ffffff" align="center" bold="true" strokeColor="#000000" text="X50"/>
+    <component id="n10_so7l" name="btn_buy" src="so7lv596" fileName="UISecretary/UIShop/component/btn_buy.xml" xy="290,103"/>
+    <text id="n11_so7l" name="nameTxt" xy="4,-1" size="321,42" fontSize="30" color="#ffffff" autoSize="none" bold="true" text="DAOJU NAME"/>
+    <loader id="n12_so7l" name="zsImg" xy="13,52" size="137,125" url="ui://isxx5ak7so7lv590"/>
   </displayList>
 </component>

+ 7 - 7
art/fgui/assets/game/_sharecomponent/shareBtn2.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="239,73" pivot="0.5,0.5" extention="Button" designImageLayer="1">
-  <controller name="c1" alias="按钮" exported="true" pages="0,换人再战,1,下一关要看视频,2,下一关不用看视频,3,开心收下,4,下一关要花费金币,5,立即挑战,6,知道了,7,领取,8,已领取,9,免费抽奖,10,普通领取,11,体力+开始游戏,21,连点开箱,22,连点开箱+视频,23,体力挑战下一关,24,三倍领取" selected="1"/>
+  <controller name="c1" alias="按钮" exported="true" pages="0,换人再战,1,下一关要看视频,2,下一关不用看视频,3,开心收下,4,下一关要花费金币,5,立即挑战,6,知道了,7,领取,8,已领取,9,免费抽奖,10,普通领取,11,体力+开始游戏,21,连点开箱,22,连点开箱+视频,23,体力挑战下一关,24,三倍领取" selected="0"/>
   <displayList>
     <image id="n2_hkrz" name="n2" src="hkrz3tb" fileName="_shareasset/ty_an2.png" xy="0,0" size="239,73" aspect="true">
       <gearDisplay controller="c1" pages="0,1,2,3,4,5,6,7,9,10,11,21,22,23,24"/>
@@ -8,24 +8,24 @@
     <image id="n24_wcn5" name="n24" src="hkrz3tb" fileName="_shareasset/ty_an2.png" xy="0,0" size="239,73" aspect="true" grayed="true">
       <gearDisplay controller="c1" pages="8"/>
     </image>
-    <text id="n1_hkrz" name="n1" xy="0,12" size="224,43" font="Arial" fontSize="31" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" strokeColor="#000000" text="开始游戏">
+    <text id="n1_hkrz" name="n1" xy="7,16" size="224,43" font="Arial" fontSize="31" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" strokeColor="#000000" text="Change rival">
       <gearDisplay controller="c1" pages="0,4,21"/>
       <gearXY controller="c1" pages="0,4,21" values="7,16|7,27|7,11" default="0,12"/>
-      <gearText controller="c1" pages="0,3,4,5,6,21" values="Change player|start|next level|Start|Start|Unpacking" default="开始游戏"/>
+      <gearText controller="c1" pages="0,3,4,5,6,21" values="Change rival|start|next level|Start|Start|Unpacking" default="开始游戏"/>
     </text>
-    <text id="n3_p4tr" name="n3" xy="44,11" size="189,44" font="Arial" fontSize="32" color="#ffffff" vAlign="middle" leading="0" autoSize="none" bold="true" strokeColor="#000000" text="下一关">
+    <text id="n3_p4tr" name="n3" xy="44,11" size="189,44" font="Arial" fontSize="32" color="#ffffff" vAlign="middle" leading="0" autoSize="none" bold="true" strokeColor="#000000" text="next level">
       <gearDisplay controller="c1" pages="2,5,6"/>
       <gearText controller="c1" pages="0,2,5,6" values="next level|Next level|Start|" default="下一关"/>
     </text>
-    <text id="n23_lp3l" name="n23" xy="3,4" size="232,65" font="Arial" fontSize="31" color="#ffffff" align="center" vAlign="middle" leading="1" autoSize="none" bold="true" strokeColor="#000000" text="知道了">
+    <text id="n23_lp3l" name="n23" xy="3,4" size="232,65" font="Arial" fontSize="31" color="#ffffff" align="center" vAlign="middle" leading="1" autoSize="none" bold="true" strokeColor="#000000" text="OK">
       <gearDisplay controller="c1" pages="6,7,8"/>
       <gearText controller="c1" pages="0,5,6,7,8" values="OK|OK|OK|Receive|Receive" default="知道了"/>
     </text>
-    <text id="n4_p4tr" name="n4" xy="39,14" size="190,44" font="Arial" fontSize="30" color="#ffffff" align="center" vAlign="middle" leading="0" autoSize="none" bold="true" strokeColor="#000000" text="Next level">
+    <text id="n4_p4tr" name="n4" xy="39,14" size="190,44" font="Arial" fontSize="30" color="#ffffff" align="center" vAlign="middle" leading="0" autoSize="none" bold="true" strokeColor="#000000" text="next level">
       <gearDisplay controller="c1" pages="1,9,11,22,23,24"/>
       <gearText controller="c1" pages="0,1,5,6,9,11,22,23,24" values="next level|Next level|Next Level|Next Level|Prize draw|Start|Unpacking|Next level|Triple claim" default="下一关"/>
     </text>
-    <image id="n5_p4tr" name="n5" src="hkrz3te" fileName="_shareasset/1.png" xy="3,22" size="42,30" aspect="true">
+    <image id="n5_p4tr" name="n5" src="hkrz3te" fileName="_shareasset/1.png" xy="46,22" size="42,30" aspect="true">
       <gearDisplay controller="c1" pages="1,9,22,24"/>
       <gearXY controller="c1" pages="1,9,22,24" values="3,22|4,21|7,21|6,21" default="46,22"/>
     </image>

+ 1 - 0
art/fgui/assets/game/package.xml

@@ -1328,6 +1328,7 @@
     <image id="so7lv592" name="钻石3.png" path="/UISecretary/UIShop/asset/daoju/"/>
     <image id="so7lv593" name="btn_byg.png" path="/UISecretary/UIShop/asset/daoju/"/>
     <image id="so7lv594" name="gf_k1.png" path="/UISecretary/UIShop/asset/daoju/" scale="9grid" scale9grid="115,38,3,16"/>
+    <component id="so7lv596" name="btn_buy.xml" path="/UISecretary/UIShop/component/"/>
   </resources>
   <publish name="game" path="..\..\client\laya\bin\asset\fgui" packageCount="2" genCode="true" codePath="..\..\client\laya\src\fgui\res"/>
 </packageDescription>

binární
client/laya/bin/asset/fgui/game.obj


+ 313 - 16
client/laya/bin/js/bundle.js

@@ -1218,7 +1218,6 @@
         }
         exitAndCloseGame() {
             if (!Laya.Browser.onAndroid) {
-                console.log('zh:非android dev');
                 return;
             }
             if (!this.initBridge()) {
@@ -1229,7 +1228,6 @@
         }
         showRewardAd(mark) {
             if (!Laya.Browser.onAndroid) {
-                console.log('zh:非android dev');
                 return false;
             }
             if (!this.initBridge()) {
@@ -1256,7 +1254,6 @@
         logEventForAdNoParams(eventName) {
             console.log("zh:logEventForAdNoParams eventName1=" + eventName);
             if (!Laya.Browser.onAndroid) {
-                console.log('zh:非android dev');
                 return;
             }
             if (!this.initBridge()) {
@@ -1268,7 +1265,6 @@
         logEventForAdHaveParams(eventName, jsonStr) {
             console.log("zh:ts logEventForAdHaveParams eventName1=" + eventName);
             if (!Laya.Browser.onAndroid) {
-                console.log('zh:非android dev');
                 return;
             }
             if (!this.initBridge()) {
@@ -1281,7 +1277,6 @@
         logEventForFirebase(eventName, jsonStr) {
             console.log("zh:ts logEventForFirebase eventName1=" + eventName);
             if (!Laya.Browser.onAndroid) {
-                console.log('zh:非android dev');
                 return;
             }
             if (!this.initBridge()) {
@@ -1291,6 +1286,33 @@
             console.log("zh:logEventForFirebase req = json=" + jsonStr);
             this.bridge.call("logEventForFirebase", eventName, jsonStr);
         }
+        testNetTip() {
+            if (Laya.Browser.onAndroid) {
+                let boo = this.getNetworkAvailable();
+                this.showToast2("Network error, reward unavailable");
+                return;
+            }
+        }
+        getNetworkAvailable() {
+            if (!Laya.Browser.onAndroid) {
+                return;
+            }
+            if (!this.initBridge()) {
+                return;
+            }
+            let boo = this.bridge.call("getNetworkAvailable");
+            console.log("zh:getNetworkAvailable boo=" + boo);
+            return boo;
+        }
+        showToast2(msg) {
+            if (!Laya.Browser.onAndroid) {
+                return;
+            }
+            if (!this.initBridge()) {
+                return;
+            }
+            this.bridge.call("showToast2", msg);
+        }
         nativeCallJs(msg) {
             console.log("zh:nativeCallJs received data: 1111", msg);
             if (msg === 'Ad1') {
@@ -1381,6 +1403,13 @@
             }
             else if (this.inAd) {
                 console.log('zh:qjff_AD_for_UIBOX_onOpenBox');
+                if (Laya.Browser.onAndroid) {
+                    let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                    if (!boo) {
+                        JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                        return;
+                    }
+                }
                 if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIBOX_onOpenBox')) {
                 }
                 else {
@@ -1476,6 +1505,13 @@
         }
         onTry() {
             console.log('zh:qjff_AD_for_uitry');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uitry')) {
             }
             else {
@@ -4278,6 +4314,13 @@
         }
         videoAddCoin() {
             console.log('zh:qjff_AD_for_UIAddCoin');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIAddCoin')) {
             }
             else {
@@ -4840,6 +4883,13 @@
         }
         videoGetPower() {
             console.log('zh:qjff_AD_for_uipower');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uipower')) {
             }
             else {
@@ -5772,10 +5822,43 @@
         }
     }
 
+    class DaoJuDisplay {
+        constructor(ui, index) {
+            this.index = 0;
+            this.uiIndex = 0;
+            this.ui = ui;
+            this.index = index;
+            this.initData();
+        }
+        initData() {
+            this.ui.btn_buy.onClick(this, this.buyDj);
+            let data = cfgTable.daoJuData[this.index + 1];
+            console.log('zh:' + JSON.stringify(data));
+            this.ui.nameTxt.text = data.name;
+            this.ui.n_jiaGe.text = data.price + "";
+            this.ui.n_zuanShi.text = data.price + "";
+            this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
+        }
+        buyDj() {
+            xGame.soundMgr.playSound(xGame.common.btnClickStr);
+        }
+        buyBallRod() {
+        }
+        logEventForGouMaiGan(qiuGanName) {
+            const ev = {
+                value: qiuGanName
+            };
+            const jsonStr = JSON.stringify(ev);
+            console.log('zh:ts  logEventForGouMaiGan req jsonStr=' + jsonStr);
+            JSBridgeUtils.instance.logEventForAdHaveParams('iap_start', jsonStr);
+        }
+    }
+
     class UIShop extends UIBase {
         constructor() {
             super();
             this.itemNums = 0;
+            this.itemNumsForDj = 0;
             this.curType = "";
         }
         onConstructor() {
@@ -5787,11 +5870,14 @@
             this.addUIClick(this.ui.myNode.n_qiuGan, () => this.switchBtn("qiugan"));
             this.addUIClick(this.ui.myNode.n_daoju, () => this.switchBtn("daoju"));
             this.addUIClick(this.ui, this.interuptSecretary);
-            console.log('zh:this.renderBallRodthis.renderBallRodthis.renderBallRodthis.renderBallRod = ' + this.renderBallRod);
             this.ui.myNode.myList.itemRenderer = Laya.Handler.create(this, this.renderBallRod, null, false);
             this.ballRodArr = [];
             this.itemNums = Object.keys(cfgTable.ballrodData).length;
             this.ui.myNode.myList.numItems = this.itemNums;
+            this.ui.myNode.djList.itemRenderer = Laya.Handler.create(this, this.renderDaoJu, null, false);
+            this.daoJuArr = [];
+            this.itemNumsForDj = Object.keys(cfgTable.daoJuData).length;
+            this.ui.myNode.djList.numItems = this.itemNumsForDj;
         }
         show(type) {
             super.show();
@@ -5818,14 +5904,12 @@
                 }
             }
             if (type == "qiugan") {
-                console.log('zh:qg  sel');
                 this.ui.myNode.n_qiuGan.c1.selectedIndex = 0;
                 this.ui.myNode.n_daoju.c1.selectedIndex = 1;
                 this.ui.myNode.myList.visible = true;
                 this.ui.myNode.djList.visible = false;
             }
             else {
-                console.log('zh:dj   sel');
                 this.ui.myNode.n_qiuGan.c1.selectedIndex = 1;
                 this.ui.myNode.n_daoju.c1.selectedIndex = 0;
                 this.ui.myNode.myList.visible = false;
@@ -5842,6 +5926,11 @@
             let ballRod = new BallRodDisplay(obj, index);
             this.ballRodArr.push(ballRod);
         }
+        renderDaoJu(sort, obj) {
+            let index = this.getIndexBySortForDj(sort + 1) - 1;
+            let b = new DaoJuDisplay(obj, index);
+            this.daoJuArr.push(b);
+        }
         getIndexBySort(sort) {
             let object = cfgTable.ballrodData;
             for (const key in object) {
@@ -5850,6 +5939,14 @@
                 }
             }
         }
+        getIndexBySortForDj(sort) {
+            let object = cfgTable.daoJuData;
+            for (const key in object) {
+                if (object[key].sort == sort) {
+                    return parseInt(key);
+                }
+            }
+        }
         playSecretaryIdle() {
             let parent = this.ui.secretary.displayObject;
             parent.destroyChildren();
@@ -6114,6 +6211,13 @@
         againGetAward() {
             Moyu.sendDataEvent("signIn2");
             console.log('zh:qjff_AD_for_uisign');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uisign')) {
             }
             else {
@@ -6808,6 +6912,13 @@
         }
         tripleGetAward() {
             console.log('zh:qjff_AD_for_uigetAward');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uigetAward')) {
             }
             else {
@@ -6940,6 +7051,13 @@
             }
             else {
                 console.log('zh:qjff_AD_for_UIrepentProp_videoAddHelpLine');
+                if (Laya.Browser.onAndroid) {
+                    let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                    if (!boo) {
+                        JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                        return;
+                    }
+                }
                 if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIrepentProp_videoAddHelpLine')) {
                 }
                 else {
@@ -7954,6 +8072,13 @@
                         console.log('zh:clickRightBtn 333-000');
                         Moyu.sendDataEvent("placeBallNextLevel");
                         console.log('zh:qjff_AD_for_uiGameEnd');
+                        if (Laya.Browser.onAndroid) {
+                            let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                            if (!boo) {
+                                JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                                return;
+                            }
+                        }
                         Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level + '');
                         if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiGameEnd')) {
                         }
@@ -11259,6 +11384,13 @@
         }
         videoGetDiamond() {
             console.log('zh:qjff_AD_for_uiAddProp_videoGetDiamond');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetDiamond')) {
             }
             else {
@@ -11273,6 +11405,13 @@
         }
         videoGetCoin() {
             console.log('zh:qjff_AD_for_uiAddProp_videoGetCoin');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetCoin')) {
             }
             else {
@@ -11293,6 +11432,13 @@
             else {
                 console.log('zh:33333333333333ad');
                 console.log('zh:qjff_AD_for_uiAddProp_shareGetDiamond');
+                if (Laya.Browser.onAndroid) {
+                    let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                    if (!boo) {
+                        JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                        return;
+                    }
+                }
                 if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_shareGetDiamond')) {
                 }
                 else {
@@ -11511,6 +11657,13 @@
                 this.checkFree();
             }
             else {
+                if (Laya.Browser.onAndroid) {
+                    let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                    if (!boo) {
+                        JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                        return;
+                    }
+                }
                 if (JSBridgeUtils.instance.showRewardAd('qjff_chouJiang')) {
                 }
                 else {
@@ -13152,9 +13305,9 @@
             this.c1 = this.getController("c1");
             this.n23 = (this.getChild("n23"));
             this.n41 = (this.getChild("n41"));
-            this.myList = (this.getChild("myList"));
             this.n_qiuGan = (this.getChild("n_qiuGan"));
             this.n_daoju = (this.getChild("n_daoju"));
+            this.myList = (this.getChild("myList"));
             this.djList = (this.getChild("djList"));
             this.t0 = this.getTransition("t0");
         }
@@ -15020,6 +15173,19 @@
     }
     ui_border.URL = "ui://isxx5ak7sdh33qq";
 
+    class ui_btn_buy extends fgui.GButton {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "btn_buy"));
+        }
+        onConstruct() {
+            this.button = this.getController("button");
+            this.n0 = (this.getChild("n0"));
+            this.n1 = (this.getChild("n1"));
+            this.n2 = (this.getChild("n2"));
+        }
+    }
+    ui_btn_buy.URL = "ui://isxx5ak7so7lv596";
+
     class ui_Component41_2 extends fgui.GComponent {
         static createInstance() {
             return (fgui.UIPackage.createObject("game", "Component41_2"));
@@ -15125,12 +15291,11 @@
         }
         onConstruct() {
             this.n6 = (this.getChild("n6"));
-            this.n2 = (this.getChild("n2"));
-            this.n3 = (this.getChild("n3"));
-            this.n4 = (this.getChild("n4"));
             this.n_jiaGe = (this.getChild("n_jiaGe"));
             this.n_zuanShi = (this.getChild("n_zuanShi"));
-            this.eftZuanShi = (this.getChild("eftZuanShi"));
+            this.btn_buy = (this.getChild("btn_buy"));
+            this.nameTxt = (this.getChild("nameTxt"));
+            this.zsImg = (this.getChild("zsImg"));
         }
     }
     ui_daoJuDisplay.URL = "ui://isxx5ak7uel8v58m";
@@ -16059,6 +16224,7 @@
             fgui.UIObjectFactory.setExtension(ui_D2Gan.URL, ui_D2Gan);
             fgui.UIObjectFactory.setExtension(ui_border.URL, ui_border);
             fgui.UIObjectFactory.setExtension(ui_HelpLine.URL, ui_HelpLine);
+            fgui.UIObjectFactory.setExtension(ui_btn_buy.URL, ui_btn_buy);
             fgui.UIObjectFactory.setExtension(ui_UIRepentProp.URL, ui_UIRepentProp);
             fgui.UIObjectFactory.setExtension(ui_Component41_2.URL, ui_Component41_2);
             fgui.UIObjectFactory.setExtension(ui_Component41_1.URL, ui_Component41_1);
@@ -18975,6 +19141,13 @@
             }
             else {
                 console.log('zh:qjff_AD_for_UIrepentProp_videoAddHelpLine');
+                if (Laya.Browser.onAndroid) {
+                    let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                    if (!boo) {
+                        JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                        return;
+                    }
+                }
                 if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIrepentProp_videoAddHelpLine')) {
                 }
                 else {
@@ -19813,6 +19986,13 @@
         }
         videoAddCoin() {
             console.log('zh:qjff_AD_for_UIAddCoin');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIAddCoin')) {
             }
             else {
@@ -19878,6 +20058,13 @@
         }
         videoGetPower() {
             console.log('zh:qjff_AD_for_uipower');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uipower')) {
             }
             else {
@@ -20444,6 +20631,13 @@
                         console.log('zh:clickRightBtn 333-000');
                         Moyu.sendDataEvent("placeBallNextLevel");
                         console.log('zh:qjff_AD_for_uiGameEnd');
+                        if (Laya.Browser.onAndroid) {
+                            let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                            if (!boo) {
+                                JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                                return;
+                            }
+                        }
                         Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level + '');
                         if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiGameEnd')) {
                         }
@@ -21359,6 +21553,13 @@
         }
         videoGetDiamond() {
             console.log('zh:qjff_AD_for_uiAddProp_videoGetDiamond');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetDiamond')) {
             }
             else {
@@ -21373,6 +21574,13 @@
         }
         videoGetCoin() {
             console.log('zh:qjff_AD_for_uiAddProp_videoGetCoin');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetCoin')) {
             }
             else {
@@ -21393,6 +21601,13 @@
             else {
                 console.log('zh:33333333333333ad');
                 console.log('zh:qjff_AD_for_uiAddProp_shareGetDiamond');
+                if (Laya.Browser.onAndroid) {
+                    let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                    if (!boo) {
+                        JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                        return;
+                    }
+                }
                 if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_shareGetDiamond')) {
                 }
                 else {
@@ -21649,6 +21864,13 @@
                 this.checkFree();
             }
             else {
+                if (Laya.Browser.onAndroid) {
+                    let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                    if (!boo) {
+                        JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                        return;
+                    }
+                }
                 if (JSBridgeUtils.instance.showRewardAd('qjff_chouJiang')) {
                 }
                 else {
@@ -22127,10 +22349,43 @@
         }
     }
 
+    class DaoJuDisplay$1 {
+        constructor(ui, index) {
+            this.index = 0;
+            this.uiIndex = 0;
+            this.ui = ui;
+            this.index = index;
+            this.initData();
+        }
+        initData() {
+            this.ui.btn_buy.onClick(this, this.buyDj);
+            let data = cfgTable.daoJuData[this.index + 1];
+            console.log('zh:' + JSON.stringify(data));
+            this.ui.nameTxt.text = data.name;
+            this.ui.n_jiaGe.text = data.price + "";
+            this.ui.n_zuanShi.text = data.price + "";
+            this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
+        }
+        buyDj() {
+            xGame.soundMgr.playSound(xGame.common.btnClickStr);
+        }
+        buyBallRod() {
+        }
+        logEventForGouMaiGan(qiuGanName) {
+            const ev = {
+                value: qiuGanName
+            };
+            const jsonStr = JSON.stringify(ev);
+            console.log('zh:ts  logEventForGouMaiGan req jsonStr=' + jsonStr);
+            JSBridgeUtils.instance.logEventForAdHaveParams('iap_start', jsonStr);
+        }
+    }
+
     class UIShop$1 extends UIBase {
         constructor() {
             super();
             this.itemNums = 0;
+            this.itemNumsForDj = 0;
             this.curType = "";
         }
         onConstructor() {
@@ -22142,11 +22397,14 @@
             this.addUIClick(this.ui.myNode.n_qiuGan, () => this.switchBtn("qiugan"));
             this.addUIClick(this.ui.myNode.n_daoju, () => this.switchBtn("daoju"));
             this.addUIClick(this.ui, this.interuptSecretary);
-            console.log('zh:this.renderBallRodthis.renderBallRodthis.renderBallRodthis.renderBallRod = ' + this.renderBallRod);
             this.ui.myNode.myList.itemRenderer = Laya.Handler.create(this, this.renderBallRod, null, false);
             this.ballRodArr = [];
             this.itemNums = Object.keys(cfgTable.ballrodData).length;
             this.ui.myNode.myList.numItems = this.itemNums;
+            this.ui.myNode.djList.itemRenderer = Laya.Handler.create(this, this.renderDaoJu, null, false);
+            this.daoJuArr = [];
+            this.itemNumsForDj = Object.keys(cfgTable.daoJuData).length;
+            this.ui.myNode.djList.numItems = this.itemNumsForDj;
         }
         show(type) {
             super.show();
@@ -22173,14 +22431,12 @@
                 }
             }
             if (type == "qiugan") {
-                console.log('zh:qg  sel');
                 this.ui.myNode.n_qiuGan.c1.selectedIndex = 0;
                 this.ui.myNode.n_daoju.c1.selectedIndex = 1;
                 this.ui.myNode.myList.visible = true;
                 this.ui.myNode.djList.visible = false;
             }
             else {
-                console.log('zh:dj   sel');
                 this.ui.myNode.n_qiuGan.c1.selectedIndex = 1;
                 this.ui.myNode.n_daoju.c1.selectedIndex = 0;
                 this.ui.myNode.myList.visible = false;
@@ -22197,6 +22453,11 @@
             let ballRod = new BallRodDisplay$1(obj, index);
             this.ballRodArr.push(ballRod);
         }
+        renderDaoJu(sort, obj) {
+            let index = this.getIndexBySortForDj(sort + 1) - 1;
+            let b = new DaoJuDisplay$1(obj, index);
+            this.daoJuArr.push(b);
+        }
         getIndexBySort(sort) {
             let object = cfgTable.ballrodData;
             for (const key in object) {
@@ -22205,6 +22466,14 @@
                 }
             }
         }
+        getIndexBySortForDj(sort) {
+            let object = cfgTable.daoJuData;
+            for (const key in object) {
+                if (object[key].sort == sort) {
+                    return parseInt(key);
+                }
+            }
+        }
         playSecretaryIdle() {
             let parent = this.ui.secretary.displayObject;
             parent.destroyChildren();
@@ -22449,6 +22718,13 @@
         againGetAward() {
             Moyu.sendDataEvent("signIn2");
             console.log('zh:qjff_AD_for_uisign');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uisign')) {
             }
             else {
@@ -22741,6 +23017,13 @@
         }
         onTry() {
             console.log('zh:qjff_AD_for_uitry');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uitry')) {
             }
             else {
@@ -22821,6 +23104,13 @@
         }
         tripleGetAward() {
             console.log('zh:qjff_AD_for_uigetAward');
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uigetAward')) {
             }
             else {
@@ -22945,6 +23235,13 @@
             }
             else if (this.inAd) {
                 console.log('zh:qjff_AD_for_UIBOX_onOpenBox');
+                if (Laya.Browser.onAndroid) {
+                    let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                    if (!boo) {
+                        JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                        return;
+                    }
+                }
                 if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIBOX_onOpenBox')) {
                 }
                 else {

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
client/laya/bin/js/bundle.js.map


+ 6 - 6
client/laya/bin/js/cfgTable.js

@@ -1054,7 +1054,7 @@ cfgTable.paiHangBangData = {
 cfgTable.daoJuData = {
     [1]: {
         id: 1,
-        name: 'Crimson Edge',
+        name: 'aaaaa',
         price: 0,
         describe: 'rookie',
         quality: 0,
@@ -1065,7 +1065,7 @@ cfgTable.daoJuData = {
     },
     [2]: {
         id: 2,
-        name: 'Violet Glaze',
+        name: 'bbbbb',
         price: 1000,
         describe: 'master',
         quality: 1,
@@ -1076,7 +1076,7 @@ cfgTable.daoJuData = {
     },
     [3]: {
         id: 3,
-        name: 'Vine Pact',
+        name: 'cccc',
         price: 1500,
         describe: 'master',
         quality: 1,
@@ -1087,7 +1087,7 @@ cfgTable.daoJuData = {
     },
     [4]: {
         id: 4,
-        name: 'Blaze Chain',
+        name: 'ddd',
         price: 2000,
         describe: 'master',
         quality: 1,
@@ -1098,7 +1098,7 @@ cfgTable.daoJuData = {
     },
     [5]: {
         id: 5,
-        name: 'Dragon Rainbow',
+        name: 'eee',
         price: 3000,
         describe: 'legend',
         quality: 2,
@@ -1109,7 +1109,7 @@ cfgTable.daoJuData = {
     },
     [6]: {
         id: 6,
-        name: 'Brown Ease',
+        name: 'ffff',
         price: 0,
         describe: 'rookie',
         quality: 0,

+ 6 - 0
client/laya/libs/cfgTable.d.ts

@@ -70,6 +70,12 @@ declare namespace cfgTable {
         readonly skillLevel: number;
         //排列顺序
         readonly sort: number;
+
+
+        //钻石数量
+        //readonly zuanShiCount:number;
+
+
     }
     //道具购买
     export const daoJuData: { [key: number]: daoJu };

+ 2 - 0
client/laya/src/fgui/res/game/gameBinder.ts

@@ -211,6 +211,7 @@ import ui_ballNode from "./ui_ballNode";
 import ui_D2Gan from "./ui_D2Gan";
 import ui_border from "./ui_border";
 import ui_HelpLine from "./ui_HelpLine";
+import ui_btn_buy from "./ui_btn_buy";
 import ui_UIRepentProp from "./ui_UIRepentProp";
 import ui_Component41_2 from "./ui_Component41_2";
 import ui_Component41_1 from "./ui_Component41_1";
@@ -481,6 +482,7 @@ export default class gameBinder {
 		fgui.UIObjectFactory.setExtension(ui_D2Gan.URL, ui_D2Gan);
 		fgui.UIObjectFactory.setExtension(ui_border.URL, ui_border);
 		fgui.UIObjectFactory.setExtension(ui_HelpLine.URL, ui_HelpLine);
+		fgui.UIObjectFactory.setExtension(ui_btn_buy.URL, ui_btn_buy);
 		fgui.UIObjectFactory.setExtension(ui_UIRepentProp.URL, ui_UIRepentProp);
 		fgui.UIObjectFactory.setExtension(ui_Component41_2.URL, ui_Component41_2);
 		fgui.UIObjectFactory.setExtension(ui_Component41_1.URL, ui_Component41_1);

+ 2 - 2
client/laya/src/fgui/res/game/ui_Component58_11.ts

@@ -8,9 +8,9 @@ export default class ui_Component58_11 extends fgui.GComponent {
 	public c1:fgui.Controller;
 	public n23:fgui.GImage;
 	public n41:fgui.GImage;
-	public myList:fgui.GList;
 	public n_qiuGan:ui_Component98_3;
 	public n_daoju:ui_Component98_1;
+	public myList:fgui.GList;
 	public djList:fgui.GList;
 	public t0:fgui.Transition;
 	public static URL:string = "ui://isxx5ak7g1giv4el";
@@ -23,9 +23,9 @@ export default class ui_Component58_11 extends fgui.GComponent {
 		this.c1 = this.getController("c1");
 		this.n23 = <fgui.GImage>(this.getChild("n23"));
 		this.n41 = <fgui.GImage>(this.getChild("n41"));
-		this.myList = <fgui.GList>(this.getChild("myList"));
 		this.n_qiuGan = <ui_Component98_3>(this.getChild("n_qiuGan"));
 		this.n_daoju = <ui_Component98_1>(this.getChild("n_daoju"));
+		this.myList = <fgui.GList>(this.getChild("myList"));
 		this.djList = <fgui.GList>(this.getChild("djList"));
 		this.t0 = this.getTransition("t0");
 	}

+ 21 - 0
client/laya/src/fgui/res/game/ui_btn_buy.ts

@@ -0,0 +1,21 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+export default class ui_btn_buy extends fgui.GButton {
+
+	public button:fgui.Controller;
+	public n0:fgui.GImage;
+	public n1:fgui.GImage;
+	public n2:fgui.GTextField;
+	public static URL:string = "ui://isxx5ak7so7lv596";
+
+	public static createInstance():ui_btn_buy {
+		return <ui_btn_buy>(fgui.UIPackage.createObject("game", "btn_buy"));
+	}
+
+	protected onConstruct():void {
+		this.button = this.getController("button");
+		this.n0 = <fgui.GImage>(this.getChild("n0"));
+		this.n1 = <fgui.GImage>(this.getChild("n1"));
+		this.n2 = <fgui.GTextField>(this.getChild("n2"));
+	}
+}

+ 8 - 8
client/laya/src/fgui/res/game/ui_daoJuDisplay.ts

@@ -1,14 +1,15 @@
 /** This is an automatically generated class by FairyGUI. Please do not modify it. **/
 
+import ui_btn_buy from "./ui_btn_buy";
+
 export default class ui_daoJuDisplay extends fgui.GComponent {
 
 	public n6:fgui.GImage;
-	public n2:fgui.GImage;
-	public n3:fgui.GImage;
-	public n4:fgui.GTextField;
 	public n_jiaGe:fgui.GTextField;
 	public n_zuanShi:fgui.GTextField;
-	public eftZuanShi:fgui.GLoader;
+	public btn_buy:ui_btn_buy;
+	public nameTxt:fgui.GTextField;
+	public zsImg:fgui.GLoader;
 	public static URL:string = "ui://isxx5ak7uel8v58m";
 
 	public static createInstance():ui_daoJuDisplay {
@@ -17,11 +18,10 @@ export default class ui_daoJuDisplay extends fgui.GComponent {
 
 	protected onConstruct():void {
 		this.n6 = <fgui.GImage>(this.getChild("n6"));
-		this.n2 = <fgui.GImage>(this.getChild("n2"));
-		this.n3 = <fgui.GImage>(this.getChild("n3"));
-		this.n4 = <fgui.GTextField>(this.getChild("n4"));
 		this.n_jiaGe = <fgui.GTextField>(this.getChild("n_jiaGe"));
 		this.n_zuanShi = <fgui.GTextField>(this.getChild("n_zuanShi"));
-		this.eftZuanShi = <fgui.GLoader>(this.getChild("eftZuanShi"));
+		this.btn_buy = <ui_btn_buy>(this.getChild("btn_buy"));
+		this.nameTxt = <fgui.GTextField>(this.getChild("nameTxt"));
+		this.zsImg = <fgui.GLoader>(this.getChild("zsImg"));
 	}
 }

+ 9 - 0
client/laya/src/ui/UIAddCoin.ts

@@ -32,6 +32,15 @@ export default class UIAddCoin extends UIBase {
         // JSBridgeUtils.instance.showRewardAd('xxxxx');
         //需要传递参数
         //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+
+        if (Laya.Browser.onAndroid) {
+            let boo = JSBridgeUtils.instance.getNetworkAvailable();
+            if (!boo) {
+                JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                return;
+            }
+        }
+
         if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIAddCoin')) {
 
         } else {

+ 29 - 0
client/laya/src/ui/UIAddProp.ts

@@ -135,6 +135,15 @@ export default class UIAddProp extends UIBase {
         // JSBridgeUtils.instance.showRewardAd('xxxxx');
         //需要传递参数
         //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+        if (Laya.Browser.onAndroid) {
+            let boo = JSBridgeUtils.instance.getNetworkAvailable();
+            if (!boo) {
+                JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                return;
+            }
+        }
+
+
         if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetDiamond')) {
 
         } else {
@@ -165,6 +174,16 @@ export default class UIAddProp extends UIBase {
         // JSBridgeUtils.instance.showRewardAd('xxxxx');
         //需要传递参数
         //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+
+        if (Laya.Browser.onAndroid) {
+            let boo = JSBridgeUtils.instance.getNetworkAvailable();
+            if (!boo) {
+                JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                return;
+            }
+        }
+
+
         if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_videoGetCoin')) {
 
         } else {
@@ -230,6 +249,16 @@ export default class UIAddProp extends UIBase {
             // JSBridgeUtils.instance.showRewardAd('xxxxx');
             //需要传递参数
             //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
+
+
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uiAddProp_shareGetDiamond')) {
 
             } else {

+ 14 - 4
client/laya/src/ui/UIBox.ts

@@ -59,10 +59,10 @@ export default class UIBox extends UIBase {
     onOpenBox() {
         this.boxNum++;
         if (this.boxNum < this.boxMax) {
-            if (PlatMgr.getRand() < PlatMgr.boxInsertRate){
-             //    Moyu.showInsertAd(0, PlatMgr.insertGap);
-                 JSBridgeUtils.instance.showInternAd('uivideoshare_show');
-            }  
+            if (PlatMgr.getRand() < PlatMgr.boxInsertRate) {
+                //    Moyu.showInsertAd(0, PlatMgr.insertGap);
+                JSBridgeUtils.instance.showInternAd('uivideoshare_show');
+            }
         }
         else if (this.boxNum == this.boxMax) {
             if (PlatMgr.getRand() < PlatMgr.boxVideoRate) {
@@ -78,6 +78,16 @@ export default class UIBox extends UIBase {
             // JSBridgeUtils.instance.showRewardAd('xxxxx');
             //需要传递参数
             //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
+
+
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIBOX_onOpenBox')) {
 
             } else {

+ 9 - 1
client/laya/src/ui/UIDraw.ts

@@ -120,6 +120,14 @@ export default class UIDraw extends UIBase {
         }
         else {
             //GlobalManager.instance.registerMethod('qjff_chouJiang', this.qjff_chouJiang);
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
+
             if (JSBridgeUtils.instance.showRewardAd('qjff_chouJiang')) {
 
             } else {
@@ -133,7 +141,7 @@ export default class UIDraw extends UIBase {
         }
     }
 
-     public qjff_chouJiang() {
+    public qjff_chouJiang() {
         this.beginDraw();
     }
 

+ 10 - 3
client/laya/src/ui/UIGameEnd.ts

@@ -337,7 +337,7 @@ export default class UIGameEnd extends UIBase {
             LocalStorageManager.setItem(keyStr, jsonStr);
         }
 
-        if ( jsonStr.count  % 5 == 0) {
+        if (jsonStr.count % 5 == 0) {
             const reqStr = JSON.stringify(jsonStr);
             JSBridgeUtils.instance.logEventForAdNoParams('classic_complete');
 
@@ -725,6 +725,13 @@ export default class UIGameEnd extends UIBase {
                     console.log('zh:qjff_AD_for_uiGameEnd')
                     // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
                     // JSBridgeUtils.instance.showRewardAd('xxxxx');
+                    if (Laya.Browser.onAndroid) {
+                        let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                        if (!boo) {
+                            JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                            return;
+                        }
+                    }
 
                     //需要传递参数
                     Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level + '');
@@ -842,9 +849,9 @@ export default class UIGameEnd extends UIBase {
                 console.log('zh:每5关上报1次')
                 let sjmc = 'challenge_level_' + level;
                 JSBridgeUtils.instance.logEventForAdNoParams(sjmc);
-                
+
                 let sjmcForFirebase = 'challenge_level_' + level;
-                JSBridgeUtils.instance.logEventForFirebase(sjmcForFirebase,null);
+                JSBridgeUtils.instance.logEventForFirebase(sjmcForFirebase, null);
 
             } else {
                 console.log('zh:5 no 上报')

+ 8 - 0
client/laya/src/ui/UIGetAward.ts

@@ -65,6 +65,14 @@ export default class UIGetAward extends UIBase {
         console.log('zh:qjff_AD_for_uigetAward')
         // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
         // JSBridgeUtils.instance.showRewardAd('xxxxx');
+        if (Laya.Browser.onAndroid) {
+            let boo = JSBridgeUtils.instance.getNetworkAvailable();
+            if (!boo) {
+                JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                return;
+            }
+        }
+
         if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uigetAward')) {
 
         } else {

+ 9 - 0
client/laya/src/ui/UIPower.ts

@@ -28,6 +28,15 @@ export default class UIPower extends UIBase {
         console.log('zh:qjff_AD_for_uipower')
         // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
         // JSBridgeUtils.instance.showRewardAd('xxxxx');
+
+        if (Laya.Browser.onAndroid) {
+            let boo = JSBridgeUtils.instance.getNetworkAvailable();
+            if (!boo) {
+                JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                return;
+            }
+        }
+
         if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uipower')) {
 
         } else {

+ 10 - 0
client/laya/src/ui/UIRepentProp.ts

@@ -102,6 +102,16 @@ export default class UIRepentProp extends UIBase {
             // JSBridgeUtils.instance.showRewardAd('xxxxx');
             //需要传递参数
             //Laya.LocalStorage.setItem('temp_qjff_AD_for_uiGameEnd_level', level+'');
+
+            if (Laya.Browser.onAndroid) {
+                let boo = JSBridgeUtils.instance.getNetworkAvailable();
+                if (!boo) {
+                    JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                    return;
+                }
+            }
+
+
             if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_UIrepentProp_videoAddHelpLine')) {
 
             } else {

+ 22 - 9
client/laya/src/ui/UIShop.ts

@@ -1,14 +1,18 @@
 import UIBase from "../fgui/core/UIBase";
 import ui_BallRodDisplay from "../fgui/res/game/ui_BallRodDisplay";
+import ui_daoJuDisplay from "../fgui/res/game/ui_daoJuDisplay";
 import ui_UIShop from "../fgui/res/game/ui_UIShop";
 import { xGame } from "../xGame";
 import BallRodDisplay from "./item/BallRodDisplay";
+import DaoJuDisplay from "./item/DaoJuDisplay";
 import MoneyNode from "./item/MoneyNode";
 export default class UIShop extends UIBase {
     protected ui: ui_UIShop;
     public moneyNode: MoneyNode;
     public ballRodArr: Array<BallRodDisplay>;
+    public daoJuArr: Array<DaoJuDisplay>;
     public itemNums: number = 0;
+    public itemNumsForDj: number = 0;
     public curType: string = "";
     public constructor() {
         super();
@@ -27,7 +31,7 @@ export default class UIShop extends UIBase {
         // this.addUIClick(this.ui.btn_daoju, this.test123);
         this.addUIClick(this.ui, this.interuptSecretary);
 
-        console.log('zh:this.renderBallRodthis.renderBallRodthis.renderBallRodthis.renderBallRod = '+this.renderBallRod)
+        // console.log('zh:this.renderBallRodthis.renderBallRodthis.renderBallRodthis.renderBallRod = ' + this.renderBallRod)
         this.ui.myNode.myList.itemRenderer = Laya.Handler.create(this, this.renderBallRod, null, false);
         this.ballRodArr = [];
         this.itemNums = Object.keys(cfgTable.ballrodData).length;
@@ -35,12 +39,11 @@ export default class UIShop extends UIBase {
         // if (Moyu.isKs)
         //     this.ui.closeNode.closeBtn.x += 100;
 
-
         //道具数据----------------start
-        // this.ui.myNode.djList.itemRenderer = Laya.Handler.create(this, this.renderBallRod, null, false);
-        // this.ballRodArr = [];
-        // this.itemNums = Object.keys(cfgTable.ballrodData).length;
-        // this.ui.myNode.myList.numItems = this.itemNums;
+        this.ui.myNode.djList.itemRenderer = Laya.Handler.create(this, this.renderDaoJu, null, false);
+        this.daoJuArr = [];
+        this.itemNumsForDj = Object.keys(cfgTable.daoJuData).length;
+        this.ui.myNode.djList.numItems = this.itemNumsForDj;
         //道具数据----------------end
 
     }
@@ -72,15 +75,12 @@ export default class UIShop extends UIBase {
             }
         }
         if (type == "qiugan") {
-            console.log('zh:qg  sel')
             this.ui.myNode.n_qiuGan.c1.selectedIndex = 0;
             this.ui.myNode.n_daoju.c1.selectedIndex = 1;
             this.ui.myNode.myList.visible = true;
             this.ui.myNode.djList.visible = false;
-
         }
         else {
-            console.log('zh:dj   sel')
             this.ui.myNode.n_qiuGan.c1.selectedIndex = 1;
             this.ui.myNode.n_daoju.c1.selectedIndex = 0;
             this.ui.myNode.myList.visible = false;
@@ -99,6 +99,11 @@ export default class UIShop extends UIBase {
         let ballRod = new BallRodDisplay(obj, index);
         this.ballRodArr.push(ballRod);
     }
+    renderDaoJu(sort, obj: ui_daoJuDisplay) {
+        let index = this.getIndexBySortForDj(sort + 1) - 1;
+        let b = new DaoJuDisplay(obj, index);
+        this.daoJuArr.push(b);
+    }
     getIndexBySort(sort) {
         let object = cfgTable.ballrodData;
         for (const key in object) {
@@ -107,6 +112,14 @@ export default class UIShop extends UIBase {
             }
         }
     }
+    getIndexBySortForDj(sort) {
+        let object = cfgTable.daoJuData;
+        for (const key in object) {
+            if (object[key].sort == sort) {
+                return parseInt(key);
+            }
+        }
+    }
     playSecretaryIdle() {
         let parent = this.ui.secretary.displayObject;
         parent.destroyChildren();

+ 34 - 24
client/laya/src/ui/UISign.ts

@@ -137,42 +137,52 @@ export default class UISign extends UIBase {
     againGetAward() {
         Moyu.sendDataEvent("signIn2");
 
-       // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
-       // JSBridgeUtils.instance.showRewardAd('xxxxx');
+        // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
+        // JSBridgeUtils.instance.showRewardAd('xxxxx');
         console.log('zh:qjff_AD_for_uisign')
+
+
+        if (Laya.Browser.onAndroid) {
+            let boo = JSBridgeUtils.instance.getNetworkAvailable();
+            if (!boo) {
+                JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                return;
+            }
+        }
+
+
         if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uisign')) {
-           
-        
+
         } else {
             console.log('zh:AD 失败,直接发放奖励')
             this.qjff_AD_for_uisign();
         }
-         
+
 
         //Moyu.showVideoAd(() => {
-            // //
-            // //已经领取了奖励的情况
-            // let index = this.curDayIndex;
-            // if (index == 0) index = 7;
-            // let award = cfgTable.signData[index].award;
-            // let temp;
-            // let type;
-            // let num;
-            // for (let index = 0; index < award.length; index++) {
-            //     temp = award[index].split("-");
-            //     type = parseInt(temp[0]);
-            //     num = parseInt(temp[1]) * 3;//三倍再次领取所有奖励
-            //     xGame.common.playObjFlyAnim(num, type);
-            // }
-            // //
-            // DataMgr.setExtraSign(1);
-            // this.updateSign();
-            // //
+        // //
+        // //已经领取了奖励的情况
+        // let index = this.curDayIndex;
+        // if (index == 0) index = 7;
+        // let award = cfgTable.signData[index].award;
+        // let temp;
+        // let type;
+        // let num;
+        // for (let index = 0; index < award.length; index++) {
+        //     temp = award[index].split("-");
+        //     type = parseInt(temp[0]);
+        //     num = parseInt(temp[1]) * 3;//三倍再次领取所有奖励
+        //     xGame.common.playObjFlyAnim(num, type);
+        // }
+        // //
+        // DataMgr.setExtraSign(1);
+        // this.updateSign();
+        // //
         //}, EAdType.againSign)
     }
 
     public qjff_AD_for_uisign() {
-      
+
 
         //已经领取了奖励的情况
         let index = this.curDayIndex;

+ 14 - 5
client/laya/src/ui/UITry.ts

@@ -5,7 +5,7 @@ import ui_UITry from "../fgui/res/game/ui_UITry";
 import PlatMgr from "../game/PlatMgr";
 import { xGame } from "../xGame";
 import GlobalManager from "../utils/GlobalManager";
-import JSBridgeUtils from "../utils/JSBridgeUtils"; 
+import JSBridgeUtils from "../utils/JSBridgeUtils";
 
 export default class UITry extends UIBase {
     protected ui: ui_UITry;
@@ -53,11 +53,20 @@ export default class UITry extends UIBase {
     }
     onTry() {
 
-          console.log('zh:qjff_AD_for_uitry')
-       // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
-       // JSBridgeUtils.instance.showRewardAd('xxxxx');
+        console.log('zh:qjff_AD_for_uitry')
+        // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
+        // JSBridgeUtils.instance.showRewardAd('xxxxx');
+
+        if (Laya.Browser.onAndroid) {
+            let boo = JSBridgeUtils.instance.getNetworkAvailable();
+            if (!boo) {
+                JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
+                return;
+            }
+        }
+
         if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uitry')) {
-        
+
         } else {
             console.log('zh:AD 失败,直接发放奖励')
             this.qjff_AD_for_uitry();

+ 97 - 0
client/laya/src/ui/item/DaoJuDisplay.ts

@@ -0,0 +1,97 @@
+import SpineMgr from "../../core/mgrs/SpineMgr";
+import DataMgr from "../../data/DataMgr";
+//import ui_BallRodDisplay from "../../fgui/res/game/ui_BallRodDisplay";
+import { xGame } from "../../xGame";
+import UIAddProp from "../UIAddProp";
+import UIShop from "../UIShop";
+import JSBridgeUtils from "../../utils/JSBridgeUtils";
+import ui_daoJuDisplay from "../../fgui/res/game/ui_daoJuDisplay";
+
+export default class DaoJuDisplay {
+    public ui: ui_daoJuDisplay;
+    //
+
+    public index: number = 0;
+    public uiIndex: number = 0;
+    constructor(ui: ui_daoJuDisplay, index) {
+        this.ui = ui;
+        this.index = index;
+        this.initData();
+    }
+    public initData() {
+        // this.ui.btn_buy.onClick(this, this.buyBallRod);
+        this.ui.btn_buy.onClick(this, this.buyDj);
+        let data = cfgTable.daoJuData[this.index + 1];
+        console.log('zh:'+JSON.stringify(data))
+        this.ui.nameTxt.text = data.name;
+        this.ui.n_jiaGe.text = data.price + "";
+        this.ui.n_zuanShi.text = data.price+"";
+        this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
+        // this.ui.levelNode.c1.selectedIndex = data.quality;
+        //  this.ui.purchaseBtn.diamondTxt.text = data.price + "";
+
+    }
+
+
+    buyDj() {
+        xGame.soundMgr.playSound(xGame.common.btnClickStr);
+    }
+    buyBallRod() {
+
+
+        // let selectedIndex = this.ui.btn_buy.c1.selectedIndex;
+        // switch (selectedIndex) {
+        //     case 0:
+        //         //  console.log('zh:点击了 000000000000000');
+        //         break;
+        //     case 1:
+        //         console.log('zh:点击了 USE THIS');
+        //         DataMgr.setCurBallRod(this.index);
+
+          
+
+        //         let curUse = DataMgr.getCurBallRod();
+        //         console.log('zh:updateSelf 选择的球杆 = ' + curUse);
+        //         let ui = <UIShop>xGame.uiMgr.getUI(UIShop);
+        //         ui.updateBallRod();
+        //         break;
+        //     case 2:
+        //         // console.log('zh:点击了 2222222222222');
+        //         let data = cfgTable.ballrodData[this.index + 1];
+        //         let need = data.price;
+        //         if (DataMgr.diamondEnough(need)) {
+        //             DataMgr.setDiamond(-need);
+        //             //
+        //             DataMgr.setBallRod(this.index, 1);
+        //             DataMgr.setCurBallRod(this.index);
+        //             //
+        //             let ui = <UIShop>xGame.uiMgr.getUI(UIShop);
+        //             ui.updateBallRod();
+        //             this.logEventForGouMaiGan(selectedIndex + '-' + data.name);
+        //         }
+        //         else {
+        //             xGame.uiMgr.Show(UIAddProp, 1);
+        //         }
+        //         break;
+
+        //     default:
+        //         break;
+        // }
+    }
+
+
+
+    /**
+     * 购买球杆
+     * @param qiuGanName 
+     */
+    logEventForGouMaiGan(qiuGanName) {
+        //{"value":"商品ID"}
+        const ev = {
+            value: qiuGanName
+        };
+        const jsonStr = JSON.stringify(ev);
+        console.log('zh:ts  logEventForGouMaiGan req jsonStr=' + jsonStr);
+        JSBridgeUtils.instance.logEventForAdHaveParams('iap_start', jsonStr);
+    }
+}

+ 43 - 7
client/laya/src/utils/JSBridgeUtils.ts

@@ -110,11 +110,9 @@ export default class JSBridgeUtils {
     public exitAndCloseGame(): void {
 
         if (!Laya.Browser.onAndroid) {
-            console.log('zh:非android dev')
             return;
         }
         if (!this.initBridge()) {
-
             return;
         }
         console.log('zh:开始关闭游戏-')
@@ -125,13 +123,12 @@ export default class JSBridgeUtils {
 
     public showRewardAd(mark): boolean {
         if (!Laya.Browser.onAndroid) {
-            console.log('zh:非android dev')
             return false;
         }
         if (!this.initBridge()) {
             return false;
         }
-        
+
         let rs = this.bridge.call("showRewardAd", mark);
         console.log('zh:showRewardAd rs= ' + rs + '   ,mark=' + mark);
         try {
@@ -160,7 +157,6 @@ export default class JSBridgeUtils {
     public logEventForAdNoParams(eventName) {
         console.log("zh:logEventForAdNoParams eventName1=" + eventName);
         if (!Laya.Browser.onAndroid) {
-            console.log('zh:非android dev')
             return;
         }
         if (!this.initBridge()) {
@@ -178,7 +174,6 @@ export default class JSBridgeUtils {
     public logEventForAdHaveParams(eventName, jsonStr) {
         console.log("zh:ts logEventForAdHaveParams eventName1=" + eventName);
         if (!Laya.Browser.onAndroid) {
-            console.log('zh:非android dev')
             return;
         }
         if (!this.initBridge()) {
@@ -202,7 +197,6 @@ export default class JSBridgeUtils {
     public logEventForFirebase(eventName, jsonStr) {
         console.log("zh:ts logEventForFirebase eventName1=" + eventName);
         if (!Laya.Browser.onAndroid) {
-            console.log('zh:非android dev')
             return;
         }
         if (!this.initBridge()) {
@@ -216,6 +210,48 @@ export default class JSBridgeUtils {
     ///----------------事件埋点 end
 
 
+    //------------------网络判断 start  
+    //  if (cc.sys.os === cc.sys.OS_ANDROID) {
+    //   console.log('zh:开始判断网络1112233 ');
+    //   let boo = AAJS2.getNetworkAvailable();
+    //   if (!boo) {
+    //     AAJS2.showToast2("Network error, reward unavailable");
+    //     return;
+    //   }
+    // }
+
+    testNetTip() {
+        if (Laya.Browser.onAndroid) {
+            let boo = this.getNetworkAvailable();
+            this.showToast2("Network error, reward unavailable");
+            return;
+        }
+    }
+
+    public getNetworkAvailable(): boolean {
+        if (!Laya.Browser.onAndroid) {
+            return;
+        }
+        if (!this.initBridge()) {
+            return;
+        }
+        let boo = this.bridge.call("getNetworkAvailable");
+        console.log("zh:getNetworkAvailable boo=" + boo);
+        return boo;
+    }
+    showToast2(msg: string): void {
+        if (!Laya.Browser.onAndroid) {
+            return;
+        }
+        if (!this.initBridge()) {
+            return;
+        }
+        this.bridge.call("showToast2", msg);
+    }
+    //------------------网络判断 end 
+
+
+
 
 
     nativeCallJs(msg: string) {

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů