wuwangdong 4 lat temu
rodzic
commit
0fd325767c

+ 8 - 2
assets/script/game/data/AdData.ts

@@ -137,8 +137,7 @@ export class AdData {
             return;
         }
         let times = gData.gameData.getProp(GameProp.videoTimes);
-        if(!times)
-        {
+        if (!times) {
             times = 0;
         }
         gData.gameData.setProp(GameProp.videoTimes, ++times);
@@ -401,6 +400,13 @@ export class AdData {
 
         return per;
     }
+
+    savePreLoadEcpm(data) {
+        let times = gData.gameData.getProp(GameProp.videoTimes);
+        if (times <= 0) {
+            mk.http.sendData('user/savePreLoadEcpm', JSON.stringify(data));
+        }
+    }
 }
 
 /**

+ 16 - 0
assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATRewardVideo.ts

@@ -69,6 +69,10 @@ export class ATRewardVideo extends zgSingleton {
         this.ATRewardVideoJS.showAd();
     }
 
+    checkAdStatus() {
+        return this.ATRewardVideoJS.checkAdStatus();
+    }
+
     //广告回调部分------------------------------------------------------------------------
     /**
      * 激励视频加载完毕
@@ -81,6 +85,18 @@ export class ATRewardVideo extends zgSingleton {
             this.ifLoadShow = false;
             this.showAd();
         }
+
+        let adStatus = this.checkAdStatus()
+        console.log('savePreLoadEcpm  0000 ', typeof adStatus)
+        let json = JSON.parse(adStatus)
+        let adInfo = JSON.parse(json.adInfo)
+        let data = {
+            network_placement_id: adInfo.network_placement_id,
+            adsource_id: adInfo.adsource_id,
+            adsource_price: adInfo.adsource_price
+        }
+
+        gData.adData.savePreLoadEcpm(data);
     }
 
     /**

+ 5 - 0
assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATRewardVideoJS.js

@@ -42,6 +42,11 @@ var ATRewardVideoJS = cc.Class({
         return ATRewardedVideoJSSDK.hasAdReady(this.placementID()) ? true : false;
     },
 
+    checkAdStatus: function () {
+        if (this.proxy == null) return;
+        return ATRewardedVideoJSSDK.checkAdStatus(this.placementID());
+    },
+
     /** 
      * 激励视频加载完毕
      * @param {*} placementId 广告位id

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


Plik diff jest za duży
+ 0 - 0
build/jsb-link/assets/resources/config.json


+ 48 - 29
build/jsb-link/js backups (useful for debugging)/main.index.js

@@ -1730,6 +1730,9 @@ ATRewardedVideoJSSDK.showAdInScenario(this.placementID(), "");
 hasAdReady: function() {
 if (null != this.proxy) return !!ATRewardedVideoJSSDK.hasAdReady(this.placementID());
 },
+checkAdStatus: function() {
+if (null != this.proxy) return ATRewardedVideoJSSDK.checkAdStatus(this.placementID());
+},
 onRewardedVideoAdLoaded: function(t) {
 null != this.proxy && this.proxy.onRewardedVideoAdLoaded(t);
 },
@@ -1821,6 +1824,9 @@ this.ifLoadShow = !0;
 this.loadAd();
 }
 };
+e.prototype.checkAdStatus = function() {
+return this.ATRewardVideoJS.checkAdStatus();
+};
 e.prototype.onRewardedVideoAdLoaded = function() {
 console.log("ATRewardVideo  成功", this.hasAdReady(), i[this.reawardAdState]);
 this.reawardAdState = i.LoadSuccess;
@@ -1828,6 +1834,14 @@ if (this.ifLoadShow) {
 this.ifLoadShow = !1;
 this.showAd();
 }
+var t = this.checkAdStatus();
+console.log("savePreLoadEcpm  0000 ", typeof t);
+var e = JSON.parse(t), o = JSON.parse(e.adInfo), n = {
+network_placement_id: o.network_placement_id,
+adsource_id: o.adsource_id,
+adsource_price: o.adsource_price
+};
+gData.adData.savePreLoadEcpm(n);
 };
 e.prototype.onRewardedVideoAdFailed = function() {
 this.ifLoadShow = !1;
@@ -2736,6 +2750,9 @@ break;
 }
 return o;
 };
+t.prototype.savePreLoadEcpm = function(t) {
+gData.gameData.getProp(c.GameProp.videoTimes) <= 0 && mk.http.sendData("user/savePreLoadEcpm", JSON.stringify(t));
+};
 return t;
 }();
 o.AdData = s;
@@ -12838,8 +12855,8 @@ tab: o.tab,
 productID: t
 };
 this._maxProduct.push(a);
-}
 gData.farmMapData.isStateChange = !0;
+}
 };
 t.prototype.checkTaskFinishUnLock = function() {
 for (var t in p) {
@@ -13520,7 +13537,6 @@ e.ani_add3 = null;
 e.posY = 0;
 e.lastTimeSpan = 0;
 e.span = 0;
-e.autoPopSign = !0;
 e.isRefreshTask = !1;
 return e;
 }
@@ -13655,15 +13671,14 @@ return [ 2 ];
 });
 };
 e.prototype.initRedPoint = function() {
-var t = gData.sign.redPoint();
-this.nodeRedPoint.node_sign.active = t;
+this.nodeRedPoint.node_sign.active = gData.sign.redPoint();
 this.nodeRedPoint.node_turnable.active = gData.turnable.leftTimes > 0;
-var e = !1, o = gData.gameData.playerProp.farmGradeData.farmGradeRewardList;
-if (o) for (var n = o.length, a = 0; a != n; ++a) if (1 == o[a].status) {
-e = !0;
+var t = !1, e = gData.gameData.playerProp.farmGradeData.farmGradeRewardList;
+if (e) for (var o = e.length, n = 0; n != o; ++n) if (1 == e[n].status) {
+t = !0;
 break;
 }
-this.nodeRedPoint.node_gradeReward.active = e;
+this.nodeRedPoint.node_gradeReward.active = t;
 gData.gameData.init_red_point = !1;
 };
 e.prototype.autoOpenPanel = function() {
@@ -16944,8 +16959,18 @@ t.shareInviteUrl = function(t, e, o, n) {
 cc.sys.platform != cc.sys.WECHAT_GAME && (cc.sys.os == cc.sys.OS_ANDROID ? jsb.reflection.callStaticMethod(this._JSB_ANDROID_PATH, "shareInviteUrl", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", t, e, o, n) : (cc.sys.os, 
 cc.sys.OS_IOS));
 };
+t.ysdkInit = function() {
+cc.sys.os == cc.sys.OS_ANDROID ? this.callStaticMethod(this._JSB_ANDROID_PATH_JSDK, "init", "()V") : cc.sys.os == cc.sys.OS_IOS && this.callStaticMethod("AppController", "init", "");
+};
+t.autologin = function() {
+cc.sys.os == cc.sys.OS_ANDROID ? this.callStaticMethod(this._JSB_ANDROID_PATH_JSDK, "autologin", "()V") : cc.sys.os == cc.sys.OS_IOS && this.callStaticMethod("AppController", "autologin", "");
+};
+t.ysdkAuthSuccess = function() {
+gData.loginData.passAnti = !0;
+};
 t._JSB_ANDROID_PATH = "org/cocos2dx/javascript/thirdSdk/ThirdSdkMgr";
 t._JSB_IOS_PATH = "ThirdSdkMgr";
+t._JSB_ANDROID_PATH_JSDK = "org/cocos2dx/javascript/thirdSdk/ysdk/YSDKMgr";
 t.callBack = null;
 return t;
 }();
@@ -18011,7 +18036,8 @@ if (gData.appData.getDeviceInfoCompelete) {
 if (gData.loginData.popIdentifySwitch) {
 if (!this.hasCheckAnti) {
 this.hasCheckAnti = !0;
-this.checkShowIdentification();
+l.default.ysdkInit();
+l.default.autologin();
 }
 if (!gData.loginData.passAnti) return;
 }
@@ -22439,43 +22465,42 @@ e.node_2 = null;
 return e;
 }
 e.prototype.onEnable = function() {
-var t = this, e = !1;
+var t = this;
+mk.ad.showNative();
 this.lbl_times.string = "生产次数+" + gData.gameData.configs.ServerConfig.ProductionAd;
 this.lbl_times2.string = "生产次数+" + gData.gameData.configs.ServerConfig.ProductionAd;
 gData.gameData.init_productTask = !1;
 if (gData.gameData.playerProp.userFarmTaskInfo) {
-var o = gData.gameData.playerProp.userFarmTaskInfo.completeCount, n = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
-if (n - o <= 10) {
-if (n > o) {
-this.lbl_taskTimes.string = (n - o).toString();
+var e = gData.gameData.playerProp.userFarmTaskInfo.completeCount, o = gData.gameData.playerProp.userFarmTaskInfo.taskCount;
+if (o - e <= 10) {
+if (o > e) {
+this.lbl_taskTimes.string = (o - e).toString();
 this.node_Uncomplete.active = !0;
 this.node_complete.active = !1;
-e = !0;
 this.scheduleOnce(function() {
-mk.guide.curDes = "<color=8A4312>再<color=ff0000>生产" + (n - o) + "次</color>,即可<color=ff0000>提现</color>,\n快领取次数吧!</color>";
+mk.guide.curDes = "<color=8A4312>再<color=ff0000>生产" + (o - e) + "次</color>,即可<color=ff0000>提现</color>,\n快领取次数吧!</color>";
 mk.guide.open(2);
 }, .5);
 } else {
 this.node_Uncomplete.active = !1;
 this.node_complete.active = !0;
 }
-var a = o / n;
+var n = e / o;
 cc.tween(this.sp_taskProgress).delay(.2).to(.3, {
-fillRange: a
+fillRange: n
 }, {
 onUpdate: function() {
-var e = Math.round(t.sp_taskProgress.fillRange * n);
-t.lbl_progress.string = e + "/" + n;
+var e = Math.round(t.sp_taskProgress.fillRange * o);
+t.lbl_progress.string = e + "/" + o;
 }
 }).call(function() {
-t.lbl_progress.string = o + "/" + n;
+t.lbl_progress.string = e + "/" + o;
 }).start();
 } else {
 this.node_1.active = !1;
 this.node_2.active = !0;
 }
 }
-e ? gData.gameData.getProp(r.GameProp.guideID) >= 2 && mk.ad.showNative() : mk.ad.showNative();
 };
 e.prototype.update = function() {
 if (gData.gameData.init_productTask) {
@@ -27813,7 +27838,7 @@ return i > 3 && r && Object.defineProperty(e, o, r), r;
 Object.defineProperty(o, "__esModule", {
 value: !0
 });
-o.Eve = o.TouchListener = void 0;
+o.TouchListener = void 0;
 var r = cc._decorator, c = r.ccclass, s = r.property, l = function(t) {
 a(e, t);
 function e() {
@@ -27828,18 +27853,12 @@ this.node._touchListener.swallowTouches = !1;
 e.prototype.onTouchStart = function() {
 gData.gameData.isTouchScreen || (gData.gameData.isTouchScreen = !0);
 };
-e.prototype.onKeyDown = function(t) {
-console.log("cocos onKeyDown", t);
-};
 i([ s({
 displayName: "是否注册触摸事件"
 }) ], e.prototype, "isRegisterEvent", void 0);
 return i([ c ], e);
 }(cc.Component);
 o.TouchListener = l;
-o.Eve = function() {
-throw new Error("Function not implemented.");
-};
 cc._RF.pop();
 }, {} ],
 TurnableData: [ function(t, e, o) {

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

@@ -9,7 +9,7 @@
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyTest/baseRemote/"
     ],
-    "buildTime": 1632389421294,
-    "genTime": 1632389421294,
+    "buildTime": 1632393781146,
+    "genTime": 1632393781146,
     "genVersion": null
 }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików