dzduole 1 日 前
コミット
8b6c47643c

BIN
client/laya/bin/asset/fgui/game.obj


BIN
client/laya/bin/asset/fgui/game_atlas0.png


BIN
client/laya/bin/asset/fgui/game_atlas0_1.png


+ 158 - 35
client/laya/bin/js/bundle.js

@@ -850,7 +850,7 @@
 
     class HttpMgr {
         constructor() {
-            this.isDev = true;
+            this.isDev = false;
             HttpMgr._instance = this;
         }
         static getInstance() {
@@ -924,6 +924,7 @@
             httpObj.once(Laya.Event.COMPLETE, this, completeHandler);
             httpObj.once(Laya.Event.ERROR, this, errorHandler);
             httpObj.send(url, data, 'post', 'text', headers);
+            console.log('zh: http url = ' + url);
             function errorHandler(error) {
                 if (call) {
                     call("{'msg':'Network exception','code':500}");
@@ -1353,7 +1354,7 @@
             }
             this.bridge.call("loginOutForApp");
         }
-        testPay1(token, ggSpid) {
+        startGgPay(token, ggSpid) {
             if (!Laya.Browser.onAndroid) {
                 return;
             }
@@ -1366,8 +1367,24 @@
                 spsl: 1
             };
             let reqData = JSON.stringify(jsonObj);
-            console.log("zh:testPay1 ts  reqData=" + reqData);
-            this.bridge.call("testPay1", reqData);
+            console.log("zh:startGgPay ts  reqData=" + reqData);
+            this.bridge.call("startGgPay", reqData);
+        }
+        testPay1ForMoNiPayOver(token, ggSpid) {
+            if (!Laya.Browser.onAndroid) {
+                return;
+            }
+            if (!this.initBridge()) {
+                return;
+            }
+            let jsonObj = {
+                token: token,
+                ggSpid: ggSpid,
+                spsl: 1
+            };
+            let reqData = JSON.stringify(jsonObj);
+            console.log("zh:testPay1ForMoNiPayOver ts  reqData=" + reqData);
+            this.bridge.call("testPay1ForMoNiPayOver", reqData);
         }
         nativeCallJs(msg) {
             console.log("zh:nativeCallJs received data: 1111", msg);
@@ -4477,6 +4494,7 @@
             this.n_Logout = (this.getChild("n_Logout"));
             this.n_zhuCe = (this.getChild("n_zhuCe"));
             this.n_dengLu = (this.getChild("n_dengLu"));
+            this.n_moni_pay_ok = (this.getChild("n_moni_pay_ok"));
         }
     }
     ui_UIMain.URL = "ui://isxx5ak7kt443qc";
@@ -5954,25 +5972,36 @@
         constructor(ui, index) {
             this.index = 0;
             this.uiIndex = 0;
+            this.ggSpid = "";
             this.ui = ui;
             this.index = index;
             this.initData();
         }
         initData() {
-            this.ui.btn_buy.onClick(this, this.buySp);
-            this.ui.btn_buy.onClick(this, this.buyDj);
+            this.ui.btn_buy.onClick(this, this.gotoBuy);
             let data = cfgTable.daoJuData[this.index + 1];
             console.log('zh:' + JSON.stringify(data));
             this.ui.nameTxt.text = data.spbt;
             this.ui.n_jiaGe.text = data.spjg + "";
             this.ui.n_zuanShi.text = "X" + data.zssl + "";
+            this.ggSpid = data.ggSpid;
             let baseUrl = "asset/sound/ogg/";
             this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
         }
-        buyDj() {
-            xGame.soundMgr.playSound(xGame.common.btnClickStr);
+        gotoBuy() {
+            let userInfo = LocalStorageManager.getItem('userInfo');
+            if (userInfo != null) {
+                let token = userInfo.token;
+                let ggSpid = this.ggSpid;
+                JSBridgeUtils.instance.startGgPay(token, ggSpid);
+                return;
+            }
+            else {
+                xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
+            }
         }
-        buySp() {
+        gotoBuy1() {
+            xGame.soundMgr.playSound(xGame.common.btnClickStr);
             let djItem = cfgTable.daoJuData[this.index + 1];
             console.log('zh:点击购买 djItem =' + JSON.stringify(djItem));
             let userInfo = LocalStorageManager.getItem('userInfo');
@@ -5991,7 +6020,7 @@
                     let msg = res.msg;
                     if (code == 401) {
                         Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                        alert(TIP_MSG_key.pleaseLoginIn);
+                        xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
                         return;
                     }
                     if (code == 200) {
@@ -6052,7 +6081,7 @@
                     let msg = res.msg;
                     if (code == 401) {
                         Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                        alert(TIP_MSG_key.pleaseLoginIn);
+                        xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
                         return;
                     }
                     if (code == 200) {
@@ -7048,6 +7077,18 @@
             this.hide();
         }
         gotoBuy() {
+            let userInfo = LocalStorageManager.getItem('userInfo');
+            if (userInfo != null) {
+                let token = userInfo.token;
+                let ggSpid = 'com.vadltq.strike.ball.cue.noads.pack';
+                JSBridgeUtils.instance.startGgPay(token, ggSpid);
+                return;
+            }
+            else {
+                xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
+            }
+        }
+        gotoBuy2() {
             let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
             if (userInfo == null) {
                 xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
@@ -7119,6 +7160,18 @@
             this.hide();
         }
         gotoBuy() {
+            let userInfo = LocalStorageManager.getItem('userInfo');
+            if (userInfo != null) {
+                let token = userInfo.token;
+                let ggSpid = 'com.vadltq.strike.ball.cue.passcard';
+                JSBridgeUtils.instance.startGgPay(token, ggSpid);
+                return;
+            }
+            else {
+                xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
+            }
+        }
+        gotoBuy1() {
             let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
             if (userInfo == null) {
                 xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
@@ -7502,11 +7555,13 @@
         gotoRegUser() {
             xGame.uiMgr.Show(UIReg);
         }
-        showFuLi() {
-            console.log('zh:福利2');
+        showFuLi1() {
+            console.log('zh:福利1');
             xGame.uiMgr.Show(UIFuli1);
+        }
+        showFuLi2() {
+            console.log('zh:福利2');
             xGame.uiMgr.Show(UIFuli2);
-            console.log('zh:福利2222');
         }
         c_btn_for_user() {
             this.ui.n_Logout.visible = false;
@@ -7559,7 +7614,8 @@
             this.addUIClick(this.ui.n_Logout, this.Logout);
             this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
             this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
-            this.addUIClick(this.ui.n_fuli, this.showFuLi);
+            this.addUIClick(this.ui.n_fuli, this.showFuLi2);
+            this.addUIClick(this.ui.n_moni_pay_ok, this.start_debug_for_moni_payOk);
         }
         show(showFailWords) {
             super.show();
@@ -7599,7 +7655,10 @@
                     console.log("zh: no firstEnter");
                 }
                 Laya.timer.once(randTime, this, () => {
-                    xGame.common.autoPopUIView();
+                });
+                Laya.timer.once(1000, this, () => {
+                    console.log('zh: 1秒后  showFuLi1');
+                    this.showFuLi1();
                 });
             }
         }
@@ -7737,15 +7796,21 @@
                 xGame.uiMgr.Hide(UIGameEnd);
             });
         }
-        startGlobal() {
-            xGame.uiMgr.Show(UIMsg, "Coming Soon.");
+        start_debug_for_moni_payOk() {
+            console.log('zh:start_debug_for_moni_payOk 111');
             let userInfo = LocalStorageManager.getItem('userInfo');
             if (userInfo != null) {
                 let token = userInfo.token;
                 let ggSpid = 'com.vadltq.strike.ball.cue.gem50';
-                JSBridgeUtils.instance.testPay1(token, ggSpid);
+                JSBridgeUtils.instance.testPay1ForMoNiPayOver(token, ggSpid);
                 return;
             }
+            else {
+                alert(TIP_MSG_key.pleaseLoginIn);
+            }
+        }
+        startGlobal() {
+            xGame.uiMgr.Show(UIMsg, "Coming Soon.");
         }
         startWeekly() {
             xGame.uiMgr.Show(UIMsg, "Coming Soon");
@@ -13202,6 +13267,16 @@
     }
     ui_Component143.URL = "ui://isxx5ak7dt0av4yn";
 
+    class ui_Component1_debug_pay_ok extends fgui.GComponent {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "Component1_debug_pay_ok"));
+        }
+        onConstruct() {
+            this.n_moni_pay_ok = (this.getChild("n_moni_pay_ok"));
+        }
+    }
+    ui_Component1_debug_pay_ok.URL = "ui://isxx5ak7e1lxv59z";
+
     class ui_dh_jingbi2 extends fgui.GComponent {
         static createInstance() {
             return (fgui.UIPackage.createObject("game", "dh_jingbi2"));
@@ -16473,6 +16548,7 @@
             fgui.UIObjectFactory.setExtension(ui_huihe2.URL, ui_huihe2);
             fgui.UIObjectFactory.setExtension(ui_UIGuanYu.URL, ui_UIGuanYu);
             fgui.UIObjectFactory.setExtension(ui_Component143.URL, ui_Component143);
+            fgui.UIObjectFactory.setExtension(ui_Component1_debug_pay_ok.URL, ui_Component1_debug_pay_ok);
             fgui.UIObjectFactory.setExtension(ui_dh_jingbi2.URL, ui_dh_jingbi2);
             fgui.UIObjectFactory.setExtension(ui_dh_jingbi2_1.URL, ui_dh_jingbi2_1);
             fgui.UIObjectFactory.setExtension(ui_dh_jingbi3.URL, ui_dh_jingbi3);
@@ -18817,7 +18893,7 @@
                     let data = res.data;
                     if (code == 401) {
                         Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                        alert(TIP_MSG_key.pleaseLoginIn);
+                        console.log('zh:保存资产信息失败,请重新登录    ');
                         return;
                     }
                     if (code == 200) {
@@ -22962,25 +23038,36 @@
         constructor(ui, index) {
             this.index = 0;
             this.uiIndex = 0;
+            this.ggSpid = "";
             this.ui = ui;
             this.index = index;
             this.initData();
         }
         initData() {
-            this.ui.btn_buy.onClick(this, this.buySp);
-            this.ui.btn_buy.onClick(this, this.buyDj);
+            this.ui.btn_buy.onClick(this, this.gotoBuy);
             let data = cfgTable.daoJuData[this.index + 1];
             console.log('zh:' + JSON.stringify(data));
             this.ui.nameTxt.text = data.spbt;
             this.ui.n_jiaGe.text = data.spjg + "";
             this.ui.n_zuanShi.text = "X" + data.zssl + "";
+            this.ggSpid = data.ggSpid;
             let baseUrl = "asset/sound/ogg/";
             this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
         }
-        buyDj() {
-            xGame.soundMgr.playSound(xGame.common.btnClickStr);
+        gotoBuy() {
+            let userInfo = LocalStorageManager.getItem('userInfo');
+            if (userInfo != null) {
+                let token = userInfo.token;
+                let ggSpid = this.ggSpid;
+                JSBridgeUtils.instance.startGgPay(token, ggSpid);
+                return;
+            }
+            else {
+                xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
+            }
         }
-        buySp() {
+        gotoBuy1() {
+            xGame.soundMgr.playSound(xGame.common.btnClickStr);
             let djItem = cfgTable.daoJuData[this.index + 1];
             console.log('zh:点击购买 djItem =' + JSON.stringify(djItem));
             let userInfo = LocalStorageManager.getItem('userInfo');
@@ -22999,7 +23086,7 @@
                     let msg = res.msg;
                     if (code == 401) {
                         Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                        alert(TIP_MSG_key.pleaseLoginIn);
+                        xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
                         return;
                     }
                     if (code == 200) {
@@ -23060,7 +23147,7 @@
                     let msg = res.msg;
                     if (code == 401) {
                         Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                        alert(TIP_MSG_key.pleaseLoginIn);
+                        xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
                         return;
                     }
                     if (code == 200) {
@@ -23675,6 +23762,18 @@
             this.hide();
         }
         gotoBuy() {
+            let userInfo = LocalStorageManager.getItem('userInfo');
+            if (userInfo != null) {
+                let token = userInfo.token;
+                let ggSpid = 'com.vadltq.strike.ball.cue.noads.pack';
+                JSBridgeUtils.instance.startGgPay(token, ggSpid);
+                return;
+            }
+            else {
+                xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
+            }
+        }
+        gotoBuy2() {
             let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
             if (userInfo == null) {
                 xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
@@ -23735,6 +23834,18 @@
             this.hide();
         }
         gotoBuy() {
+            let userInfo = LocalStorageManager.getItem('userInfo');
+            if (userInfo != null) {
+                let token = userInfo.token;
+                let ggSpid = 'com.vadltq.strike.ball.cue.passcard';
+                JSBridgeUtils.instance.startGgPay(token, ggSpid);
+                return;
+            }
+            else {
+                xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
+            }
+        }
+        gotoBuy1() {
             let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
             if (userInfo == null) {
                 xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
@@ -24204,11 +24315,13 @@
         gotoRegUser() {
             xGame.uiMgr.Show(UIReg$1);
         }
-        showFuLi() {
-            console.log('zh:福利2');
+        showFuLi1() {
+            console.log('zh:福利1');
             xGame.uiMgr.Show(UIFuli1$1);
+        }
+        showFuLi2() {
+            console.log('zh:福利2');
             xGame.uiMgr.Show(UIFuli2$1);
-            console.log('zh:福利2222');
         }
         c_btn_for_user() {
             this.ui.n_Logout.visible = false;
@@ -24261,7 +24374,8 @@
             this.addUIClick(this.ui.n_Logout, this.Logout);
             this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
             this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
-            this.addUIClick(this.ui.n_fuli, this.showFuLi);
+            this.addUIClick(this.ui.n_fuli, this.showFuLi2);
+            this.addUIClick(this.ui.n_moni_pay_ok, this.start_debug_for_moni_payOk);
         }
         show(showFailWords) {
             super.show();
@@ -24301,7 +24415,10 @@
                     console.log("zh: no firstEnter");
                 }
                 Laya.timer.once(randTime, this, () => {
-                    xGame.common.autoPopUIView();
+                });
+                Laya.timer.once(1000, this, () => {
+                    console.log('zh: 1秒后  showFuLi1');
+                    this.showFuLi1();
                 });
             }
         }
@@ -24439,15 +24556,21 @@
                 xGame.uiMgr.Hide(UIGameEnd$1);
             });
         }
-        startGlobal() {
-            xGame.uiMgr.Show(UIMsg$1, "Coming Soon.");
+        start_debug_for_moni_payOk() {
+            console.log('zh:start_debug_for_moni_payOk 111');
             let userInfo = LocalStorageManager.getItem('userInfo');
             if (userInfo != null) {
                 let token = userInfo.token;
                 let ggSpid = 'com.vadltq.strike.ball.cue.gem50';
-                JSBridgeUtils.instance.testPay1(token, ggSpid);
+                JSBridgeUtils.instance.testPay1ForMoNiPayOver(token, ggSpid);
                 return;
             }
+            else {
+                alert(TIP_MSG_key.pleaseLoginIn);
+            }
+        }
+        startGlobal() {
+            xGame.uiMgr.Show(UIMsg$1, "Coming Soon.");
         }
         startWeekly() {
             xGame.uiMgr.Show(UIMsg$1, "Coming Soon");

ファイルの差分が大きいため隠しています
+ 0 - 0
client/laya/bin/js/bundle.js.map


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

@@ -1074,7 +1074,7 @@ cfgTable.daoJuData = {
     },
     [3]: {
         spid: 4,
-        ggSpid: 'com.vadltq.strike.ball.cue.gem100',
+        ggSpid: 'com.vadltq.strike.ball.cue.gem500',
         spbt: 'Gem500',
         spjg: 4.99,
         zssl: 500,

+ 2 - 1
client/laya/src/core/mgrs/HttpMgr.ts

@@ -53,7 +53,7 @@ export class HttpMgr {
 
 
 
-    private isDev: boolean = true;//是否是开发环境
+    private isDev: boolean = false;//是否是开发环境
     public getReqData() {
         let reqData = JSON.stringify({
             gameName: "TQ",
@@ -112,6 +112,7 @@ export class HttpMgr {
         httpObj.once(Laya.Event.ERROR, this, errorHandler);
         // httpObj.send(url, data, 'post', 'text', ["Content-Type", "application/json; charset=UTF-8"]);
         httpObj.send(url, data, 'post', 'text', headers);
+        console.log('zh: http url = ' + url)
         function errorHandler(error): void {
             if (call) {
                 call("{'msg':'Network exception','code':500}");//固定

+ 2 - 1
client/laya/src/data/DataMgr.ts

@@ -730,7 +730,8 @@ export default class DataMgr {
                 let data = res.data;
                 if (code == 401) {
                     Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                    alert(TIP_MSG_key.pleaseLoginIn);
+                    console.log('zh:保存资产信息失败,请重新登录    ')
+                    //alert(TIP_MSG_key.pleaseLoginIn);
                     //import UIMsg from "./UIMsg";
                     //xGame.uiMgr.Show(UIMsg, msg)
                     return;

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

@@ -29,6 +29,7 @@ import ui_huihe1 from "./ui_huihe1";
 import ui_huihe2 from "./ui_huihe2";
 import ui_UIGuanYu from "./ui_UIGuanYu";
 import ui_Component143 from "./ui_Component143";
+import ui_Component1_debug_pay_ok from "./ui_Component1_debug_pay_ok";
 import ui_dh_jingbi2 from "./ui_dh_jingbi2";
 import ui_dh_jingbi2_1 from "./ui_dh_jingbi2_1";
 import ui_dh_jingbi3 from "./ui_dh_jingbi3";
@@ -307,6 +308,7 @@ export default class gameBinder {
 		fgui.UIObjectFactory.setExtension(ui_huihe2.URL, ui_huihe2);
 		fgui.UIObjectFactory.setExtension(ui_UIGuanYu.URL, ui_UIGuanYu);
 		fgui.UIObjectFactory.setExtension(ui_Component143.URL, ui_Component143);
+		fgui.UIObjectFactory.setExtension(ui_Component1_debug_pay_ok.URL, ui_Component1_debug_pay_ok);
 		fgui.UIObjectFactory.setExtension(ui_dh_jingbi2.URL, ui_dh_jingbi2);
 		fgui.UIObjectFactory.setExtension(ui_dh_jingbi2_1.URL, ui_dh_jingbi2_1);
 		fgui.UIObjectFactory.setExtension(ui_dh_jingbi3.URL, ui_dh_jingbi3);

+ 15 - 0
client/laya/src/fgui/res/game/ui_Component1_debug_pay_ok.ts

@@ -0,0 +1,15 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+export default class ui_Component1_debug_pay_ok extends fgui.GComponent {
+
+	public n_moni_pay_ok:fgui.GImage;
+	public static URL:string = "ui://isxx5ak7e1lxv59z";
+
+	public static createInstance():ui_Component1_debug_pay_ok {
+		return <ui_Component1_debug_pay_ok>(fgui.UIPackage.createObject("game", "Component1_debug_pay_ok"));
+	}
+
+	protected onConstruct():void {
+		this.n_moni_pay_ok = <fgui.GImage>(this.getChild("n_moni_pay_ok"));
+	}
+}

+ 3 - 0
client/laya/src/fgui/res/game/ui_UIMain.ts

@@ -22,6 +22,7 @@ import ui_Component60 from "./ui_Component60";
 import ui_dh_zuanshi from "./ui_dh_zuanshi";
 import ui_Component141 from "./ui_Component141";
 import ui_Component_dl_zc from "./ui_Component_dl_zc";
+import ui_Component1_debug_pay_ok from "./ui_Component1_debug_pay_ok";
 
 export default class ui_UIMain extends fgui.GComponent {
 
@@ -60,6 +61,7 @@ export default class ui_UIMain extends fgui.GComponent {
 	public n_Logout:ui_Component_dl_zc;
 	public n_zhuCe:ui_Component_dl_zc;
 	public n_dengLu:ui_Component_dl_zc;
+	public n_moni_pay_ok:ui_Component1_debug_pay_ok;
 	public static URL:string = "ui://isxx5ak7kt443qc";
 
 	public static createInstance():ui_UIMain {
@@ -102,5 +104,6 @@ export default class ui_UIMain extends fgui.GComponent {
 		this.n_Logout = <ui_Component_dl_zc>(this.getChild("n_Logout"));
 		this.n_zhuCe = <ui_Component_dl_zc>(this.getChild("n_zhuCe"));
 		this.n_dengLu = <ui_Component_dl_zc>(this.getChild("n_dengLu"));
+		this.n_moni_pay_ok = <ui_Component1_debug_pay_ok>(this.getChild("n_moni_pay_ok"));
 	}
 }

+ 16 - 0
client/laya/src/ui/UIFuli1.ts

@@ -6,6 +6,11 @@ import { xGame } from "../xGame";
 import { keyForLoginInfo, TIP_MSG_key } from "../data/Define";
 import { GameData } from "../data/Data";
 import DataMgr from "../data/DataMgr";
+
+import GlobalManager from "../utils/GlobalManager";
+import JSBridgeUtils from "../utils/JSBridgeUtils";
+
+
 export default class UIFuli1 extends UIBase {
     protected ui: ui_UIFuli1;
 
@@ -29,6 +34,17 @@ export default class UIFuli1 extends UIBase {
         this.hide();
     }
     gotoBuy() {
+        let userInfo = LocalStorageManager.getItem('userInfo');
+        if (userInfo != null) {
+            let token = userInfo.token;
+            let ggSpid = 'com.vadltq.strike.ball.cue.noads.pack';
+            JSBridgeUtils.instance.startGgPay(token, ggSpid);
+            return;
+        } else {
+            xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
+        }
+    }
+    gotoBuy2() {
         let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
         if (userInfo == null) {
             xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);

+ 19 - 0
client/laya/src/ui/UIFuli2.ts

@@ -7,6 +7,14 @@ import { keyForLoginInfo, TIP_MSG_key } from "../data/Define";
 
 import { GameData } from "../data/Data";
 import DataMgr from "../data/DataMgr";
+
+
+
+
+import GlobalManager from "../utils/GlobalManager";
+import JSBridgeUtils from "../utils/JSBridgeUtils";
+
+
 export default class UIFuli2 extends UIBase {
     protected ui: ui_UIFuli2;
 
@@ -30,6 +38,17 @@ export default class UIFuli2 extends UIBase {
         this.hide();
     }
     gotoBuy() {
+        let userInfo = LocalStorageManager.getItem('userInfo');
+        if (userInfo != null) {
+            let token = userInfo.token;
+            let ggSpid = 'com.vadltq.strike.ball.cue.passcard';
+            JSBridgeUtils.instance.startGgPay(token, ggSpid);
+            return;
+        } else {
+            xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
+        }
+    }
+    gotoBuy1() {
         let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
         if (userInfo == null) {
             xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);

+ 30 - 14
client/laya/src/ui/UIMain.ts

@@ -1,6 +1,6 @@
 import SpineMgr from "../core/mgrs/SpineMgr";
 import DataMgr from "../data/DataMgr";
-import { CHANGE_SECRETARY, GameMode, GET_USER_INFO, RESTART_GAME, keyForLoginInfo } from "../data/Define";
+import { CHANGE_SECRETARY, GameMode, GET_USER_INFO, RESTART_GAME, keyForLoginInfo, TIP_MSG_key } from "../data/Define";
 import UIBase from "../fgui/core/UIBase";
 import ui_UIMain from "../fgui/res/game/ui_UIMain";
 import PlatMgr from "../game/PlatMgr";
@@ -199,7 +199,7 @@ export default class UIMain extends UIBase {
         }
         //必须要调用APP退出登录
         JSBridgeUtils.instance.loginOutForApp();
-        
+
     }
     gotoLogin() {
         xGame.uiMgr.Show(UILogin);
@@ -207,11 +207,13 @@ export default class UIMain extends UIBase {
     gotoRegUser() {
         xGame.uiMgr.Show(UIReg);
     }
-    showFuLi() {
-        console.log('zh:福利2');
+    showFuLi1() {
+        console.log('zh:福利1');
         xGame.uiMgr.Show(UIFuli1);
+    }
+    showFuLi2() {
+        console.log('zh:福利2');
         xGame.uiMgr.Show(UIFuli2);
-        console.log('zh:福利2222');
     }
 
     /**
@@ -278,8 +280,10 @@ export default class UIMain extends UIBase {
         this.addUIClick(this.ui.n_Logout, this.Logout);
         this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
         this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
-        this.addUIClick(this.ui.n_fuli, this.showFuLi);
+        this.addUIClick(this.ui.n_fuli, this.showFuLi2);
 
+        //调试专用
+        this.addUIClick(this.ui.n_moni_pay_ok, this.start_debug_for_moni_payOk);
 
     }
     public show(showFailWords): void {
@@ -332,10 +336,17 @@ export default class UIMain extends UIBase {
                 randTime += 900;
             } else {
                 console.log("zh: no firstEnter");
+
             }
             Laya.timer.once(randTime, this, () => {
-                xGame.common.autoPopUIView();
+                // xGame.common.autoPopUIView();
             })
+
+            Laya.timer.once(1000, this, () => {
+                console.log('zh: 1秒后  showFuLi1')
+                this.showFuLi1();
+            })
+
         }
     }
     checkActive(show) {
@@ -494,22 +505,27 @@ export default class UIMain extends UIBase {
     }
 
 
-
-
-
-    startGlobal() {
-        xGame.uiMgr.Show(UIMsg, "Coming Soon.")
-
+    /**
+     * 模拟支付OK
+     * @returns 
+     */
+    start_debug_for_moni_payOk() {
+        console.log('zh:start_debug_for_moni_payOk 111')
         let userInfo = LocalStorageManager.getItem('userInfo');
         if (userInfo != null) {
             let token = userInfo.token;
             let ggSpid = 'com.vadltq.strike.ball.cue.gem50';
-            JSBridgeUtils.instance.testPay1(token,ggSpid);
+            JSBridgeUtils.instance.testPay1ForMoNiPayOver(token, ggSpid);
             return;
+        } else {
+            alert(TIP_MSG_key.pleaseLoginIn)
         }
+    }
 
 
 
+    startGlobal() {
+        xGame.uiMgr.Show(UIMsg, "Coming Soon.")
         //xGame.uiMgr.Show(UITry);
         //  JSBridgeUtils.instance.showInternAd('');
     }

+ 1 - 2
client/laya/src/ui/UIShop.ts

@@ -70,9 +70,8 @@ export default class UIShop extends UIBase {
                 let msg = res.msg;
                 if (code == 401) {
                     Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                    alert(TIP_MSG_key.pleaseLoginIn);
                     //import UIMsg from "./UIMsg";
-                    //xGame.uiMgr.Show(UIMsg, msg)
+                    xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
                     return;
                 }
                 if (code == 200) {

+ 19 - 8
client/laya/src/ui/item/DaoJuDisplay.ts

@@ -14,32 +14,43 @@ export default class DaoJuDisplay {
 
     public index: number = 0;
     public uiIndex: number = 0;
+    private ggSpid: string = "";
     constructor(ui: ui_daoJuDisplay, index) {
         this.ui = ui;
         this.index = index;
         this.initData();
     }
     public initData() {
-        this.ui.btn_buy.onClick(this, this.buySp);
-        this.ui.btn_buy.onClick(this, this.buyDj);
+        this.ui.btn_buy.onClick(this, this.gotoBuy);
         let data = cfgTable.daoJuData[this.index + 1];
         console.log('zh:' + JSON.stringify(data))
         this.ui.nameTxt.text = data.spbt;
         this.ui.n_jiaGe.text = data.spjg + "";
         this.ui.n_zuanShi.text = "X" + data.zssl + "";
 
+        this.ggSpid = data.ggSpid;
+
         let baseUrl = "asset/sound/ogg/";
         this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
         // this.ui.levelNode.c1.selectedIndex = data.quality;
         //  this.ui.purchaseBtn.diamondTxt.text = data.price + "";
 
     }
+    gotoBuy() {
+        let userInfo = LocalStorageManager.getItem('userInfo');
+        if (userInfo != null) {
+            let token = userInfo.token;
+            let ggSpid = this.ggSpid;
+            JSBridgeUtils.instance.startGgPay(token, ggSpid);
+            return;
+        } else {
+            //com.vadltq.strike.ball.cue.gem50
+            xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
+        }
+    }
 
-
-    buyDj() {
+    gotoBuy1() {
         xGame.soundMgr.playSound(xGame.common.btnClickStr);
-    }
-    buySp() {
         let djItem = cfgTable.daoJuData[this.index + 1];
         console.log('zh:点击购买 djItem =' + JSON.stringify(djItem));
         let userInfo = LocalStorageManager.getItem('userInfo');
@@ -59,9 +70,9 @@ export default class DaoJuDisplay {
                 let msg = res.msg;
                 if (code == 401) {
                     Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                    alert(TIP_MSG_key.pleaseLoginIn);
+                  //  alert(TIP_MSG_key.pleaseLoginIn);
                     //import UIMsg from "./UIMsg";
-                    //xGame.uiMgr.Show(UIMsg, msg)
+                    xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
                     return;
                 }
                 if (code == 200) {

+ 30 - 5
client/laya/src/utils/JSBridgeUtils.ts

@@ -255,7 +255,7 @@ export default class JSBridgeUtils {
      * 退出APP  里的缓存
      * @returns 
      */
-    public loginOutForApp():void{
+    public loginOutForApp(): void {
         if (!Laya.Browser.onAndroid) {
             return;
         }
@@ -264,7 +264,8 @@ export default class JSBridgeUtils {
         }
         this.bridge.call("loginOutForApp");
     }
-    public testPay1(token: string, ggSpid: string): void {
+  
+    public startGgPay(token: string, ggSpid: string): void {
         if (!Laya.Browser.onAndroid) {
             return;
         }
@@ -275,11 +276,35 @@ export default class JSBridgeUtils {
         let jsonObj = {
             token: token,
             ggSpid: ggSpid,
-            spsl:1
+            spsl: 1
         };
         let reqData = JSON.stringify(jsonObj);
-        console.log("zh:testPay1 ts  reqData=" + reqData);
-        this.bridge.call("testPay1", reqData);
+        console.log("zh:startGgPay ts  reqData=" + reqData);
+        this.bridge.call("startGgPay", reqData);
+    }
+
+
+    /**
+     * 模拟支付成功
+     * @param token 
+     * @param ggSpid 
+     */
+    public testPay1ForMoNiPayOver(token: string, ggSpid: string): void {
+        if (!Laya.Browser.onAndroid) {
+            return;
+        }
+        if (!this.initBridge()) {
+            return;
+        }
+
+        let jsonObj = {
+            token: token,
+            ggSpid: ggSpid,
+            spsl: 1
+        };
+        let reqData = JSON.stringify(jsonObj);
+        console.log("zh:testPay1ForMoNiPayOver ts  reqData=" + reqData);
+        this.bridge.call("testPay1ForMoNiPayOver", reqData);
     }
 
 

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません