Просмотр исходного кода

广告分平台点击率查询

kaka 4 лет назад
Родитель
Сommit
066ff56e97

+ 0 - 47
assets/script/before/main/FactoryCountDown.ts

@@ -1,47 +0,0 @@
-import Util from "../util/Util";
-
-const { ccclass, property } = cc._decorator;
-
-@ccclass
-export class FactoryCountDown extends cc.Component {
-    @property({ tooltip: "配置ID" }) configID: number = 0;
-    @property({ type: cc.Component.EventHandler, tooltip: "商品制作完成时的回调" }) onComplete: cc.Component.EventHandler = null;
-    public progress: number = 0;
-    public timerString: string = "";
-
-    private config: any;
-    async start() {
-        this.config = gData.configData.configMap.get("product");
-    }
-
-    update() {
-        let producting = gData.gameData.getProductingList(this.configID);
-        let now = Date.now();
-        if (producting.length > 0 && this.config) {
-            let totleTime = this.config[producting[0].productID]["time"];
-            if (producting[0].ripeDate > now) {
-                this.progress = 1 - ((producting[0].ripeDate - now) / (totleTime * 1000));
-                this.timerString = Util.formatCountDown(producting[0].ripeDate - now);
-            } else {
-                this.onComplete && this.onComplete.emit([producting[0].productID]);
-                gData.gameData.getProductingList(this.configID).shift();
-            }
-        }
-    }
-
-    public async ripe() {
-        let producting = gData.gameData.getProductingList(this.configID);
-        this.onComplete && this.onComplete.emit([producting[0].productID]);
-        let build = gData.configData.configMap.get("build");
-        if (build[this.configID]["sequence"] == 1) {
-            let lastTime = producting[0].ripeDate - Date.now();
-            gData.gameData.getProductingList(this.configID).shift();
-            for (let i = 0; i < gData.gameData.getProductingList(this.configID).length; i++) {
-                gData.gameData.getProductingList(this.configID)[i].ripeDate -= lastTime;
-            }
-        } else {
-            gData.gameData.getProductingList(this.configID).shift();
-        }
-    }
-}
-

+ 0 - 9
assets/script/before/main/FactoryCountDown.ts.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.0.8",
-  "uuid": "d6a932d2-9ce3-4e9e-a4a5-b17badb23743",
-  "isPlugin": false,
-  "loadPluginInWeb": true,
-  "loadPluginInNative": true,
-  "loadPluginInEditor": false,
-  "subMetas": {}
-}

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

@@ -87,7 +87,9 @@ export default class ATBanner extends zgSingleton {
         this.ifLoadShow = false;
         this.ATBannerJS.destroyBanner()
 
-        this.loadBanner();
+        gData.warnTipData.getUserShutdownAds(() => {
+            this.loadBanner();
+        });
     }
 
     //广告回调部分------------------------------------------------------------------------

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

@@ -229,7 +229,9 @@ export default class ATInterstitial extends zgSingleton {
         }
 
         //加载下一个
-        this.loadInter(type);
+        gData.warnTipData.getUserShutdownAds(() => {
+            this.loadInter(type);
+        })
     }
 
     onInterstitialAdFailedToPlayVideo(placementId, errorInfo) {

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

@@ -150,11 +150,13 @@ export class ATNative extends zgSingleton {
 
     /** 销毁baaner */
     destroyNative() {
-
         this.nativeAdState = NativeAdState.Close;
 
         this.ATNativeJS.destroyNative();
-        this.loadNative(this.nativeAdType);
+
+        gData.warnTipData.getUserShutdownAds(() => {
+            this.loadNative(this.nativeAdType);
+        });
     }
 
     //广告回调部分------------------------------------------------------------------------