فهرست منبع

修复普通插屏和全屏插屏不能同时弹出问题

kaka 5 سال پیش
والد
کامیت
2c8bf0be9f

+ 4 - 5
assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATInterstitial.ts

@@ -13,7 +13,7 @@ export default class ATInterstitial extends zgSingleton {
     private ATInterstitialJS: any;
 
     /** 插屏广告类型 0 插屏 1全屏 */
-    private interAdType: number = 0;
+    private interAdType: number = -1;
     /** 插屏广告状态 */
     private interAdState: InterAdState = 0;
     /** 是否加载完显示 */
@@ -75,13 +75,12 @@ export default class ATInterstitial extends zgSingleton {
      * @param type 0 插屏 1 全屏
      */
     showInter(type: number) {
-
-        this.interAdType = type;
-
-        if (this.interAdState == InterAdState.Show) {
+        if (this.interAdState == InterAdState.Show && type == this.interAdType) {
             //正在显示不重复弹出
+            console.log('当前插屏类型正在展示');
         }
         else {
+            this.interAdType = type;
             if (this.hasAdReady()) {
                 this.interAdState = InterAdState.Show;
                 this.ATInterstitialJS.showInter(type);

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


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
build/jsb-link/assets/resources/config.json


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

@@ -637,7 +637,7 @@ var a, r = t("../../zgSingleton"), c = t("./ATSDKMgr"), s = function(t) {
 i(e, t);
 function e() {
 var e = null !== t && t.apply(this, arguments) || this;
-e.interAdType = 0;
+e.interAdType = -1;
 e.interAdState = 0;
 e.ifLoadShow = !1;
 return e;
@@ -671,11 +671,13 @@ this.interAdState = a.Loading;
 this.ATInterstitialJS.loadInter(t);
 };
 e.prototype.showInter = function(t) {
+if (this.interAdState == a.Show && t == this.interAdType) console.log("当前插屏类型正在展示"); else {
 this.interAdType = t;
-if (this.interAdState == a.Show) ; else if (this.hasAdReady()) {
+if (this.hasAdReady()) {
 this.interAdState = a.Show;
 this.ATInterstitialJS.showInter(t);
 } else this.interAdState == a.Loading ? this.ifLoadShow = !0 : this.loadInter(t, !0);
+}
 };
 e.prototype.onInterstitialAdLoaded = function() {
 this.interAdState = a.LoadSuccess;
@@ -2003,10 +2005,10 @@ var e = mk.storage.getStorage("popFullIndex");
 null == e ? e = 0 : e++;
 mk.storage.setStorage("popFullIndex", e);
 var n = e % this.fullInterShowStr.length;
-console.log("this.fullInterShowStr  ", this.fullInterShowStr);
-console.log("checkShowFullInter  ", n);
+mk.console.log("checkShowFullInter  this.fullInterShowStr  ", this.fullInterShowStr);
+mk.console.log("checkShowFullInter  index", n);
 if ("1" == this.fullInterShowStr[n]) {
-console.log("showInterAd  ");
+mk.console.log("checkShowFullInter showInterAd");
 mk.ad.showInterAd(1);
 }
 }

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

@@ -13,7 +13,7 @@
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTestT/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemoteTest/"
     ],
-    "buildTime": 1628755232989,
-    "genTime": 1628755232989,
+    "buildTime": 1628761859347,
+    "genTime": 1628761859347,
     "genVersion": null
 }

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است