dzduole 2 days ago
parent
commit
cf71ddb1c1

+ 6 - 1
art/fgui/.objs/metas/isxx5ak7/kt443qc.info

@@ -12,7 +12,6 @@
       "hidden": true
       "hidden": true
     },
     },
     "n77_vhzh": {
     "n77_vhzh": {
-      "collapsed": true,
       "locked": true,
       "locked": true,
       "hidden": true
       "hidden": true
     },
     },
@@ -20,6 +19,12 @@
       "locked": true,
       "locked": true,
       "hidden": true
       "hidden": true
     },
     },
+    "n45_ixm4": {
+      "collapsed": true
+    },
+    "n46_ixm4": {
+      "collapsed": true
+    },
     "n83_jpsz": {
     "n83_jpsz": {
       "hidden": true
       "hidden": true
     }
     }

+ 1 - 1
art/fgui/assets/game/UISecretary/UIFuli/UIFuli1.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1700,750" designImageLayer="1">
 <component size="1700,750" designImageLayer="1">
   <displayList>
   <displayList>
-    <graph id="n1_im8n" name="n1" xy="0,0" size="1700,750" alpha="0.8" type="rect" fillColor="#ff000000">
+    <graph id="n1_im8n" name="n1" xy="0,0" size="1700,750" alpha="0.6" type="rect" fillColor="#ff000000">
       <relation target="" sidePair="center-center,middle-middle"/>
       <relation target="" sidePair="center-center,middle-middle"/>
     </graph>
     </graph>
     <component id="n2_im8n" name="n2" src="im8nv59h" fileName="UISecretary/UIFuli/component/Component_fl_1.xml" xy="183,0"/>
     <component id="n2_im8n" name="n2" src="im8nv59h" fileName="UISecretary/UIFuli/component/Component_fl_1.xml" xy="183,0"/>

+ 1 - 1
art/fgui/assets/game/UISecretary/UIFuli/UIFuli2.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1700,750" designImageLayer="1">
 <component size="1700,750" designImageLayer="1">
   <displayList>
   <displayList>
-    <graph id="n1_im8n" name="n1" xy="0,0" size="1700,750" alpha="0.8" type="rect" fillColor="#ff000000">
+    <graph id="n1_im8n" name="n1" xy="0,0" size="1700,750" alpha="0.6" type="rect" fillColor="#ff000000">
       <relation target="" sidePair="center-center,middle-middle"/>
       <relation target="" sidePair="center-center,middle-middle"/>
     </graph>
     </graph>
     <component id="n0_im8n" name="n2" src="im8nv59n" fileName="UISecretary/UIFuli/component/Component_fl_2.xml" xy="183,0"/>
     <component id="n0_im8n" name="n2" src="im8nv59n" fileName="UISecretary/UIFuli/component/Component_fl_2.xml" xy="183,0"/>

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


File diff suppressed because it is too large
+ 422 - 358
client/laya/bin/js/bundle.js


File diff suppressed because it is too large
+ 0 - 0
client/laya/bin/js/bundle.js.map


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

@@ -50,7 +50,7 @@ export class HttpMgr {
     }
     }
 
 
 
 
-    private isDev: boolean = true;//是否是开发环境
+    private isDev: boolean = false;//是否是开发环境
     public getReqData() {
     public getReqData() {
         let reqData = JSON.stringify({
         let reqData = JSON.stringify({
             gameName: "TQ",
             gameName: "TQ",

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

@@ -3,6 +3,9 @@ import { xGame } from "../xGame";
 import { GameData, ItemData, UserData, Diy2025GameData } from "./Data"
 import { GameData, ItemData, UserData, Diy2025GameData } from "./Data"
 import { LocalStorageManager } from "../utils/LocalStorageManager";
 import { LocalStorageManager } from "../utils/LocalStorageManager";
 import UIMsg from "../ui/UIMsg";
 import UIMsg from "../ui/UIMsg";
+
+import UIFuli1 from "../ui/UIFuli1";
+import UIFuli2 from "../ui/UIFuli2";
 //import { LocalStorageManager } from "../utils/LocalStorageManager";
 //import { LocalStorageManager } from "../utils/LocalStorageManager";
 
 
 export default class DataMgr {
 export default class DataMgr {
@@ -308,6 +311,17 @@ export default class DataMgr {
         }
         }
         //
         //
         this.saveUserData();
         this.saveUserData();
+
+        console.log("zh:大技能更新");
+        this.updateUserInfo2Server("bigSkills");
+
+    }
+
+    public static setBigSkillFormServer(jsonStr: string) {
+        console.log("zh:大技能 setBigSkillFormServer  ="+jsonStr);
+        this.userData.bigSkills =JSON.parse(jsonStr);
+        this.saveUserData();
+
     }
     }
     public static coinEnough(need: number): boolean {
     public static coinEnough(need: number): boolean {
         if (typeof need != "number") {
         if (typeof need != "number") {
@@ -676,6 +690,8 @@ export default class DataMgr {
         xGame.eventMgr.event(POWER_CHANGE, val);
         xGame.eventMgr.event(POWER_CHANGE, val);
         //
         //
         this.saveUserData();
         this.saveUserData();
+
+        this.updateUserInfo2Server("power");
     }
     }
     public static getPower() {
     public static getPower() {
         return this.userData.power;
         return this.userData.power;
@@ -781,7 +797,7 @@ export default class DataMgr {
 
 
     /**
     /**
      * 保存用户信息到服务器
      * 保存用户信息到服务器
-     * @param type 更新数据的类型  zs ,jb   
+     * @param type 更新数据的类型  zs ,jb   ,power
      * @param count 数量
      * @param count 数量
      */
      */
     public static updateUserInfo2Server(type: string, count: number = 0) {
     public static updateUserInfo2Server(type: string, count: number = 0) {
@@ -794,6 +810,7 @@ export default class DataMgr {
         let reqData = xGame.httpMgr.getReqData();
         let reqData = xGame.httpMgr.getReqData();
         let rd: any = JSON.parse(reqData);
         let rd: any = JSON.parse(reqData);
         rd.dataType = type;
         rd.dataType = type;
+
         let dataValue = 0;
         let dataValue = 0;
         if (type == "zs") {//钻石
         if (type == "zs") {//钻石
             dataValue = this.getDiamond();
             dataValue = this.getDiamond();
@@ -801,7 +818,18 @@ export default class DataMgr {
         if (type == "jb") {//金币
         if (type == "jb") {//金币
             dataValue = this.getCoin();
             dataValue = this.getCoin();
         }
         }
+        if (type == "power") {//体力
+            dataValue = this.getPower();
+        }
         rd.dataValue = dataValue;
         rd.dataValue = dataValue;
+        if (type == "bigSkills") {//干法模式的信息
+            let dataValueStr = this.userData.bigSkills
+            let dvsJson = JSON.parse("[" + dataValueStr + "]");
+            //// console.log('zh:dataValueStr=' + dvsJson)
+            rd.dataValueStr = JSON.stringify(dvsJson);
+        }
+
+
         reqData = JSON.stringify(rd);
         reqData = JSON.stringify(rd);
         xGame.httpMgr.sendPost2025('user/update', reqData, (res) => {
         xGame.httpMgr.sendPost2025('user/update', reqData, (res) => {
             try {
             try {
@@ -850,7 +878,7 @@ export default class DataMgr {
         let reqData = xGame.httpMgr.getReqData();
         let reqData = xGame.httpMgr.getReqData();
         xGame.httpMgr.sendPost2025('user/getUserGameInfo', reqData, (res) => {
         xGame.httpMgr.sendPost2025('user/getUserGameInfo', reqData, (res) => {
             try {
             try {
-                // console.log('zh:buySp res = ' + JSON.stringify(res))
+                console.log('zh:buySp res = ' + JSON.stringify(res))
                 let code = res.code;
                 let code = res.code;
                 let msg = res.msg;
                 let msg = res.msg;
                 if (code == 401) {
                 if (code == 401) {
@@ -867,6 +895,8 @@ export default class DataMgr {
                     let haveQiuGanJson = d.haveQiuGanJson;
                     let haveQiuGanJson = d.haveQiuGanJson;
                     let signData = d.signData;
                     let signData = d.signData;
                     let placeBallData = d.placeBallData;
                     let placeBallData = d.placeBallData;
+                    let bigSkills = d.bigSkills;
+
                     DataMgr.setDiamondFormServer(zuanShi);
                     DataMgr.setDiamondFormServer(zuanShi);
                     DataMgr.setCoinFormServer(jinBi);
                     DataMgr.setCoinFormServer(jinBi);
                     // console.log('zh:更新球杆信息')
                     // console.log('zh:更新球杆信息')
@@ -876,6 +906,7 @@ export default class DataMgr {
                     if (signData && signData > 0) {
                     if (signData && signData > 0) {
                         DataMgr.setSignData(signData);
                         DataMgr.setSignData(signData);
                     }
                     }
+                    DataMgr.setBigSkillFormServer(bigSkills);
 
 
                 } else {
                 } else {
                     console.log("zh:更新用户资产信息error" + msg);
                     console.log("zh:更新用户资产信息error" + msg);
@@ -974,4 +1005,76 @@ export default class DataMgr {
 
 
 
 
 
 
+    /**
+     * 自动检测是否需要福利弹窗
+     * 
+     * @param spid  商品ID ,于数据库里的一致
+     * @returns 
+     */
+    public static checkForShowFuLi17AndAlert(alert_spid: number) {
+        let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
+        if (userInfo == null) {
+            if (alert_spid === 1) {
+                xGame.uiMgr.Show(UIFuli1);
+            } if (alert_spid === 7) {
+                xGame.uiMgr.Show(UIFuli2);
+            }
+            return;
+        }
+        console.log('zh:是否需要展示福利 ' + alert_spid + ' 的弹窗');
+        let reqData = xGame.httpMgr.getReqData();
+        let pd: any = JSON.parse(reqData);
+        pd.productId = alert_spid;
+        reqData = JSON.stringify(pd);
+        xGame.httpMgr.sendPost2025('order/getOrderForBuyFuLiSpid17', reqData, (res) => {
+            try {
+                let code = res.code;
+                let msg = res.msg;
+                if (code == 401) {
+                    Laya.LocalStorage.removeItem(keyForLoginInfo);
+                    xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
+                    return;
+                }
+                if (code == 200) {
+                    let data = res.data;
+                    //data 示例数据  {"msg":"操作成功","code":200,"data":[{"orderId":51,"userId":112,"spid":1,"ggSpid":"com.v.pack","ggOrderId":"DEBUG-xxxxxxxxx","spsl":1,"ddjg":4.99,"ddzt":"1","delFlag":"0"},{"orderId":52,"userId":112,"spid":7,"ggSpid":"com.vadxxxxxxx","ggOrderId":"DEBUG-fffffff","spsl":1,"ddjg":14.99,"ddzt":"1","delFlag":"0"}]}
+                    let buyOkSpid: number[] = [];
+                    for (let i = 0; i < data.length; i++) {
+                        let item = data[i];
+                        let temp_spid = item.spid;//这里只要查出来就是已经购买的
+                        DataMgr.updateLocalUserDataForSpid17(temp_spid, true);
+                        buyOkSpid.push(temp_spid);
+                    }
+                    let isBuyOk7 = buyOkSpid.indexOf(7) >= 0 ? true : false;
+                    if (isBuyOk7) {   //如果购买了SPID = 7的则不现实任何福利弹窗
+                        return;
+                    }
+                    let isBuyOk = buyOkSpid.indexOf(alert_spid) >= 0 ? true : false;
+                    if (isBuyOk && alert_spid === 1) {
+                        return;
+                    } else {
+                        if (isBuyOk === false) {//如果没有
+                            if (alert_spid === 1) {
+                                xGame.uiMgr.Show(UIFuli1);
+                            } if (alert_spid === 7) {
+                                xGame.uiMgr.Show(UIFuli2);
+                            }
+                        } else {
+                            console.log('zh:已经购买了SPID=' + alert_spid + ',不需要再提示用户了')
+                        }
+                    }
+                } else {
+                    xGame.uiMgr.Show(UIMsg, msg);
+                }
+            } catch (error) {
+                console.log('error=' + error);
+                alert(error);
+            } finally {
+
+            }
+        });
+    }
+
+
+
 }
 }

+ 11 - 5
client/laya/src/ui/UIDraw.ts

@@ -119,8 +119,10 @@ export default class UIDraw extends UIBase {
     }
     }
     //看视频开启转盘
     //看视频开启转盘
     startDraw() {
     startDraw() {
+        console.log('zh:开始抽奖')
         let freeTimes = DataMgr.getDailyfreeDrawTimes();
         let freeTimes = DataMgr.getDailyfreeDrawTimes();
         if (freeTimes > 0) {
         if (freeTimes > 0) {
+            console.log('zh:freeTimes=' + freeTimes)
             this.beginDraw();
             this.beginDraw();
             DataMgr.setDailyfreeDrawTimes(0);
             DataMgr.setDailyfreeDrawTimes(0);
             this.checkFree();
             this.checkFree();
@@ -133,13 +135,16 @@ export default class UIDraw extends UIBase {
                     JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
                     JSBridgeUtils.instance.showToast2("Network error, reward unavailable");
                     return;
                     return;
                 }
                 }
-            }
-            if (JSBridgeUtils.instance.showRewardAd('qjff_chouJiang')) {
+                if (JSBridgeUtils.instance.showRewardAd('qjff_chouJiang')) {
 
 
+                } else {
+                    console.log('zh:AD 失败,直接发放奖励')
+                    this.qjff_chouJiang();
+                }
             } else {
             } else {
-                console.log('zh:AD 失败,直接发放奖励')
                 this.qjff_chouJiang();
                 this.qjff_chouJiang();
             }
             }
+
             // Moyu.sendDataEvent("turntable");
             // Moyu.sendDataEvent("turntable");
             // Moyu.showVideoAd(() => {
             // Moyu.showVideoAd(() => {
             //     this.beginDraw();
             //     this.beginDraw();
@@ -152,17 +157,18 @@ export default class UIDraw extends UIBase {
     }
     }
 
 
     beginDraw() {
     beginDraw() {
+
         this.ui.myNode.flashNode.c1.selectedIndex = 0;
         this.ui.myNode.flashNode.c1.selectedIndex = 0;
         this.ui.drawBtn.touchable = false;
         this.ui.drawBtn.touchable = false;
         this.curKey = this.getCurkey();
         this.curKey = this.getCurkey();
-        console.log("当前key", this.curKey);
+        console.log("zh:当前key", this.curKey);
         let cell = 60;
         let cell = 60;
         let lap = 3;
         let lap = 3;
         let angle = cell * (this.curKey - 1) + lap * 360 //- Math.floor(cell * Math.random());
         let angle = cell * (this.curKey - 1) + lap * 360 //- Math.floor(cell * Math.random());
         let target = this.ui.myNode.rotNode;
         let target = this.ui.myNode.rotNode;
         target.rotation = 0;
         target.rotation = 0;
         Laya.Tween.to(target, { rotation: angle }, 1500, Laya.Ease.cubicOut, Laya.Handler.create(this, () => {
         Laya.Tween.to(target, { rotation: angle }, 1500, Laya.Ease.cubicOut, Laya.Handler.create(this, () => {
-            console.log("旋转完成");
+            console.log("zh:旋转完成");
             this.ui.drawBtn.touchable = true;
             this.ui.drawBtn.touchable = true;
             this.getAward();
             this.getAward();
 
 

+ 3 - 3
client/laya/src/ui/UIGame.ts

@@ -86,10 +86,10 @@ export class UIGame extends UIBase {
         xGame.common.talkMgr = new TalkMgr();
         xGame.common.talkMgr = new TalkMgr();
         //
         //
         xGame.common.classicEmotionSpine = new SpineMgr("yxz_bqwz", () => {
         xGame.common.classicEmotionSpine = new SpineMgr("yxz_bqwz", () => {
-           // console.log("加载经典模式表情文件chenggon !");
+            // console.log("加载经典模式表情文件chenggon !");
         });
         });
         xGame.common.awardSpine = new SpineMgr("jinbi", () => {
         xGame.common.awardSpine = new SpineMgr("jinbi", () => {
-           // console.log("挑战模式奖励模式spine加载成功!");
+            // console.log("挑战模式奖励模式spine加载成功!");
 
 
         })
         })
         //
         //
@@ -173,7 +173,7 @@ export class UIGame extends UIBase {
     }
     }
     public show(): void {
     public show(): void {
         super.show();
         super.show();
-       // console.log("zh:uigame show AADD");
+        // console.log("zh:uigame show AADD");
         this.ui.alpha = 0;
         this.ui.alpha = 0;
         this.updateSelf();
         this.updateSelf();
         //
         //

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

@@ -459,7 +459,6 @@ export default class UIGameEnd extends UIBase {
 
 
             this.diyGameDataUtilForGameWin();
             this.diyGameDataUtilForGameWin();
             this.updateGamePlaceBallData2Server();
             this.updateGamePlaceBallData2Server();
-            
 
 
         }
         }
         else {
         else {
@@ -470,6 +469,18 @@ export default class UIGameEnd extends UIBase {
             xGame.soundMgr.playSound("s_lose");
             xGame.soundMgr.playSound("s_lose");
             xGame.common.showGirlTalkPop(9, this.ui.talkNode, this.ui.talkNode.womanTxt);
             xGame.common.showGirlTalkPop(9, this.ui.talkNode, this.ui.talkNode.womanTxt);
         }
         }
+
+        console.log('zh:开始弹出福利框2个')
+        Laya.timer.once(1000, this, () => {
+            console.log('zh: 1秒后  showFuLiSp1')
+            DataMgr.checkForShowFuLi17AndAlert(1)
+        })
+        // Laya.timer.once(2000, this, () => {
+        //     console.log('zh: 2秒后  showFuLiSp7')
+        //     DataMgr.checkForShowFuLi17AndAlert(7)
+        // })
+
+
         //if (!Moyu.isLegal) PlatMgr.showBanner(true);
         //if (!Moyu.isLegal) PlatMgr.showBanner(true);
         //////
         //////
         let challengeNum = DataMgr.getChallengeTimes();
         let challengeNum = DataMgr.getChallengeTimes();
@@ -482,7 +493,7 @@ export default class UIGameEnd extends UIBase {
 
 
         }
         }
 
 
-         this.setGlobalFont(this.ui)
+        this.setGlobalFont(this.ui)
     }
     }
 
 
 
 
@@ -529,7 +540,7 @@ export default class UIGameEnd extends UIBase {
         // let data = cfgTable.placeballData[level].award;
         // let data = cfgTable.placeballData[level].award;
 
 
         let pbdObj = DataMgr.getPlaceBallLevelList();
         let pbdObj = DataMgr.getPlaceBallLevelList();
-       // console.log("zh:pbdObj", pbdObj)
+        // console.log("zh:pbdObj", pbdObj)
         let reqData = xGame.httpMgr.getReqData();
         let reqData = xGame.httpMgr.getReqData();
         let pd: any = JSON.parse(reqData);
         let pd: any = JSON.parse(reqData);
         pd.placeBallData = JSON.stringify(pbdObj);
         pd.placeBallData = JSON.stringify(pbdObj);

+ 19 - 9
client/laya/src/ui/UILevelProp.ts

@@ -49,12 +49,13 @@ export default class UILevelProp extends UIBase {
         this.ui = ui_UILevelProp.createInstance();
         this.ui = ui_UILevelProp.createInstance();
         this.contentPane = this.ui;
         this.contentPane = this.ui;
         this.isEject = false;
         this.isEject = false;
-        this.addUIClick(this.ui.closeBtn, this.hide);
+        this.addUIClick(this.ui.closeBtn, this.hideWin);
         this.moneyNode = new MoneyNode(this.ui.moneyNode);
         this.moneyNode = new MoneyNode(this.ui.moneyNode);
         this.addUIClick(this.ui.myNode.startBtn, this.startGame);
         this.addUIClick(this.ui.myNode.startBtn, this.startGame);
 
 
     }
     }
     public show(level): void {
     public show(level): void {
+        console.log('zh:show.')
         super.show();
         super.show();
         this.ui.t1.play();
         this.ui.t1.play();
         //
         //
@@ -151,11 +152,12 @@ export default class UILevelProp extends UIBase {
     }
     }
     startGame() {
     startGame() {
         //let needCoin = xGame.common.enterPlaceBallNeedCoin;
         //let needCoin = xGame.common.enterPlaceBallNeedCoin;
+        console.log("zh:startGame");
         if (DataMgr.powerEnough()) {
         if (DataMgr.powerEnough()) {
             console.log('zh:powerEnough =' + DataMgr.powerEnough());
             console.log('zh:powerEnough =' + DataMgr.powerEnough());
             this.ui.myNode.startBtn.touchable = false;
             this.ui.myNode.startBtn.touchable = false;
             this.ui.myNode.startBtn.powerEft.t0.play(Laya.Handler.create(this, () => {
             this.ui.myNode.startBtn.powerEft.t0.play(Laya.Handler.create(this, () => {
-                console.log('zh:startGame ')
+                console.log('zh:startGame dh ')
                 //
                 //
                 this.ui.myNode.startBtn.touchable = true;
                 this.ui.myNode.startBtn.touchable = true;
                 DataMgr.setPower(-1);
                 DataMgr.setPower(-1);
@@ -165,17 +167,16 @@ export default class UILevelProp extends UIBase {
                 xGame.common.placeBallCurLevel = this.level;
                 xGame.common.placeBallCurLevel = this.level;
                 xGame.uiMgr.Show(UIGame);
                 xGame.uiMgr.Show(UIGame);
 
 
-                this.logEventForChallenge_level_start(this.level);
-
-
-                //
                 //关闭选择关卡界面和主界面
                 //关闭选择关卡界面和主界面
                 xGame.uiMgr.Hide(UILevelDisplay);
                 xGame.uiMgr.Hide(UILevelDisplay);
                 xGame.uiMgr.Hide(UIMain);
                 xGame.uiMgr.Hide(UIMain);
-                this.hide();
+
+                this.logEventForChallenge_level_start(this.level);
+                this.hideWin();
                 //
                 //
             }))
             }))
             //
             //
+            console.log('zh:eeeee')
         }
         }
         else {
         else {
             console.log('zh:powerEnough 不足 =' + DataMgr.powerEnough());
             console.log('zh:powerEnough 不足 =' + DataMgr.powerEnough());
@@ -213,10 +214,19 @@ export default class UILevelProp extends UIBase {
         JSBridgeUtils.instance.logEventForAdHaveParams('challenge_level_start', reqStr);
         JSBridgeUtils.instance.logEventForAdHaveParams('challenge_level_start', reqStr);
     }
     }
 
 
-    public hide() {
+    
+    public hideWin() {
         super.hide();
         super.hide();
+        // 重置start按钮状态
+        if (this.ui.myNode.startBtn) {
+            this.ui.myNode.startBtn.touchable = true;
+            // 停止可能正在播放的动画
+            if (this.ui.myNode.startBtn.powerEft.t0) {
+                this.ui.myNode.startBtn.powerEft.t0.stop();
+            }
+        }
     }
     }
 
 
 
 
 }
 }
-UILevelProp.uiName = "UILevelProp";
+UILevelProp.uiName = "UILevelProp"; 

+ 58 - 131
client/laya/src/ui/UIMain.ts

@@ -1,6 +1,6 @@
 import SpineMgr from "../core/mgrs/SpineMgr";
 import SpineMgr from "../core/mgrs/SpineMgr";
 import DataMgr from "../data/DataMgr";
 import DataMgr from "../data/DataMgr";
-import { CHANGE_SECRETARY, GameMode, GET_USER_INFO, RESTART_GAME, keyForLoginInfo, TIP_MSG_key, LOGIN_OUT, LOGIN_IN } from "../data/Define";
+import { CHANGE_SECRETARY, GameMode, GET_USER_INFO, RESTART_GAME, keyForLoginInfo, TIP_MSG_key, LOGIN_OUT, LOGIN_IN, TipsType } from "../data/Define";
 import UIBase from "../fgui/core/UIBase";
 import UIBase from "../fgui/core/UIBase";
 import ui_UIMain from "../fgui/res/game/ui_UIMain";
 import ui_UIMain from "../fgui/res/game/ui_UIMain";
 import PlatMgr from "../game/PlatMgr";
 import PlatMgr from "../game/PlatMgr";
@@ -37,7 +37,7 @@ import UIAddCoin from "./UIAddCoin";
 import { NoInternetDialog } from "./NoInternetDialog";
 import { NoInternetDialog } from "./NoInternetDialog";
 //import NetCheckTool from "../utils/NetCheckTool";
 //import NetCheckTool from "../utils/NetCheckTool";
 import { LocalStorageManager } from "../utils/LocalStorageManager";
 import { LocalStorageManager } from "../utils/LocalStorageManager";
-
+import UITips from "../ui/UITips";
 
 
 
 
 export default class UIMain extends UIBase {
 export default class UIMain extends UIBase {
@@ -226,6 +226,9 @@ export default class UIMain extends UIBase {
         DataMgr.setPlaceBallLevelList("");
         DataMgr.setPlaceBallLevelList("");
         DataMgr.setChallengeMode_overLev(1);
         DataMgr.setChallengeMode_overLev(1);
         this.setDefaultSignData();
         this.setDefaultSignData();
+        DataMgr.setBigSkillFormServer('[1, 1, 1, 1, 1]');//初始值
+
+
     }
     }
     /**
     /**
      *  默认签到数据
      *  默认签到数据
@@ -280,124 +283,14 @@ export default class UIMain extends UIBase {
     }
     }
     showFuLiSp1() {
     showFuLiSp1() {
         console.log('zh:福利1');
         console.log('zh:福利1');
-        this.checkForShowFuLi17(1);
+        DataMgr.checkForShowFuLi17AndAlert(1)
     }
     }
     showFuLiSp7() {
     showFuLiSp7() {
         console.log('zh:福利7');
         console.log('zh:福利7');
-        this.checkForShowFuLi17(7);
+        DataMgr.checkForShowFuLi17AndAlert(7)
     }
     }
 
 
 
 
-    /**
-     * 
-     * @param spid  商品ID ,于数据库里的一致
-     * @returns 
-     */
-    checkForShowFuLi17(alert_spid: number) {
-        let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
-        if (userInfo == null) {
-            if (alert_spid === 1) {
-                xGame.uiMgr.Show(UIFuli1);
-            } if (alert_spid === 7) {
-                xGame.uiMgr.Show(UIFuli2);
-            }
-            return;
-        }
-        console.log('zh:是否需要展示福利 ' + alert_spid + ' 的弹窗');
-        let reqData = xGame.httpMgr.getReqData();
-        let pd: any = JSON.parse(reqData);
-        pd.productId = alert_spid;
-        reqData = JSON.stringify(pd);
-        xGame.httpMgr.sendPost2025('order/getOrderForBuyFuLiSpid17', reqData, (res) => {
-            try {
-
-                let code = res.code;
-                let msg = res.msg;
-                if (code == 401) {
-                    Laya.LocalStorage.removeItem(keyForLoginInfo);
-                    xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
-                    return;
-                }
-                if (code == 200) {
-                    let data = res.data;
-                    //data 示例数据  {"msg":"操作成功","code":200,"data":[{"createBy":"","createTime":"2025-07-22 18:02:11","updateBy":"","updateTime":null,"remark":null,"orderId":51,"userId":112,"spid":1,"ggSpid":"com.vadltq.strike.ball.cue.noads.pack","ggOrderId":"DEBUG-NO202507221801566770","spsl":1,"ddjg":4.99,"ddzt":"1","delFlag":"0"},{"createBy":"","createTime":"2025-07-22 18:27:52","updateBy":"","updateTime":null,"remark":null,"orderId":52,"userId":112,"spid":7,"ggSpid":"com.vadltq.strike.ball.cue.passcard","ggOrderId":"DEBUG-NO202507221827494178","spsl":1,"ddjg":14.99,"ddzt":"1","delFlag":"0"}]}
-                    let buyOkSpid: number[] = [];
-                    for (let i = 0; i < data.length; i++) {
-                        let item = data[i];
-                        let temp_spid = item.spid;//这里只要查出来就是已经购买的
-                        DataMgr.updateLocalUserDataForSpid17(temp_spid, true);
-                        buyOkSpid.push(temp_spid);
-                    }
-                    let isBuyOk7 = buyOkSpid.indexOf(7) >= 0 ? true : false;
-                    if (isBuyOk7) {   //如果购买了SPID = 7的则不现实任何福利弹窗
-                        return;
-                    }
-                    let isBuyOk = buyOkSpid.indexOf(alert_spid) >= 0 ? true : false;
-                    if (isBuyOk && alert_spid === 1) {
-                        return;
-                    } else {
-                        if (isBuyOk === false) {//如果没有
-                            if (alert_spid === 1) {
-                                xGame.uiMgr.Show(UIFuli1);
-                            } if (alert_spid === 7) {
-                                xGame.uiMgr.Show(UIFuli2);
-                            }
-                        } else {
-                            console.log('zh:已经购买了SPID=' + alert_spid + ',不需要再提示用户了')
-                        }
-                    }
-                } else {
-                    xGame.uiMgr.Show(UIMsg, msg);
-                }
-            } catch (error) {
-                console.log('error=' + error);
-                alert(error);
-            } finally {
-
-            }
-        });
-
-
-
-        // xGame.httpMgr.sendPost2025('order/checkBuyFuLi', reqData, (res) => {
-        //     try {
-        //         console.log('zh:checkForShowFuLi17 res = ' + JSON.stringify(res))
-        //         let code = res.code;
-        //         let msg = res.msg;
-        //         if (code == 401) {
-        //             Laya.LocalStorage.removeItem(keyForLoginInfo);
-        //             xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
-        //             return;
-        //         }
-        //         if (code == 200) {//{"msg":"Please do not repeat the purchase.","code":200,"data":0}
-        //             let isBuyOk = res.data;//true 表示已经购买
-        //             DataMgr.updateLocalUserDataForSpid17(spid, isBuyOk);
-        //             if (isBuyOk === false) {
-        //                 if (spid === 1) {
-        //                     xGame.uiMgr.Show(UIFuli1);
-        //                 } if (spid === 7) {
-        //                     xGame.uiMgr.Show(UIFuli2);
-        //                 }
-        //             } else {
-        //                 console.log('zh:已经购买了SPID=' + spid + ',不需要再提示用户了')
-        //             }
-        //         } else {
-        //             xGame.uiMgr.Show(UIMsg, msg);
-        //         }
-        //     } catch (error) {
-        //         console.log('error=' + error);
-        //         alert(error);
-        //     } finally {
-
-        //     }
-        // });
-    }
-
-
-
-
-
-
     /**
     /**
      * 登录注册退出
      * 登录注册退出
      */
      */
@@ -458,6 +351,9 @@ export default class UIMain extends UIBase {
         this.addUIClick(this.ui.drawBtn, this.openDrawView);
         this.addUIClick(this.ui.drawBtn, this.openDrawView);
         this.addUIClick(this.ui.rankBtn, this.openRanking);
         this.addUIClick(this.ui.rankBtn, this.openRanking);
 
 
+        //那個小手
+        this.addUIClick(this.ui.n73,this.startGame, [GameMode.bigMove]);
+
         //退出登录
         //退出登录
         this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
         this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
         // this.addUIClick(this.ui.n_fuli, this.showFuLiSp7);
         // this.addUIClick(this.ui.n_fuli, this.showFuLiSp7);
@@ -525,20 +421,42 @@ export default class UIMain extends UIBase {
                 // xGame.common.autoPopUIView();
                 // xGame.common.autoPopUIView();
             })
             })
 
 
-            Laya.timer.once(1000, this, () => {
-                console.log('zh: 1秒后  showFuLiSp1')
-                this.showFuLiSp1();
-            })
+            // Laya.timer.once(1000, this, () => {
+            //     console.log('zh: 1秒后  showFuLiSp1')
+            //     this.showFuLiSp1();
+            // })
 
 
 
 
-            Laya.timer.once(10000, this, () => {
-                console.log('zh: 10秒后  showFuLiSp1')
+            Laya.timer.once(1000, this, () => {
+                console.log('zh: 1秒后  showFuLiSp7')
                 this.showFuLiSp7();
                 this.showFuLiSp7();
             })
             })
+
+            //引导登录
+            this.showTipForGuest();
         }
         }
 
 
         this.setGlobalFont(this.ui)
         this.setGlobalFont(this.ui)
     }
     }
+
+
+    showTipForGuest() {
+        let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
+        if (userInfo == null) {
+            console.log('zh: 游客模式下数据可能丢失,建议登录账号')
+            //游客模式下数据可能丢失,建议登录账号
+            //JSBridgeUtils.instance.showToast2('Data may be lost in guest mode. Logging in is recommended.');
+
+
+            let tips = "Data may be lost in guest mode. Logging in is recommended."
+            let woman = "this is an important notice."
+            xGame.uiMgr.Show(UITips, tips, woman, TipsType.foul);
+
+
+            return;
+        }
+    }
+
     checkActive(show) {
     checkActive(show) {
         //console.log("是否处于最外层",show);
         //console.log("是否处于最外层",show);
         //wx banner太大
         //wx banner太大
@@ -563,6 +481,7 @@ export default class UIMain extends UIBase {
         this.ui.secretaryGuide.visible = false;
         this.ui.secretaryGuide.visible = false;
         this.ui.enterGuide.visible = true;
         this.ui.enterGuide.visible = true;
         this.ui.wordsNode.t0.play();
         this.ui.wordsNode.t0.play();
+        
         //todo
         //todo
         if (DataMgr.getNewUser()) Moyu.sendDataEvent("gameReady");
         if (DataMgr.getNewUser()) Moyu.sendDataEvent("gameReady");
     }
     }
@@ -701,24 +620,32 @@ export default class UIMain extends UIBase {
         });
         });
     }
     }
 
 
+    private moni_click_count: number = 0;
+
 
 
     /**
     /**
      * 模拟支付OK
      * 模拟支付OK
      * @returns 
      * @returns 
      */
      */
     start_debug_for_moni_payOk() {
     start_debug_for_moni_payOk() {
-        console.log('zh:start_debug_for_moni_payOk')
-        let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
-        if (userInfo != null) {
-            let token = userInfo.token;
-            let ggSpid = 'com.vadltq.strike.ball.cue.gem50';
-            JSBridgeUtils.instance.testPay1ForMoNiPayOver(token, ggSpid, 1);
-            alert('模拟支付OK')
-
-            return;
-        } else {
-            xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
+        let ccc = this.moni_click_count + 1;
+        this.moni_click_count = ccc;
+
+        if (ccc % 5 == 0) {
+            console.log('zh:start_debug_for_moni_payOk')
+            let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
+            if (userInfo != null) {
+                let token = userInfo.token;
+                let ggSpid = 'com.vadltq.strike.ball.cue.gem50';
+                JSBridgeUtils.instance.testPay1ForMoNiPayOver(token, ggSpid, 1);
+                alert('模拟支付OK')
+
+                return;
+            } else {
+                xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
+            }
         }
         }
+
     }
     }
 
 
 
 

+ 9 - 2
client/laya/src/ui/UITips.ts

@@ -33,7 +33,12 @@ export default class UITips extends UIBase {
                 break;
                 break;
             case TipsType.foul:
             case TipsType.foul:
                 Laya.timer.once(200, this, () => {
                 Laya.timer.once(200, this, () => {
-                    xGame.common.gameMgr.gamePause = true;
+                    if (xGame.common.gameMgr) {
+                        xGame.common.gameMgr.gamePause = true;
+                    } else {
+                        console.log("zh:gameMgr is null");
+                    }
+                    // xGame.common.gameMgr.gamePause = true;
                 })
                 })
                 break;
                 break;
 
 
@@ -66,7 +71,9 @@ export default class UITips extends UIBase {
                 xGame.common.longHelpLine = false;
                 xGame.common.longHelpLine = false;
                 break;
                 break;
             case TipsType.foul:
             case TipsType.foul:
-                xGame.common.gameMgr.gamePause = false;
+                if (xGame.common.gameMgr) {
+                    xGame.common.gameMgr.gamePause = false;
+                }
                 Laya.timer.clearAll(this);
                 Laya.timer.clearAll(this);
                 break;
                 break;
 
 

+ 10 - 6
client/laya/src/ui/item/SkillDisplay.ts

@@ -73,7 +73,6 @@ export default class SkillDisplay {
         Moyu.sendDataEvent("UpSkill", { id: this.data.index });
         Moyu.sendDataEvent("UpSkill", { id: this.data.index });
 
 
 
 
-
         console.log('zh:qjff_AD_for_skilldisplay_clickAddLevel')
         console.log('zh:qjff_AD_for_skilldisplay_clickAddLevel')
         // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
         // GlobalManager.instance.registerMethod('xxxxx',this.xxxxx);
         // JSBridgeUtils.instance.showRewardAd('xxxxx');
         // JSBridgeUtils.instance.showRewardAd('xxxxx');
@@ -86,10 +85,15 @@ export default class SkillDisplay {
         //     this.qjff_AD_for_skilldisplay_clickAddLevel();
         //     this.qjff_AD_for_skilldisplay_clickAddLevel();
         // }
         // }
 
 
-        if (JSBridgeUtils.instance.showInternAd('qjff_AD_for_skilldisplay_clickAddLevel')) {
-            this.qjff_AD_for_skilldisplay_clickAddLevel();
+
+        if (Laya.Browser.onAndroid) {
+            if (JSBridgeUtils.instance.showInternAd('qjff_AD_for_skilldisplay_clickAddLevel')) {
+                this.qjff_AD_for_skilldisplay_clickAddLevel();
+            } else {
+                console.log('zh:AD 失败,直接发放奖励')
+                this.qjff_AD_for_skilldisplay_clickAddLevel();
+            }
         } else {
         } else {
-            console.log('zh:AD 失败,直接发放奖励')
             this.qjff_AD_for_skilldisplay_clickAddLevel();
             this.qjff_AD_for_skilldisplay_clickAddLevel();
         }
         }
 
 
@@ -166,7 +170,7 @@ export default class SkillDisplay {
      */
      */
     logEventForRod_start() {
     logEventForRod_start() {
         let gfmsIdx = xGame.common.curPlayerSkillType;
         let gfmsIdx = xGame.common.curPlayerSkillType;
-        console.log('zh:选择的技能='+gfmsIdx);
+        console.log('zh:选择的技能=' + gfmsIdx);
         let gfmc = 'Skyfall Shot';
         let gfmc = 'Skyfall Shot';
         if (gfmsIdx == 0) {
         if (gfmsIdx == 0) {
             gfmc = 'Skyfall Shot';
             gfmc = 'Skyfall Shot';
@@ -180,7 +184,7 @@ export default class SkillDisplay {
 
 
         //             // - 子模式名称
         //             // - 子模式名称
         // - 开始了几次rod模式  // {"name":"fall from the sky lv.1","count  ":"398"}
         // - 开始了几次rod模式  // {"name":"fall from the sky lv.1","count  ":"398"}
-        let keyStr = 'sjmd_rod_start_'+gfmsIdx;
+        let keyStr = 'sjmd_rod_start_' + gfmsIdx;
         let jsonStr = {
         let jsonStr = {
             "count": 0,
             "count": 0,
             "name": gfmc
             "name": gfmc

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

@@ -9,6 +9,7 @@
  * 
  * 
  * 
  * 
  */
  */
+import { GameData } from "../data/Data";
 import DataMgr from "../data/DataMgr";
 import DataMgr from "../data/DataMgr";
 import { keyForLoginInfo, TIP_MSG_key } from "../data/Define";
 import { keyForLoginInfo, TIP_MSG_key } from "../data/Define";
 import { LocalStorageManager } from "../utils/LocalStorageManager";
 import { LocalStorageManager } from "../utils/LocalStorageManager";
@@ -108,6 +109,11 @@ export default class JSBridgeUtils {
             if (result.code === 200) {
             if (result.code === 200) {
                 console.log("zh:showInternAd OK");
                 console.log("zh:showInternAd OK");
                 // 执行广告展示后的逻辑,例如记录日志、更新UI等
                 // 执行广告展示后的逻辑,例如记录日志、更新UI等
+
+
+              
+
+
                 return true;
                 return true;
             } else {
             } else {
                 console.warn("zh:showInternAd  FAILL:", result.msg);
                 console.warn("zh:showInternAd  FAILL:", result.msg);
@@ -302,14 +308,14 @@ export default class JSBridgeUtils {
      * @param msg 
      * @param msg 
      * @returns 
      * @returns 
      */
      */
-    showConfirmationDialogForExit(title:string,msg:string):void{
-         if (!Laya.Browser.onAndroid) {
+    showConfirmationDialogForExit(title: string, msg: string): void {
+        if (!Laya.Browser.onAndroid) {
             return;
             return;
         }
         }
         if (!this.initBridge()) {
         if (!this.initBridge()) {
             return;
             return;
         }
         }
-        this.bridge.call("showConfirmationDialogForExit", title,msg);
+        this.bridge.call("showConfirmationDialogForExit", title, msg);
     }
     }
     //------------------网络判断 end 
     //------------------网络判断 end 
 
 

Some files were not shown because too many files changed in this diff