Ver Fonte

预加载ecpm

kaka há 4 anos atrás
pai
commit
9ebc5adef0

+ 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


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
build/jsb-link/assets/resources/config.json


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


+ 24 - 12
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;
@@ -11785,7 +11802,7 @@ Object.defineProperty(o, "__esModule", {
 value: !0
 });
 o.Fun = void 0;
-var n, a = t("./AppData"), i = t("./GameData"), r = t("./HttpData"), c = t("./LoginData"), s = t("./StorageData"), l = t("./WechatData"), p = t("./module/HelpData"), u = t("./module/TurnableData"), d = t("./module/SignData"), h = t("./module/FissionData"), f = t("./AdData"), y = t("./module/RewardData"), g = t("./module/CashNormalData"), m = t("./module/ReceiptNoticeData"), _ = t("./module/BlessingBagData"), v = t("./module/CashProData"), b = t("./module/RedBagCashData"), D = t("./module/RedCodeData"), w = t("./module/MoreGameData"), S = t("./module/SettingData"), A = t("./module/GuideData"), k = t("./module/GuideWeakData"), P = t("./ConfigData"), O = t("./module/NewCashUIData"), I = t("../../before/view/data/ADUnlockData"), T = t("../../before/view/data/PlantData"), R = t("../../before/main/FarmSystem"), C = t("../../before/view/data/HarvestData"), N = t("../../before/view/data/ADClearSickData"), F = t("../../before/main/PastureSystem"), x = t("../../before/main/FactorySystem"), M = t("./module/FarmMapData"), j = t("./module/GradeRewardData"), B = t("./module/WalletCashOutData"), E = t("./module/LineUpUIData"), L = function() {
+var n, a = t("./AppData"), i = t("./GameData"), r = t("./HttpData"), c = t("./LoginData"), s = t("./StorageData"), l = t("./WechatData"), p = t("./module/HelpData"), u = t("./module/TurnableData"), d = t("./module/SignData"), h = t("./module/FissionData"), f = t("./AdData"), y = t("./module/RewardData"), g = t("./module/CashNormalData"), m = t("./module/ReceiptNoticeData"), _ = t("./module/BlessingBagData"), v = t("./module/CashProData"), b = t("./module/RedBagCashData"), D = t("./module/RedCodeData"), w = t("./module/MoreGameData"), S = t("./module/SettingData"), A = t("./module/GuideData"), k = t("./module/GuideWeakData"), P = t("./ConfigData"), O = t("./module/NewCashUIData"), I = t("../../before/view/data/ADUnlockData"), T = t("../../before/view/data/PlantData"), R = t("../../before/main/FarmSystem"), C = t("../../before/view/data/HarvestData"), N = t("../../before/view/data/ADClearSickData"), F = t("../../before/main/PastureSystem"), x = t("../../before/main/FactorySystem"), M = t("./module/FarmMapData"), j = t("./module/GradeRewardData"), E = t("./module/WalletCashOutData"), B = t("./module/LineUpUIData"), L = function() {
 function t() {
 this.init();
 }
@@ -11823,8 +11840,8 @@ this.factorySystem = new x.default();
 this.farmSystem = new R.FarmSystem();
 this.farmMapData = new M.FarmMapData();
 this.farmGradeData = new j.GradeRewardData();
-this.walletCashOutData = new B.WalletCashOutData();
-this.lineUpUIData = new E.LineUpUIData();
+this.walletCashOutData = new E.WalletCashOutData();
+this.lineUpUIData = new B.LineUpUIData();
 this.moduleData = new Map();
 this.moduleData.set(n.moreGame, this.moreGame);
 this.moduleData.set(n.turnable, this.turnable);
@@ -16945,16 +16962,11 @@ 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.showRealNameAlertDialog = function() {
-cc.sys.os == cc.sys.OS_ANDROID ? this.callStaticMethod(this._JSB_ANDROID_PATH_JSDK, "showRealNameAlertDialog", "()V") : cc.sys.os == cc.sys.OS_IOS && this.callStaticMethod("AppController", "showRealNameAlertDialog", "");
-};
 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;
-console.log("ysdkAuthSuccess  >>> ");
-mk.storage.setStorage("YSDKSuccess", "1");
 };
 t._JSB_ANDROID_PATH = "org/cocos2dx/javascript/thirdSdk/ThirdSdkMgr";
 t._JSB_IOS_PATH = "ThirdSdkMgr";
@@ -17977,7 +17989,6 @@ e.hasCheckPermission = !1;
 e.hasCheckPrivacy = !1;
 e.loadSceneState = !1;
 e.coreGame = null;
-e.ysdkSuccess = !1;
 e.cool = !1;
 return e;
 }
@@ -17987,8 +17998,6 @@ this.node_load.active = !0;
 this.node_loadPart.active = !0;
 this.node_btnLogin.active = !1;
 this.setProgress(0);
-var t = mk.storage.getStorage("YSDKSuccess");
-this.ysdkSuccess = "1" == t;
 };
 e.prototype.start = function() {
 return r(this, void 0, void 0, function() {
@@ -18024,12 +18033,15 @@ this.hasCheckPermission = !0;
 l.default.checkPermission();
 }
 if (gData.appData.getDeviceInfoCompelete) {
+if (gData.loginData.popIdentifySwitch) {
 if (!this.hasCheckAnti) {
 this.hasCheckAnti = !0;
 l.default.ysdkInit();
 l.default.autologin();
 }
-if (gData.loginData.passAnti) if (gData.loginData.loadResCompelete) {
+if (!gData.loginData.passAnti) return;
+}
+if (gData.loginData.loadResCompelete) {
 if (mk.aliRiskManager.getRiskCode) {
 mk.aliRiskManager.getRiskCode = !1;
 this.login();

+ 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": 1632392279784,
-    "genTime": 1632392279784,
+    "buildTime": 1632393781146,
+    "genTime": 1632393781146,
     "genVersion": null
 }

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff