薛鸿潇 před 5 roky
rodič
revize
0e39f16a4f

+ 161 - 185
assets/resources/module/sign/prefab/signIconItem.prefab

@@ -21,13 +21,23 @@
         "__id__": 2
       },
       {
-        "__id__": 24
+        "__id__": 20
+      },
+      {
+        "__id__": 32
       }
     ],
     "_active": true,
-    "_components": [],
+    "_components": [
+      {
+        "__id__": 36
+      },
+      {
+        "__id__": 37
+      }
+    ],
     "_prefab": {
-      "__id__": 40
+      "__id__": 39
     },
     "_opacity": 255,
     "_color": {
@@ -51,7 +61,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        -188.025,
+        0,
         0,
         0,
         0,
@@ -60,7 +70,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -98,15 +108,12 @@
       },
       {
         "__id__": 16
-      },
-      {
-        "__id__": 19
       }
     ],
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 23
+      "__id__": 19
     },
     "_opacity": 255,
     "_color": {
@@ -257,7 +264,7 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
     },
     "fileId": "4awRiZiX5G741ffH0C2gNQ",
     "sync": false
@@ -386,7 +393,7 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
     },
     "fileId": "691dIsmuRNIak2SxMFMsFn",
     "sync": false
@@ -493,7 +500,7 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
     },
     "fileId": "02yXT1isRFPIWs8KIR3gMS",
     "sync": false
@@ -600,7 +607,7 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
     },
     "fileId": "4aPBNs+vxMS6e9JPphhR2z",
     "sync": false
@@ -707,149 +714,18 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
     },
     "fileId": "ecX6I5nCRH8I81D302IoAk",
     "sync": false
   },
   {
-    "__type__": "cc.Node",
-    "_name": "天数",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 2
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 20
-      },
-      {
-        "__id__": 21
-      }
-    ],
-    "_prefab": {
-      "__id__": 22
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 94,
-      "height": 54.4
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        -55.18,
-        0,
-        0,
-        0,
-        0,
-        1,
-        1,
-        1,
-        1
-      ]
-    },
-    "_eulerAngles": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_skewX": 0,
-    "_skewY": 0,
-    "_is3DNode": false,
-    "_groupIndex": 0,
-    "groupIndex": 0,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Label",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 19
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_string": "第二天",
-    "_N$string": "第二天",
-    "_fontSize": 30,
-    "_lineHeight": 40,
-    "_enableWrapText": true,
-    "_N$file": {
-      "__uuid__": "0bc2f1e8-1dd4-45ba-8f7e-36c47dde4152"
-    },
-    "_isSystemFontUsed": false,
-    "_spacingX": 0,
-    "_batchAsBitmap": false,
-    "_styleFlags": 0,
-    "_underlineHeight": 0,
-    "_N$horizontalAlign": 1,
-    "_N$verticalAlign": 1,
-    "_N$fontFamily": "Arial",
-    "_N$overflow": 0,
-    "_N$cacheMode": 0,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.LabelOutline",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 19
-    },
-    "_enabled": true,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 42,
-      "g": 183,
-      "b": 24,
-      "a": 255
-    },
-    "_width": 2,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "d0F9HqhbFNfKeqi9Y4hvca",
-    "sync": false
-  },
-  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
     },
     "fileId": "37d1m5mxxHdaOQWp8WfIhq",
     "sync": false
@@ -863,22 +739,19 @@
     },
     "_children": [
       {
-        "__id__": 25
-      },
-      {
-        "__id__": 28
+        "__id__": 21
       },
       {
-        "__id__": 32
+        "__id__": 24
       },
       {
-        "__id__": 35
+        "__id__": 28
       }
     ],
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 39
+      "__id__": 31
     },
     "_opacity": 255,
     "_color": {
@@ -932,17 +805,17 @@
     "_name": "图标背景",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 24
+      "__id__": 20
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 26
+        "__id__": 22
       }
     ],
     "_prefab": {
-      "__id__": 27
+      "__id__": 23
     },
     "_opacity": 255,
     "_color": {
@@ -996,7 +869,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 25
+      "__id__": 21
     },
     "_enabled": true,
     "_materials": [
@@ -1029,7 +902,7 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
     },
     "fileId": "cdvrdX0sNFiYbcbPbbZqWx",
     "sync": false
@@ -1039,20 +912,20 @@
     "_name": "背景光",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 24
+      "__id__": 20
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 29
+        "__id__": 25
       },
       {
-        "__id__": 30
+        "__id__": 26
       }
     ],
     "_prefab": {
-      "__id__": 31
+      "__id__": 27
     },
     "_opacity": 255,
     "_color": {
@@ -1106,7 +979,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 28
+      "__id__": 24
     },
     "_enabled": true,
     "_materials": [
@@ -1138,7 +1011,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 28
+      "__id__": 24
     },
     "_enabled": true,
     "_defaultClip": {
@@ -1158,7 +1031,7 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
     },
     "fileId": "47PfiwItBMaoPlcDYCRqjb",
     "sync": false
@@ -1168,17 +1041,17 @@
     "_name": "图标",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 24
+      "__id__": 20
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 33
+        "__id__": 29
       }
     ],
     "_prefab": {
-      "__id__": 34
+      "__id__": 30
     },
     "_opacity": 255,
     "_color": {
@@ -1232,7 +1105,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 32
+      "__id__": 28
     },
     "_enabled": true,
     "_materials": [
@@ -1265,30 +1138,41 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
     },
     "fileId": "a5VkxYCehDloILRhGPYsER",
     "sync": false
   },
   {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
+    },
+    "fileId": "bdZaf1fl5PwYL9/9ok7z5z",
+    "sync": false
+  },
+  {
     "__type__": "cc.Node",
     "_name": "天数",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 24
+      "__id__": 1
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 36
+        "__id__": 33
       },
       {
-        "__id__": 37
+        "__id__": 34
       }
     ],
     "_prefab": {
-      "__id__": 38
+      "__id__": 35
     },
     "_opacity": 255,
     "_color": {
@@ -1342,7 +1226,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 35
+      "__id__": 32
     },
     "_enabled": true,
     "_materials": [
@@ -1377,7 +1261,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 35
+      "__id__": 32
     },
     "_enabled": true,
     "_color": {
@@ -1396,21 +1280,113 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
     },
-    "fileId": "3b5raSZ3FDGLapM6KowDXY",
+    "fileId": "271JJwB7JMHrPs0NAUwgvp",
     "sync": false
   },
   {
-    "__type__": "cc.PrefabInfo",
-    "root": {
+    "__type__": "233bfi4S/FHSYKyekkgMW0Z",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
       "__id__": 1
     },
-    "asset": {
-      "__id__": 0
+    "_enabled": true,
+    "node_cash": {
+      "__id__": 2
     },
-    "fileId": "bdZaf1fl5PwYL9/9ok7z5z",
-    "sync": false
+    "node_redbag": {
+      "__id__": 20
+    },
+    "lbl_day": {
+      "__id__": 33
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_normalMaterial": null,
+    "_grayMaterial": null,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 38
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 0,
+    "transition": 0,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_N$normalSprite": null,
+    "_N$pressedSprite": null,
+    "pressedSprite": null,
+    "_N$hoverSprite": null,
+    "hoverSprite": null,
+    "_N$disabledSprite": null,
+    "_N$target": {
+      "__id__": 1
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "233bfi4S/FHSYKyekkgMW0Z",
+    "handler": "clickReceiveReward",
+    "customEventData": ""
   },
   {
     "__type__": "cc.PrefabInfo",
@@ -1418,7 +1394,7 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
     },
     "fileId": "",
     "sync": false

+ 37 - 120
assets/resources/module/sign/prefab/signItem.prefab

@@ -13,7 +13,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "signItem",
+    "_name": "SignItem",
     "_objFlags": 0,
     "_parent": null,
     "_children": [
@@ -21,16 +21,20 @@
         "__id__": 2
       },
       {
-        "__id__": 7
+        "__id__": 4
       },
       {
-        "__id__": 9
+        "__id__": 6
       }
     ],
     "_active": true,
-    "_components": [],
+    "_components": [
+      {
+        "__id__": 8
+      }
+    ],
     "_prefab": {
-      "__id__": 11
+      "__id__": 9
     },
     "_opacity": 255,
     "_color": {
@@ -86,15 +90,11 @@
     "_parent": {
       "__id__": 1
     },
-    "_children": [
-      {
-        "__id__": 3
-      }
-    ],
+    "_children": [],
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 6
+      "__id__": 3
     },
     "_opacity": 255,
     "_color": {
@@ -144,113 +144,6 @@
     "_id": ""
   },
   {
-    "__type__": "cc.Node",
-    "_name": "New Sprite(Splash)",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 2
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 4
-      }
-    ],
-    "_prefab": {
-      "__id__": 5
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 100,
-      "height": 100
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        -78,
-        0,
-        0,
-        0,
-        0,
-        1,
-        1,
-        1,
-        1
-      ]
-    },
-    "_eulerAngles": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_skewX": 0,
-    "_skewY": 0,
-    "_is3DNode": false,
-    "_groupIndex": 0,
-    "groupIndex": 0,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 3
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
-    },
-    "_type": 0,
-    "_sizeMode": 0,
-    "_fillType": 0,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_atlas": null,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 2
-    },
-    "asset": {
-      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
-    },
-    "fileId": "4eNPXljchN0bzigPpCammM",
-    "sync": false
-  },
-  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 2
@@ -272,7 +165,7 @@
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 8
+      "__id__": 5
     },
     "_opacity": 255,
     "_color": {
@@ -343,7 +236,7 @@
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 10
+      "__id__": 7
     },
     "_opacity": 255,
     "_color": {
@@ -404,6 +297,30 @@
     "sync": false
   },
   {
+    "__type__": "64cb2tAChJMy5muSxd7Pi4r",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "sign_icon_pos": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 4
+      },
+      {
+        "__id__": 6
+      }
+    ],
+    "pre_icon": {
+      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
+    },
+    "_id": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1

+ 3 - 0
assets/resources/module/sign/sign.prefab

@@ -666,6 +666,9 @@
         "__uuid__": "29472b23-b80c-40b6-a145-952ea6a7a8cc"
       }
     ],
+    "scr_item": [
+      "SignItem"
+    ],
     "itemInterval": 0,
     "_id": ""
   },

+ 8 - 6
assets/script/game/component/TableView.ts

@@ -12,8 +12,10 @@ const { ccclass, property } = cc._decorator;
 @ccclass
 export default class TableView extends cc.Component {
 
-    @property({ type: [cc.Prefab] })
+    @property({ displayName: '预制条目', type: [cc.Prefab] })
     private pre_item: cc.Prefab[] = [];
+    @property({ displayName: '脚本名', type: [cc.String] })
+    private scr_item: string[] = [];
     /** 间距 */
     @property({ displayName: '间距' })
     private itemInterval: number = 0;
@@ -64,7 +66,7 @@ export default class TableView extends cc.Component {
         }
         this.node.on('srollview-init', this.init, this);
     }
-    
+
     /**
      * @param itemData 列表数据
      * @param isSkipInit 跳过初始化
@@ -162,12 +164,12 @@ export default class TableView extends cc.Component {
         }
         item.x = 0;
         //对item赋值
-        let comp_script = item.getComponent(item.name);
+        let comp_script = item.getComponent(this.scr_item[pfbType]);
         comp_script && comp_script.setItemData(this.itemData[i], this);
         this.itemArr.push(item);
         // cc.log('生成itemNode' + i);
     }
-    
+
     /**
      * 更新centent高
      * @param num  
@@ -336,7 +338,7 @@ export default class TableView extends cc.Component {
                 //给item赋值还有设置位置
                 this.itemArr[i].index = index;
                 this.itemArr[i].y = y;
-                let comp_script = this.itemArr[i].getComponent(this.itemArr[i].name);
+                let comp_script = this.itemArr[i].getComponent(this.scr_item[this.itemArr[i].pfbType]);
                 comp_script && comp_script.setItemData(this.itemData[index], this);
                 return;
             }
@@ -441,7 +443,7 @@ export default class TableView extends cc.Component {
         for (let i = 0; i < this.itemArr.length; i++) {
             if (this.itemArr[i].index === index) {
                 if (item_data) this.itemData[i] = item_data;
-                let comp_script = this.itemArr[i].getComponent(this.itemArr[i].name);
+                let comp_script = this.itemArr[i].getComponent(this.scr_item[this.itemArr[i].pfbType]);
                 comp_script && comp_script.setItemData(this.itemData[index], this);
                 break;
             }

+ 32 - 1
assets/script/game/module/module/sign/Sign.ts

@@ -22,9 +22,40 @@ export default class Sign extends cc.Component {
      * 初始化滚动视图
      */
     private initScollView() {
-        let list_data = [1, 1, 1, 1, 1];
+        let list_data = this.getListData();
         this.scroll_view.node.emit('srollview-init', list_data)
+        cc.log(list_data)
+    }
+
+    private getListData() {
+        let c_sign = this.getSignConfig();
+        let list_data = [];
+        for (let i = 0; i < 30; i++) {
+            let item_data = [];
+            for (let j = 0; j < 3; j++) {
+                let data = c_sign[i];
+                item_data.push(data);
+                i++;
+            }
+            list_data.push(item_data);
+        }
+        return list_data;
+    }
 
+    /** 客户端造的假配置 */
+    private getSignConfig() {
+        let c_sign = [];
+        for (let i = 0; i < 30; i++) {
+            const id = i + 1;
+            let data: any = {};
+            data.id = id;
+            data.reward_type = i % 2;
+            data.count = id;
+            data.login_day = id;
+            data.video_limit = 0;
+            c_sign.push(data);
+        }
+        return c_sign;
     }
     // update (dt) {}
 }

+ 78 - 0
assets/script/game/module/module/sign/SignIconItem.ts

@@ -0,0 +1,78 @@
+
+const { ccclass, property } = cc._decorator;
+/** 天数描边 */
+enum DayOutLineColor {
+    /** 红包 */
+    red_bag = '#EB3A0E' as any,
+    /** 提现 */
+    cash = '#2AB718' as any,
+}
+/**
+ * 签到icon组件
+ * @author 薛鸿潇
+ */
+@ccclass
+export default class SignIconItem extends cc.Component {
+    @property({ displayName: '提现样式', type: cc.Node })
+    private node_cash: cc.Node = null!;
+    @property({ displayName: '红包样式', type: cc.Node })
+    private node_redbag: cc.Node = null!;
+    @property({ displayName: '天数', type: cc.Label })
+    private lbl_day: cc.Label = null!;
+
+    /** 数据 */
+    private icon_data = {
+        id: 0,
+        reward_type: 0,
+        count: 0,
+        login_day: 0,
+        video_limit: 0,
+    }
+    // onLoad () {}
+
+    // start() {
+
+    // }
+
+    /**
+     * 初始化数据
+     */
+    public async setItemData(icon_data) {
+        await this.initIcon(icon_data);
+    }
+
+    /**
+     * 初始化icon
+     * @param icon_data 数据
+     */
+    private initIcon(icon_data) {
+        if (!icon_data) {
+            this.node.active = false;
+            return
+        }
+        this.lbl_day.string = '第' + icon_data.login_day + '天';
+        if (icon_data.reward_type) {
+            this.node_cash.active = true;
+            this.node_redbag.active = false;
+            this.lbl_day.node.getComponent(cc.LabelOutline).color = cc.color(DayOutLineColor.cash);
+        } else {
+            this.node_cash.active = false;
+            this.node_redbag.active = true;
+            this.lbl_day.node.getComponent(cc.LabelOutline).color = cc.color(DayOutLineColor.red_bag);
+        }
+        this.icon_data = icon_data;
+    }
+    /**
+     * 领取奖励
+     */
+    private clickReceiveReward() {
+        if (this.icon_data.reward_type) {
+            
+        } else {
+            
+        }
+    }
+
+
+    // update (dt) {}
+}

+ 9 - 0
assets/script/game/module/module/sign/SignIconItem.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "233bf8b8-4bf1-4749-82b2-7a4920316d19",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 52 - 0
assets/script/game/module/module/sign/SignItem.ts

@@ -0,0 +1,52 @@
+
+const { ccclass, property } = cc._decorator;
+/**
+ * 签到条目 数据分发
+ * @author 薛鸿潇
+ */
+@ccclass
+export default class NewClass extends cc.Component {
+
+    @property({ type: cc.Node, displayName: '位置组件' })
+    private sign_icon_pos: cc.Node[] = [];
+    @property({ type: cc.Prefab })
+    private pre_icon: cc.Prefab = null!;;
+
+    /** icon节点容器 */
+    private arr_icon: Array<cc.Node> = [];
+    onLoad() {
+
+    }
+
+    start() {
+    }
+    /**
+     * list_data
+     * @param list_data 数据列表
+     */
+    public async setItemData(list_data) {
+        await this.initItem(list_data);
+    }
+
+    /**
+     * 数据分发
+     * @param list_data 数据列表
+     */
+    private initItem(list_data) {
+        const n_count = this.sign_icon_pos.length;
+        for (let i = 0; i < n_count; i++) {
+            let item_data = list_data[i];
+            let icon_item = this.arr_icon[i];
+            if (!icon_item) {
+                icon_item = cc.instantiate(this.pre_icon)
+                icon_item.parent = this.node;
+                icon_item.setPosition(this.sign_icon_pos[i].getPosition());
+                this.arr_icon[i] = icon_item;
+            }
+
+            let comp_info = icon_item.getComponent('SignIconItem');
+            comp_info.setItemData(item_data);
+        }
+    }
+    // update (dt) {}
+}

+ 9 - 0
assets/script/game/module/module/sign/SignItem.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "64cb2b40-0a12-4ccb-99ae-4b177b3e2e2b",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}