wuwangdong 4 年之前
父節點
當前提交
03f837ad3f

+ 18 - 19
assets/script/game/module/blessingBag/BlessingBag.ts

@@ -121,7 +121,7 @@ export default class BlessingBag extends cc.Component {
         }
 
         this.txtRemaindAdNum.string = "<color=#FDFCF5>今日剩余次数:</c><color=#FFE533>" + data.leftVideoTimes + "</color>";
-        //this.adIcon.active = data.isVideo != 1;
+        this.adIcon.active = data.isVideo != 1;
 
         if (this.adrbArray.length < 4) {
             this.adrbArray = [];
@@ -209,28 +209,27 @@ export default class BlessingBag extends cc.Component {
     Click_AdProgressBtn() {
 
         mk.audio.playEffect("button");
-        // if (gData.blessingBag.videoRbData.isVideo == 1) {
-        //     //免费加进度
-        //     gData.blessingBag.addProgress();
-        // } else 
-        {
+        if (gData.blessingBag.videoRbData.isVideo == 1) {
+            //免费加进度
+            gData.blessingBag.addProgress();
+        } else {
             // if (cc.sys.isNative && !gData.loginData.isAuth) {
             //     // JsbSystem.WxAuth();
             //     mk.ui.openPanel('module/authUI/authUI');
             //     return;
             // }
-            //if (gData.blessingBag.videoRbData.leftVideoTimes > 0) {
-            mk.ad.videoAdType = VideoAdType.video_init_15;
-            mk.ad.watchAd(async (success: boolean) => {
-                mk.console.log("watchAD:" + success);
-                if (success) {
-                    await gData.adData.watchVideo(null);
-                    gData.blessingBag.addProgress();
-                }
-            });
-            //} else {             
-            //mk.tip.pop('今日观看次数已用完');
-            //}
+            if (gData.blessingBag.videoRbData.leftVideoTimes > 0) {
+                mk.ad.videoAdType = VideoAdType.video_init_15;
+                mk.ad.watchAd(async (success: boolean) => {
+                    mk.console.log("watchAD:" + success);
+                    if (success) {
+                        await gData.adData.watchVideo(null);
+                        gData.blessingBag.addProgress();
+                    }
+                });
+            } else {
+                mk.tip.pop('今日观看次数已用完');
+            }
         }
 
         console.log("--->You Click AdProgressBtn  ", gData.blessingBag.videoRbData);
@@ -255,7 +254,7 @@ export default class BlessingBag extends cc.Component {
                 return;
             }
         }
-        
+
         gData.blessingBag.HttpCashTask();
     }
 

二進制
build/jsb-link/assets/main/index.jsc


文件差異過大導致無法顯示
+ 0 - 0
build/jsb-link/assets/resources/config.json


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

@@ -4987,6 +4987,7 @@ var a;
 (a = this.video_btn.getComponent(s.default)) && a.setGray(!1);
 }
 this.txtRemaindAdNum.string = "<color=#FDFCF5>今日剩余次数:</c><color=#FFE533>" + e.leftVideoTimes + "</color>";
+this.adIcon.active = 1 != e.isVideo;
 if (this.adrbArray.length < 4) {
 this.adrbArray = [];
 for (n = 0; n < e.welFareTaskList.length; n++) {
@@ -5053,6 +5054,7 @@ this.lastNum = this.targetProgress;
 e.prototype.Click_AdProgressBtn = function() {
 var t = this;
 mk.audio.playEffect("button");
+if (1 == gData.blessingBag.videoRbData.isVideo) gData.blessingBag.addProgress(); else if (gData.blessingBag.videoRbData.leftVideoTimes > 0) {
 mk.ad.videoAdType = p.VideoAdType.video_init_15;
 mk.ad.watchAd(function(e) {
 return r(t, void 0, void 0, function() {
@@ -5073,6 +5075,7 @@ return [ 2 ];
 });
 });
 });
+} else mk.tip.pop("今日观看次数已用完");
 console.log("---\x3eYou Click AdProgressBtn  ", gData.blessingBag.videoRbData);
 };
 e.prototype.OpenRbPanel = function() {

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

@@ -10,7 +10,7 @@
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyTest/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyJsb/baseRemote/"
     ],
-    "buildTime": 1634547199163,
-    "genTime": 1634547199163,
+    "buildTime": 1634549576099,
+    "genTime": 1634549576099,
     "genVersion": null
 }

部分文件因文件數量過多而無法顯示