wuwangdong 4 år sedan
förälder
incheckning
976f1352bd

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 658 - 176
assets/resources/game/prefab/game.prefab


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
assets/resources/module/login/hot/project.manifest


+ 16 - 2
assets/script/game/data/GameData.ts

@@ -1,4 +1,5 @@
 import Util from "../../before/util/Util";
+import LogUtil from "../../mk/utils/LogUtil";
 import FunBtns from "../game/FunBtns";
 import Game from "../game/Game";
 import { RateConfig } from "./AdData";
@@ -120,6 +121,8 @@ export class GameData {
     public orderAinFinishNum = 0;
 
     public welfareOpenLimit = 0;
+    
+    public showRichBankIconLimit = 0;
 
     //富翁银行登陆增加参数
     richBankAddLoginDays = 0;
@@ -207,6 +210,15 @@ export class GameData {
         gData.safeDepositBoxData.richBankConfig = this.configs.NewBankTask;
 
         gData.gameData.welfareOpenLimit = parseInt(this.configs.ServerConfig.welfareOpen);
+
+        gData.gameData.showRichBankIconLimit = parseInt(this.configs.ServerConfig.bankIcon);
+        
+        let logSwitch = parseInt(this.configs.ServerConfig.logSwitch);
+        if(logSwitch){
+            LogUtil.ifShowLog = true;
+        }else{
+            LogUtil.ifShowLog = false;
+        }
     }
 
     /**
@@ -279,8 +291,10 @@ export class GameData {
 
         //富翁银行
         gData.safeDepositBoxData.richBankCashAmount = res_data.richBankCashAmount;
-        gData.safeDepositBoxData.currentRichBankCashTaskIndex = res_data.currentRichBankCashTaskIndex;
-        console.log(`currentRichBankCashTaskIndex ======== ${res_data.currentRichBankCashTaskIndex}`);
+        if(res_data.currentRichBankCashTaskIndex){
+            gData.safeDepositBoxData.currentRichBankCashTaskIndex = res_data.currentRichBankCashTaskIndex;
+            console.log(`currentRichBankCashTaskIndex ======== ${res_data.currentRichBankCashTaskIndex}`);
+        }   
         //gData.safeDepositBoxData.addRichBankFinishIndex = res_data.addRichBankFinishIndex;
         // if (gData.safeDepositBoxData.currentRichBankCashTaskIndex > 0) {
         //     gData.safeDepositBoxData.addRichBankFinishIndex = gData.safeDepositBoxData.currentRichBankCashTaskIndex;

+ 2 - 1
assets/script/game/data/LoginData.ts

@@ -315,7 +315,8 @@ export class LoginData {
             "szlm_did": mk.shuzilmM.szlm_did,
             "black_box": mk.tongdunM.tdEquipID,
             "mac": gData.appData.machineInfo.mac,
-            "appVersion": gData.appData.appVersion
+            "appVersion": gData.appData.appVersion,
+            "tfChannel": gData.appData.tfChannel,
         };
 
         let data = {

+ 1 - 1
assets/script/game/data/module/SafeDepositBoxData.ts

@@ -13,7 +13,7 @@ export default class SafeDepositBoxData {
     /** 银行存入金额 */
     richBankCashAmount = 0
     /** 当前任务的id,也就是index字段 */
-    currentRichBankCashTaskIndex = 0
+    currentRichBankCashTaskIndex = null
 
     /** 开始银行任务后 每日观看的视频数 */
     richBankDailyVideoTimes = 0

+ 40 - 12
assets/script/game/game/FunBtns.ts

@@ -1,3 +1,5 @@
+import { GameProp } from "../data/GameData";
+
 const { ccclass, property } = cc._decorator;
 
 @ccclass
@@ -41,38 +43,64 @@ export default class FunBtns extends cc.Component {
             if (node_btn) {
                 node_btn.active = data[i] == "1";
                 //订单
-                if(i == 11 && data[i] == "0" )
-                {
+                if (i == 11 && data[i] == "0") {
                     this.btn5.y = this.btn5.y + 170;
                     this.addCount += 1;
-                }else if(i == 2 && data[i] == "0")
-                {
+                } else if (i == 2 && data[i] == "0") {
                     this.btn4.y = this.btn4.y + 170;
                 }
-                else if (i == 4 && data[i] == "0")
-                {
+                else if (i == 4 && data[i] == "0") {
                     this.addCount += 1;
                 }
+                else if (i == 13 && data[i] == "1") {
+                    let times = gData.gameData.getProp(GameProp.cashTimes);
+                    if (!times || times < gData.gameData.showRichBankIconLimit) {
+                        node_btn.active = false;
+                        mk.event.register("showRichBankIcon", this.showRichBankIcon.bind(this), this);
+                    }
+                }
             }
         }
 
         this.btn9.y = this.btn9.y + 130 * this.addCount;
 
-        if(this.btn8.active)
-        {
+        if (this.btn8.active) {
             let isShow = gData.gameData.playerProp.completeFarmTaskTimes >= parseInt(gData.gameData.configs.ServerConfig.FlyRedMoney);
             this.btn8.active = isShow;
 
-            if(!isShow)
-            {
+            if (!isShow) {
                 mk.event.register("refreshBubble", this.refreshStatus.bind(this), this);
             }
         }
     }
 
-    refreshStatus()
-    {
+    refreshStatus() {
         this.btn8.active = gData.gameData.playerProp.completeFarmTaskTimes >= parseInt(gData.gameData.configs.ServerConfig.FlyRedMoney);
     }
+
+    showRichBankIcon() {
+        this.btn14.active = true;
+        mk.event.remove("showRichBankIcon", this);
+
+        this.updateRichBankTaskIndex();
+    }
+
+    async updateRichBankTaskIndex() {
+        if (!gData.safeDepositBoxData.currentRichBankCashTaskIndex) {
+            let response = await mk.http.sendData('newrichbank/getRichBankInfo', {});
+            if (response && response.errcode == 0) {
+                let res_data = response.data;
+                gData.safeDepositBoxData.richBankCashAmount = res_data.richBankCashAmount;
+                gData.safeDepositBoxData.currentRichBankCashTaskIndex = res_data.currentRichBankCashTaskIndex;
+                gData.safeDepositBoxData.isStartBankTask = res_data.isStartRichBankTask;
+                gData.safeDepositBoxData.richBankDailyVideoTimes = res_data.richBankDailyVideoTimes;
+                gData.safeDepositBoxData.richbankLoginDays = res_data.richbankLoginDays;
+                gData.safeDepositBoxData.richBankDailyTotelVideoTimes = res_data.richBankDailyTotelVideoTimes;
+                gData.safeDepositBoxData.richBankTotelLoginDays = res_data.richBankTotelLoginDays;
+                console.log(`currentRichBankCashTaskIndex 11======== ${res_data.currentRichBankCashTaskIndex}`);
+                console.log(`richBankDailyTotelVideoTimes 11======== ${res_data.richBankDailyTotelVideoTimes}`);
+            }
+        }
+    }
 }
 

+ 48 - 41
assets/script/game/game/Game.ts

@@ -160,10 +160,9 @@ export default class Game extends cc.Component {
 
         this.initRefreshEvent();
 
-        if(gData.gameData.playerProp.orderData)
-        {
+        if (gData.gameData.playerProp.orderData) {
             this.initOrderUI();
-        }else{
+        } else {
             mk.event.register("initOrderUi", this.initOrderUI.bind(this), this);
         }
     }
@@ -200,7 +199,7 @@ export default class Game extends cc.Component {
             mk.data.sendDataEvent(DataEventId.loading, 'loading结束');
         }
 
-        setTimeout(()=>{
+        setTimeout(() => {
             gData.safeDepositBoxData.deleteJGTags();
         }, 1000)
     }
@@ -486,17 +485,16 @@ export default class Game extends cc.Component {
 
     /** 点击福利 */
     public onClickFuli() {
-        if(gData.gameData.playerProp.orderData && gData.gameData.playerProp.orderData.overTimes >= gData.gameData.welfareOpenLimit)
-        {
+        if (gData.gameData.playerProp.orderData && gData.gameData.playerProp.orderData.overTimes >= gData.gameData.welfareOpenLimit) {
             mk.ui.openPanel('module/blessingBag/blessingBag');
             mk.data.sendDataEvent(DataEventId.button_click, "福利icon");
 
             let isClickIcon = mk.storage.getStorage("clickBlessIcon")
-            if(!isClickIcon){
+            if (!isClickIcon) {
                 JsbSystem.addJGTags("点击过福利icon");
                 mk.storage.setStorage("clickBlessIcon", 1);
             }
-        }else{
+        } else {
             mk.tip.pop(`订单提现${gData.gameData.welfareOpenLimit}次后开启`);
         }
     }
@@ -1053,8 +1051,8 @@ export default class Game extends cc.Component {
                     this.node_getOrderReward.getComponent(cc.Animation).stop();
                     this.node_orderHand.active = false;
                 }
-            } 
-        } 
+            }
+        }
     }
 
     public clickGetOrderRewardBtn() {
@@ -1086,8 +1084,7 @@ export default class Game extends cc.Component {
         let data = {};
         let response = await mk.http.sendData('orderTask/receiveRewardCash', data);
         if (response.errcode != 0) {
-            if(response.errcode == 405)
-            {
+            if (response.errcode == 405) {
                 mk.tip.pop("今日提现额度已到上限,请明天再提现");
                 mk.data.sendDataEvent(DataEventId.cashLimit, "提现触发上限");
             }
@@ -1101,13 +1098,13 @@ export default class Game extends cc.Component {
         // gData.reward.adData = { videoRedMoney: { videoRewardList: null } };
         // gData.reward.adData.videoRedMoney.videoRewardList = [{ rewardType: 1, rewardNum: addMoney }]
         // mk.ui.openPanel('module/reward/reward');
-        
+
         //处理提现逻辑
         gData.cashPro.callBack = this.getRewardCallBack.bind(this);
         gData.receiptNotice.receip_rmb = addMoney;
         mk.ui.openPanel('module/newNotice/newNotice');
 
-        this.node_crop.forEach((v)=>{
+        this.node_crop.forEach((v) => {
             v.active = false;
         })
         this.node_orderHbIcon.active = false;
@@ -1116,22 +1113,19 @@ export default class Game extends cc.Component {
 
     //停止农民产红包币
     isStopFarm = false;
-    public getRewardCallBack()
-    {
+    public getRewardCallBack() {
         this.node_extraOrderUi.active = true;
         this.node_bgUi.scale = 0;
-        cc.tween(this.node_bgUi).to(0.4, {scale: 1.4}).start();
+        cc.tween(this.node_bgUi).to(0.4, { scale: 1.4 }).start();
 
-        if(gData.gameData.funOpenData[1] == '1')
-        {
+        if (gData.gameData.funOpenData[1] == '1') {
             gData.gameData.funOpenData[1] = "0";
             this.isStopFarm = true;
         }
     }
 
-    public showRefreshLogic()
-    {
-        this.node_crop.forEach((v)=>{
+    public showRefreshLogic() {
+        this.node_crop.forEach((v) => {
             v.active = true;
         })
         this.node_orderHbIcon.active = true;
@@ -1146,19 +1140,17 @@ export default class Game extends cc.Component {
         gData.safeDepositBoxData.updateQipao();
         gData.cashNormal.getRecord();
 
-        if(this.isStopFarm)
-        {
+        if (this.isStopFarm) {
             this.isStopFarm = false;
             gData.gameData.funOpenData[1] = '1';
         }
     }
 
-    showTips()
-    {
+    showTips() {
         mk.tip.pop("提现成功,订单已刷新");
     }
 
-    async doCropFlyLogic(plantId: number, farmNode: cc.Node = null, parentNode: cc.Node = null,isNzw = false) {
+    async doCropFlyLogic(plantId: number, farmNode: cc.Node = null, parentNode: cc.Node = null, isNzw = false) {
         if (gData.gameData.funOpenData[11] == "0" || !gData.gameData.playerProp.orderData) {
             return;
         }
@@ -1232,13 +1224,12 @@ export default class Game extends cc.Component {
                     mk.tip.pop("订单已完成,快提现吧!");
                 }
             }
-            if(parentNode)
-            {
+            if (parentNode) {
                 let pos = this.node_orderHb.parent.convertToWorldSpaceAR(this.node_orderHb.getPosition());
                 mk.fly.PlayCoinAnim(1, 5, parentNode, pos, () => {
                     //this.refreshOrderUI(index);
                 }, 0.8);
-            }else{
+            } else {
                 let pos = this.node_orderHb.parent.convertToWorldSpaceAR(this.node_orderHb.getPosition());
                 mk.fly.PlayCoinAnim(1, 5, this.btn_product, pos, () => {
                     //this.refreshOrderUI(index);
@@ -1257,8 +1248,7 @@ export default class Game extends cc.Component {
         }
     }
 
-    public refreshOrderUI(index)
-    {
+    public refreshOrderUI(index) {
         let orderData = gData.gameData.playerProp.orderData;
         let dataE = orderData.orderTaskList[index];
         if (dataE) {
@@ -1305,13 +1295,12 @@ export default class Game extends cc.Component {
             //     mk.guide.curDes = `<color=8A4312><color=ff0000>继续生产${leftTimes}次</c>,很快就\n可以完成订单了!</color>`;
             // }
         } else {
-            if(this.isGray)
-            {
+            if (this.isGray) {
                 mk.tip.pop("完成订单即可提现");
-            }else{
+            } else {
                 mk.tip.pop("订单已完成,快提现吧");
             }
-            
+
         }
 
     }
@@ -1356,14 +1345,32 @@ export default class Game extends cc.Component {
 
     //富翁银行
     /** 点击富翁银行 */
-    public onClickSafeDepositBox() {
-        mk.data.sendDataEvent(DataEventId.button_click, "富翁银行icon");
+    public async onClickSafeDepositBox() {
+        mk.audio.playEffect('button');
+        console.log(`currentRichBankCashTaskIndex 22======== ${gData.safeDepositBoxData.currentRichBankCashTaskIndex}`);
+        if (gData.safeDepositBoxData.currentRichBankCashTaskIndex) {
+            mk.ui.openPanel("module/safeDepositBox/SafeDepositBox");
+            mk.data.sendDataEvent(DataEventId.button_click, "富翁银行icon");
+        }
     }
 
-    public setJGTags(){
+    isAdd = true;
+    public setJGTags() {
         //JsbSystem.addJGTags("富翁银行任务");
-        let curDes = `<color=8A4312>再生产${23}次,就可以收获\n啦,完成订单立即<color=ff0000>提现</color>!</color>`;
-        mk.guide.open(11, curDes);
+        //let curDes = `<color=8A4312>再生产${23}次,就可以收获\n啦,完成订单立即<color=ff0000>提现</color>!</color>`;
+        //mk.guide.open(11, curDes);
+
+        if (this.isAdd) {
+            this.isAdd = false;
+            JsbSystem.addJGTags("开玩笑");
+        } else {
+            this.isAdd = true;
+            JsbSystem.deleteTags("开玩笑");
+        }
+    }
+
+    public getAllTags() {
+        JsbSystem.getAllTags();
     }
 }
 

+ 13 - 0
assets/script/game/module/newNotice/NewNotice.ts

@@ -1,3 +1,5 @@
+import { GameProp } from "../../data/GameData";
+
 const { ccclass, property } = cc._decorator;
 @ccclass
 export default class NewNotice extends cc.Component {
@@ -14,6 +16,17 @@ export default class NewNotice extends cc.Component {
 
     start() {
         //mk.audio.playEffect("receiptNotice");
+
+        let times = gData.gameData.getProp(GameProp.cashTimes);
+        if (!times) {
+            times = 0;
+        }
+        gData.gameData.setProp(GameProp.cashTimes, ++times);
+
+        times = gData.gameData.getProp(GameProp.cashTimes);
+        if(gData.gameData.showRichBankIconLimit == times && gData.gameData.funOpenData[13] == "1"){
+            mk.event.emit("showRichBankIcon");   
+        }
     }
 
     onEnable()

+ 1 - 1
assets/script/game/module/speedUpUI/ProductReward.ts

@@ -247,7 +247,7 @@ export default class ProductReward extends cc.Component {
     onDisable() {
         mk.ad.destroyNativeAd();  
     }
-
+    
     private clickCloseBtn() {
         mk.audio.playEffect("button");
         mk.ui.closePanel(this.node.name);

+ 1 - 1
assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATNative.ts

@@ -151,7 +151,7 @@ export class ATNative extends zgSingleton {
     /** 销毁baaner */
     destroyNative() {
         this.nativeAdState = NativeAdState.Close;
-
+        this.ifLoadShow = false;
         this.ATNativeJS.destroyNative();
 
         gData.warnTipData.getUserShutdownAds(() => {

+ 9 - 0
assets/script/mk/system/JsbSystem.ts

@@ -710,6 +710,15 @@ export default class JsbSystem {
             jsb.reflection.callStaticMethod("GameConfig", "deleteTags:", "");
         }
     }
+    
+    public static getAllTags(){
+        if (cc.sys.os == cc.sys.OS_ANDROID) {
+            jsb.reflection.callStaticMethod(this._JSB_ANDROID_PATH, "getAllTags", "()V");
+        }
+        else if (cc.sys.os == cc.sys.OS_IOS) {
+            jsb.reflection.callStaticMethod("GameConfig", "getAllTags:", "");
+        }
+    }
 
     /** app允许消息通知 */
     public static getNotificationEnabled(): boolean{

+ 6 - 6
assets/script/mk/utils/LogUtil.ts

@@ -9,7 +9,7 @@ export default class LogUtil {
      * 是否显示Log
      * @description
      */
-    public ifShowLog: boolean = false;
+    public static ifShowLog: boolean = true;
 
     /**
      * 标签符号
@@ -36,7 +36,7 @@ export default class LogUtil {
      * @param  data 日志内容
      */
     public log(tag: string, ...data: any[]) {
-        if (!this.ifShowLog) {
+        if (!LogUtil.ifShowLog) {
             return;
         }
         let totalTag = tag + this._tagChar;
@@ -50,7 +50,7 @@ export default class LogUtil {
      * @param  data 日志内容
      */
     public logWithColor(tag: string, ...data: any[]) {
-        if (!this.ifShowLog) {
+        if (!LogUtil.ifShowLog) {
             return;
         }
         let totalTag = tag + this._tagChar;
@@ -64,7 +64,7 @@ export default class LogUtil {
      * @param  data  日志内容
      */
     public warn(tag: string, ...data: any[]) {
-        if (!this.ifShowLog) {
+        if (!LogUtil.ifShowLog) {
             return;
         }
         let totalTag = tag + this._tagChar;
@@ -78,7 +78,7 @@ export default class LogUtil {
      * @param  data  日志内容
      */
     public error(tag: string, ...data: any[]) {
-        if (!this.ifShowLog) {
+        if (!LogUtil.ifShowLog) {
             return;
         }
         let totalTag = tag + this._tagChar;
@@ -98,7 +98,7 @@ export default class LogUtil {
             this.log(tag, obj);
             return;
         }
-        if (!this.ifShowLog) {
+        if (!LogUtil.ifShowLog) {
             return;
         }
 

BIN
build/jsb-link/assets/main/index.jsc


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
build/jsb-link/assets/resources/config.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
build/jsb-link/assets/resources/import/b4/b4dea4a9-29c8-46bc-a50d-5754afa7a2bd.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
build/jsb-link/assets/resources/native/a8/a81eb395-718d-4f3b-958c-cb871f7dd5fa.manifest


BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/caches/build_file_checksums.ser


+ 9 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/thirdSdk/ThirdSdkMgr.java

@@ -251,6 +251,9 @@ public class ThirdSdkMgr {
     }
 
     public static void updateSplashAdLog(final String placementId, final String callbackInfo){
+        if(ThirdSdkMgr.appActivity == null){
+            return;
+        }
         ThirdSdkMgr.appActivity.runOnGLThread(new Runnable() {
             @Override
             public void run() {
@@ -417,6 +420,12 @@ public class ThirdSdkMgr {
         JPushInterface.deleteTags(ThirdSdkMgr.appActivity, 1, hs);
     }
 
+    /** 获取极光tags
+     * */
+    public static void  getAllTags(){
+        JPushInterface.getAllTags(ThirdSdkMgr.appActivity, 1);
+    }
+
     /** 唤醒屏幕
      * */
     public  static void wakeUpScreen(){

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 333 - 147
build/jsb-link/js backups (useful for debugging)/main.index.js


+ 2 - 2
packages-hot-update/cfg.json

@@ -12,7 +12,7 @@
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsfTest/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kncdsf/baseRemote/"
     ],
-    "buildTime": 1638343543617,
-    "genTime": 1638343543617,
+    "buildTime": 1638427673681,
+    "genTime": 1638427673681,
     "genVersion": null
 }

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
packages-hot-update/manifest/project.manifest


BIN
packages-hot-update/versions/ver_1_0.9.zip


Vissa filer visades inte eftersom för många filer har ändrats