wuwangdong 4 лет назад
Родитель
Сommit
e447ab9e4f

+ 60 - 34
assets/resources/module/blessingBag/blessingBag.prefab

@@ -36,9 +36,6 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 273
-      },
-      {
         "__id__": 274
       },
       {
@@ -46,10 +43,13 @@
       },
       {
         "__id__": 276
+      },
+      {
+        "__id__": 277
       }
     ],
     "_prefab": {
-      "__id__": 277
+      "__id__": 278
     },
     "_opacity": 255,
     "_color": {
@@ -644,6 +644,7 @@
     "playOnLoad": true,
     "actType": 0,
     "isSetSuitStartPos": false,
+    "isDelaySetOrigin": null,
     "_id": ""
   },
   {
@@ -1227,7 +1228,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "adlLQDTPFGHoj8xNWk+8kP",
+    "fileId": "05WlhdT7lJMK2ugCMm+BQa",
     "sync": false
   },
   {
@@ -1357,7 +1358,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "ee++2hBlRJsLrYnxFFtBl4",
+    "fileId": "5bjpf0jsFGmYLEXsvqUqsJ",
     "sync": false
   },
   {
@@ -1487,7 +1488,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "223T6vRERDZqT18r3yOnSm",
+    "fileId": "8blkwBbMxOOZX7QrSXOTcV",
     "sync": false
   },
   {
@@ -8163,17 +8164,17 @@
         "__id__": 236
       },
       {
-        "__id__": 257
+        "__id__": 258
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 271
+        "__id__": 272
       }
     ],
     "_prefab": {
-      "__id__": 272
+      "__id__": 273
     },
     "_opacity": 255,
     "_color": {
@@ -8247,10 +8248,13 @@
       },
       {
         "__id__": 255
+      },
+      {
+        "__id__": 256
       }
     ],
     "_prefab": {
-      "__id__": 256
+      "__id__": 257
     },
     "_opacity": 255,
     "_color": {
@@ -8792,6 +8796,7 @@
     "playOnLoad": true,
     "actType": 0,
     "isSetSuitStartPos": false,
+    "isDelaySetOrigin": null,
     "_id": ""
   },
   {
@@ -8856,6 +8861,23 @@
     "_id": ""
   },
   {
+    "__type__": "f67a9SEPlBL8rHHpVX6g1ZW",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 236
+    },
+    "_enabled": true,
+    "normal": {
+      "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+    },
+    "gray": {
+      "__uuid__": "3a7bb79f-32fd-422e-ada2-96f518fed422"
+    },
+    "grayState": false,
+    "_id": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1
@@ -8875,23 +8897,23 @@
     },
     "_children": [
       {
-        "__id__": 258
+        "__id__": 259
       },
       {
-        "__id__": 261
+        "__id__": 262
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 264
+        "__id__": 265
       },
       {
-        "__id__": 265
+        "__id__": 266
       }
     ],
     "_prefab": {
-      "__id__": 270
+      "__id__": 271
     },
     "_opacity": 255,
     "_color": {
@@ -8945,17 +8967,17 @@
     "_name": "RICHTEXT_CHILD",
     "_objFlags": 1024,
     "_parent": {
-      "__id__": 257
+      "__id__": 258
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 259
+        "__id__": 260
       }
     ],
     "_prefab": {
-      "__id__": 260
+      "__id__": 261
     },
     "_opacity": 255,
     "_color": {
@@ -9010,7 +9032,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 258
+      "__id__": 259
     },
     "_enabled": true,
     "_materials": [
@@ -9046,7 +9068,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "23kjRegPhHcIGnLRbEiCV8",
+    "fileId": "05BBwr5LRCf5wCBQYV+AnB",
     "sync": false
   },
   {
@@ -9054,17 +9076,17 @@
     "_name": "RICHTEXT_CHILD",
     "_objFlags": 1024,
     "_parent": {
-      "__id__": 257
+      "__id__": 258
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 262
+        "__id__": 263
       }
     ],
     "_prefab": {
-      "__id__": 263
+      "__id__": 264
     },
     "_opacity": 255,
     "_color": {
@@ -9119,7 +9141,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 261
+      "__id__": 262
     },
     "_enabled": true,
     "_materials": [
@@ -9155,7 +9177,7 @@
     "asset": {
       "__uuid__": "94760687-648e-4d1f-ac2f-169b0dc625d9"
     },
-    "fileId": "a7c3iHu8dCBr6bzLnCCjbZ",
+    "fileId": "6f+GWkBWBB5aC02cYtK3oG",
     "sync": false
   },
   {
@@ -9163,7 +9185,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 257
+      "__id__": 258
     },
     "_enabled": true,
     "_fontFamily": "Arial",
@@ -9184,28 +9206,29 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 257
+      "__id__": 258
     },
     "_enabled": true,
     "fromData": {
-      "__id__": 266
+      "__id__": 267
     },
     "targetData": [
       {
-        "__id__": 267
+        "__id__": 268
       }
     ],
     "target": {
-      "__id__": 257
+      "__id__": 258
     },
     "tweenEasing": 20,
     "repeat": 1,
     "onOneRepeatComplete": {
-      "__id__": 269
+      "__id__": 270
     },
     "playOnLoad": true,
     "actType": 0,
     "isSetSuitStartPos": false,
+    "isDelaySetOrigin": null,
     "_id": ""
   },
   {
@@ -9222,7 +9245,7 @@
   {
     "__type__": "TweenData",
     "propsData": {
-      "__id__": 268
+      "__id__": 269
     },
     "duration": 0.2,
     "delay": 0.8,
@@ -9374,7 +9397,7 @@
       "__id__": 135
     },
     "txtRemaindAdNum": {
-      "__id__": 264
+      "__id__": 265
     },
     "blassingBagItem": {
       "__uuid__": "3c12cc7b-777b-45f9-8bf1-8a285075e6f7"
@@ -9418,6 +9441,9 @@
     "tableview": {
       "__id__": 189
     },
+    "video_btn": {
+      "__id__": 248
+    },
     "_id": ""
   },
   {

+ 10 - 10
assets/resources/module/blessingBag/blessingBagItem.prefab

@@ -627,7 +627,7 @@
     "asset": {
       "__uuid__": "3c12cc7b-777b-45f9-8bf1-8a285075e6f7"
     },
-    "fileId": "dcauCkRAJH8abDW7vaCN8H",
+    "fileId": "d4z78Ja+xHx56CJ2dN21MI",
     "sync": false
   },
   {
@@ -736,7 +736,7 @@
     "asset": {
       "__uuid__": "3c12cc7b-777b-45f9-8bf1-8a285075e6f7"
     },
-    "fileId": "fd+S56TsZOm55Nc2SrInSw",
+    "fileId": "9aewsc0IJNYYQpAM+zfuxk",
     "sync": false
   },
   {
@@ -1019,7 +1019,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 68.5,
+      "width": 2,
       "height": 37.28
     },
     "_anchorPoint": {
@@ -1455,7 +1455,7 @@
         "__id__": 41
       }
     ],
-    "_active": false,
+    "_active": true,
     "_components": [
       {
         "__id__": 45
@@ -1544,8 +1544,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 54,
-      "height": 39.8
+      "width": 72.33,
+      "height": 41.8
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1596,9 +1596,9 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_string": "提现",
-    "_N$string": "提现",
-    "_fontSize": 26,
+    "_string": "提 现",
+    "_N$string": "提 现",
+    "_fontSize": 30,
     "_lineHeight": 30,
     "_enableWrapText": true,
     "_N$file": null,
@@ -1629,7 +1629,7 @@
       "b": 0,
       "a": 255
     },
-    "_width": 1,
+    "_width": 2,
     "_id": ""
   },
   {

+ 34 - 0
assets/script/game/module/blessingBag/BlessingBag.ts

@@ -4,6 +4,7 @@
  */
 
 import JsbSystem from "../../../mk/system/JsbSystem";
+import SetGray from "../../component/SetGray";
 import TableView from "../../component/TableView";
 import { AdFun } from "../../data/AdData";
 import { DataEventId, VideoAdType } from "../../data/GameData";
@@ -76,6 +77,9 @@ export default class BlessingBag extends cc.Component {
     @property(TableView)
     tableview: TableView = null;
 
+    @property(cc.Button)
+    video_btn: cc.Button = null;
+
     /**红包页面类型 1 大额 2 任务*/
     private rbPanelType: number = 0;
 
@@ -116,6 +120,36 @@ export default class BlessingBag extends cc.Component {
         if (!data) {
             return
         }
+
+        let isAllComplete = true;
+        for(let i = 0; i != data.welFareTaskList.length; ++i)
+        {
+            if(data.welFareTaskList[i].progressRate < 1)
+            {
+                isAllComplete = false;
+                break;            
+            }
+        }
+        if(isAllComplete || data.leftVideoTimes <= 0)
+        {
+            this.video_btn.interactable = false;
+            let cmp = this.video_btn.getComponent(SetGray);
+            if(cmp)
+            {
+                cmp.setGray(true);
+            }
+        }
+        {
+            if(!this.video_btn.interactable)
+            {
+                this.video_btn.interactable = false;
+                let cmp = this.video_btn.getComponent(SetGray);
+                if(cmp)
+                {
+                    cmp.setGray(true);
+                }
+            }
+        }
                 
         this.txtRemaindAdNum.string = "<color=#FDFCF5>今日剩余次数:</c><color=#FFE533>" + data.leftVideoTimes + "</color>";
         this.adIcon.active = data.isVideo != 1;