|
@@ -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 {
|