Browse Source

修复信息流广告展示位置问题

kaka 5 years ago
parent
commit
c81f243796

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

@@ -17,6 +17,7 @@ export class ATNative extends zgSingleton {
     /** 是否加载显示 */
     private ifLoadShow: boolean = false;
 
+
     /** 初始化 */
     init() {
         this.ATNativeJS = cc["ATNativeJS"];
@@ -58,7 +59,6 @@ export class ATNative extends zgSingleton {
         //加载原生广告时需要传入广告展示的宽高
         var frameSize = cc.view.getFrameSize();
         let frameWidth = frameSize.width;
-        let frameHeight = frameSize.height;
         var per = frameWidth / 750
         var sw = per * 656;
         var sh = per * 440;
@@ -71,10 +71,7 @@ export class ATNative extends zgSingleton {
             sw *= 0.9
             sh *= 0.75
         }
-        else {
-            sw *= 0.9
-            sh *= 0.75
-        }
+
         this.ATNativeJS.loadNative(sw, sh);
     }
 
@@ -133,7 +130,6 @@ export class ATNative extends zgSingleton {
                     }
                     else if (type == 4) {
                         pos_y = frameHeight * 0.75;
-                        width *= 1.1;
                     }
 
                     let pos_x = (frameWidth - width) * 0.5

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


BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/release/EasyEliminate-release.apk


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

@@ -1007,18 +1007,15 @@ void 0 === e && (e = !1);
 this.nativeAdType = t;
 this.ifLoadShow = e;
 this.nativeAdState = a.Loading;
-var n = cc.view.getFrameSize(), o = n.width, i = (n.height, o / 750), r = 656 * i, c = 440 * i;
+var n = cc.view.getFrameSize().width / 750, o = 656 * n, i = 440 * n;
 if (2 == this.nativeAdType) {
-r *= .9;
-c *= .8;
+o *= .9;
+i *= .8;
 } else if (3 == this.nativeAdType) {
-r *= .9;
-c *= .75;
-} else {
-r *= .9;
-c *= .75;
+o *= .9;
+i *= .75;
 }
-this.ATNativeJS.loadNative(r, c);
+this.ATNativeJS.loadNative(o, i);
 };
 e.prototype.showNative = function(t) {
 if (this.nativeAdState == a.Show) ; else if (this.hasAdReady()) if (this.nativeAdType != t) {
@@ -1035,10 +1032,7 @@ c *= .8;
 s = .69 * o;
 r *= .9;
 c *= .75;
-} else if (4 == t) {
-s = .75 * o;
-r *= 1.1;
-}
+} else 4 == t && (s = .75 * o);
 var l = .5 * (n - r);
 this.ATNativeJS.showNative(l, s, r, c);
 } else this.nativeAdState == a.Loading ? this.ifLoadShow = !0 : this.loadNative(t, !0);

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

@@ -7,7 +7,7 @@
         "http://",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemote/"
     ],
-    "buildTime": 1625045088976,
-    "genTime": 1625045088976,
+    "buildTime": 1625049039228,
+    "genTime": 1625049039228,
     "genVersion": null
 }