浏览代码

【修改】 修改追梦界面

Hua 1 年之前
父节点
当前提交
b6888a7a32

+ 2 - 2
assets/resources/edt_prefab/Dream/DreamBrilliant.prefab

@@ -170,7 +170,7 @@
170 170
       "__id__": 1
171 171
     },
172 172
     "asset": {
173
-      "__id__": 0
173
+      "__uuid__": "162988ad-a925-4a36-8cd8-93aa2f510bbf"
174 174
     },
175 175
     "fileId": "0e4oCQTV9AGpwAZZJDM6nX",
176 176
     "sync": false
@@ -181,7 +181,7 @@
181 181
       "__id__": 1
182 182
     },
183 183
     "asset": {
184
-      "__id__": 0
184
+      "__uuid__": "162988ad-a925-4a36-8cd8-93aa2f510bbf"
185 185
     },
186 186
     "fileId": "4eiuNmIiNOCIDEOSZbXjyl",
187 187
     "sync": false

+ 17 - 17
assets/resources/edt_prefab/Dream/DreamBrilliantCell.prefab

@@ -72,8 +72,8 @@
72 72
       "__type__": "TypedArray",
73 73
       "ctor": "Float64Array",
74 74
       "array": [
75
-        0.3,
76
-        981,
75
+        0,
76
+        0,
77 77
         0,
78 78
         0,
79 79
         0,
@@ -199,7 +199,7 @@
199 199
       "__id__": 1
200 200
     },
201 201
     "asset": {
202
-      "__id__": 0
202
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
203 203
     },
204 204
     "fileId": "dd1hVjDoZNl4BHCPykWoJa",
205 205
     "sync": false
@@ -448,7 +448,7 @@
448 448
       "__id__": 1
449 449
     },
450 450
     "asset": {
451
-      "__id__": 0
451
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
452 452
     },
453 453
     "fileId": "3fNg/HCbtHHYr3QAdRqgMa",
454 454
     "sync": false
@@ -481,7 +481,7 @@
481 481
       "__id__": 1
482 482
     },
483 483
     "asset": {
484
-      "__id__": 0
484
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
485 485
     },
486 486
     "fileId": "abYBoZ1tVI9I44zSEW/scy",
487 487
     "sync": false
@@ -588,7 +588,7 @@
588 588
       "__id__": 1
589 589
     },
590 590
     "asset": {
591
-      "__id__": 0
591
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
592 592
     },
593 593
     "fileId": "c7NcHEkzBLFLvL6aLSPG7Y",
594 594
     "sync": false
@@ -702,7 +702,7 @@
702 702
       "__id__": 1
703 703
     },
704 704
     "asset": {
705
-      "__id__": 0
705
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
706 706
     },
707 707
     "fileId": "62iRz/kUxJAKXNTYFs+iBg",
708 708
     "sync": false
@@ -809,7 +809,7 @@
809 809
       "__id__": 1
810 810
     },
811 811
     "asset": {
812
-      "__id__": 0
812
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
813 813
     },
814 814
     "fileId": "999KW5/GFDPbH46hvoa6ka",
815 815
     "sync": false
@@ -916,7 +916,7 @@
916 916
       "__id__": 1
917 917
     },
918 918
     "asset": {
919
-      "__id__": 0
919
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
920 920
     },
921 921
     "fileId": "20LtarpztIwrTb1sAE/fKo",
922 922
     "sync": false
@@ -1021,7 +1021,7 @@
1021 1021
       "__id__": 1
1022 1022
     },
1023 1023
     "asset": {
1024
-      "__id__": 0
1024
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
1025 1025
     },
1026 1026
     "fileId": "fa1B+9kltE4oZBYTs5aDd6",
1027 1027
     "sync": false
@@ -1128,7 +1128,7 @@
1128 1128
       "__id__": 1
1129 1129
     },
1130 1130
     "asset": {
1131
-      "__id__": 0
1131
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
1132 1132
     },
1133 1133
     "fileId": "7fil3nc/dBfYhKgT9hDeNB",
1134 1134
     "sync": false
@@ -1235,7 +1235,7 @@
1235 1235
       "__id__": 1
1236 1236
     },
1237 1237
     "asset": {
1238
-      "__id__": 0
1238
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
1239 1239
     },
1240 1240
     "fileId": "3aobmgejpAz6bqGHA4wJWn",
1241 1241
     "sync": false
@@ -1342,7 +1342,7 @@
1342 1342
       "__id__": 1
1343 1343
     },
1344 1344
     "asset": {
1345
-      "__id__": 0
1345
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
1346 1346
     },
1347 1347
     "fileId": "3atQ+wv5JDF5tIZD3bgo3B",
1348 1348
     "sync": false
@@ -1520,7 +1520,7 @@
1520 1520
       "__id__": 1
1521 1521
     },
1522 1522
     "asset": {
1523
-      "__id__": 0
1523
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
1524 1524
     },
1525 1525
     "fileId": "fdlJLHyBlMbJCzFvEzLFC8",
1526 1526
     "sync": false
@@ -1627,7 +1627,7 @@
1627 1627
       "__id__": 1
1628 1628
     },
1629 1629
     "asset": {
1630
-      "__id__": 0
1630
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
1631 1631
     },
1632 1632
     "fileId": "fdFDmrTBBPVKKu8KdtBwZT",
1633 1633
     "sync": false
@@ -1654,7 +1654,7 @@
1654 1654
       "__id__": 1
1655 1655
     },
1656 1656
     "asset": {
1657
-      "__id__": 0
1657
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
1658 1658
     },
1659 1659
     "fileId": "81abvMC6RLc7Z6r5+KHdWC",
1660 1660
     "sync": false
@@ -1665,7 +1665,7 @@
1665 1665
       "__id__": 1
1666 1666
     },
1667 1667
     "asset": {
1668
-      "__id__": 0
1668
+      "__uuid__": "c553aa50-1ceb-47c3-b0f9-0bb3eafd631a"
1669 1669
     },
1670 1670
     "fileId": "5aYtojorhBfqoIJWz2FJXJ",
1671 1671
     "sync": false

+ 189 - 0
assets/resources/edt_prefab/Dream/DreamDropRecord.prefab

@@ -0,0 +1,189 @@
1
+[
2
+  {
3
+    "__type__": "cc.Prefab",
4
+    "_name": "",
5
+    "_objFlags": 0,
6
+    "_native": "",
7
+    "data": {
8
+      "__id__": 1
9
+    },
10
+    "optimizationPolicy": 0,
11
+    "asyncLoadAssets": false,
12
+    "readonly": false
13
+  },
14
+  {
15
+    "__type__": "cc.Node",
16
+    "_name": "DreamBrilliant",
17
+    "_objFlags": 0,
18
+    "_parent": null,
19
+    "_children": [
20
+      {
21
+        "__id__": 2
22
+      }
23
+    ],
24
+    "_active": true,
25
+    "_components": [],
26
+    "_prefab": {
27
+      "__id__": 5
28
+    },
29
+    "_opacity": 255,
30
+    "_color": {
31
+      "__type__": "cc.Color",
32
+      "r": 255,
33
+      "g": 255,
34
+      "b": 255,
35
+      "a": 255
36
+    },
37
+    "_contentSize": {
38
+      "__type__": "cc.Size",
39
+      "width": 810,
40
+      "height": 1440
41
+    },
42
+    "_anchorPoint": {
43
+      "__type__": "cc.Vec2",
44
+      "x": 0.5,
45
+      "y": 0.5
46
+    },
47
+    "_trs": {
48
+      "__type__": "TypedArray",
49
+      "ctor": "Float64Array",
50
+      "array": [
51
+        0,
52
+        0,
53
+        0,
54
+        0,
55
+        0,
56
+        0,
57
+        1,
58
+        1,
59
+        1,
60
+        1
61
+      ]
62
+    },
63
+    "_eulerAngles": {
64
+      "__type__": "cc.Vec3",
65
+      "x": 0,
66
+      "y": 0,
67
+      "z": 0
68
+    },
69
+    "_skewX": 0,
70
+    "_skewY": 0,
71
+    "_is3DNode": false,
72
+    "_groupIndex": 0,
73
+    "groupIndex": 0,
74
+    "_id": ""
75
+  },
76
+  {
77
+    "__type__": "cc.Node",
78
+    "_name": "Bottom",
79
+    "_objFlags": 0,
80
+    "_parent": {
81
+      "__id__": 1
82
+    },
83
+    "_children": [],
84
+    "_active": true,
85
+    "_components": [
86
+      {
87
+        "__id__": 3
88
+      }
89
+    ],
90
+    "_prefab": {
91
+      "__id__": 4
92
+    },
93
+    "_opacity": 255,
94
+    "_color": {
95
+      "__type__": "cc.Color",
96
+      "r": 255,
97
+      "g": 255,
98
+      "b": 255,
99
+      "a": 255
100
+    },
101
+    "_contentSize": {
102
+      "__type__": "cc.Size",
103
+      "width": 810,
104
+      "height": 1063
105
+    },
106
+    "_anchorPoint": {
107
+      "__type__": "cc.Vec2",
108
+      "x": 0.5,
109
+      "y": 0
110
+    },
111
+    "_trs": {
112
+      "__type__": "TypedArray",
113
+      "ctor": "Float64Array",
114
+      "array": [
115
+        0,
116
+        -720,
117
+        0,
118
+        0,
119
+        0,
120
+        0,
121
+        1,
122
+        1,
123
+        1,
124
+        1
125
+      ]
126
+    },
127
+    "_eulerAngles": {
128
+      "__type__": "cc.Vec3",
129
+      "x": 0,
130
+      "y": 0,
131
+      "z": 0
132
+    },
133
+    "_skewX": 0,
134
+    "_skewY": 0,
135
+    "_is3DNode": false,
136
+    "_groupIndex": 0,
137
+    "groupIndex": 0,
138
+    "_id": ""
139
+  },
140
+  {
141
+    "__type__": "cc.Widget",
142
+    "_name": "",
143
+    "_objFlags": 0,
144
+    "node": {
145
+      "__id__": 2
146
+    },
147
+    "_enabled": true,
148
+    "alignMode": 1,
149
+    "_target": null,
150
+    "_alignFlags": 45,
151
+    "_left": 0,
152
+    "_right": 0,
153
+    "_top": 377,
154
+    "_bottom": 0,
155
+    "_verticalCenter": 0,
156
+    "_horizontalCenter": 0,
157
+    "_isAbsLeft": true,
158
+    "_isAbsRight": true,
159
+    "_isAbsTop": true,
160
+    "_isAbsBottom": true,
161
+    "_isAbsHorizontalCenter": true,
162
+    "_isAbsVerticalCenter": true,
163
+    "_originalWidth": 0,
164
+    "_originalHeight": 300,
165
+    "_id": ""
166
+  },
167
+  {
168
+    "__type__": "cc.PrefabInfo",
169
+    "root": {
170
+      "__id__": 1
171
+    },
172
+    "asset": {
173
+      "__id__": 0
174
+    },
175
+    "fileId": "0e4oCQTV9AGpwAZZJDM6nX",
176
+    "sync": false
177
+  },
178
+  {
179
+    "__type__": "cc.PrefabInfo",
180
+    "root": {
181
+      "__id__": 1
182
+    },
183
+    "asset": {
184
+      "__id__": 0
185
+    },
186
+    "fileId": "4eiuNmIiNOCIDEOSZbXjyl",
187
+    "sync": false
188
+  }
189
+]

+ 8 - 0
assets/resources/edt_prefab/Dream/DreamDropRecord.prefab.meta

@@ -0,0 +1,8 @@
1
+{
2
+  "ver": "1.2.6",
3
+  "uuid": "9575aabc-d4c7-4082-a65a-6524ffa49cc5",
4
+  "optimizationPolicy": "AUTO",
5
+  "asyncLoadAssets": false,
6
+  "readonly": false,
7
+  "subMetas": {}
8
+}

文件差异内容过多而无法显示
+ 262 - 146
assets/resources/edt_prefab/Dream/DreamMain.prefab


+ 41 - 15
assets/script/app/view/UIInfo.js

@@ -11,20 +11,33 @@
11 11
 		BoxContainsMain:8,
12 12
 		BoxItem:9,
13 13
 		ButtonSelect1:10,
14
-		DreamBrilliant:11,
15
-		DreamBrilliantCell:12,
16
-		DreamMain:13,
17
-		DreamPopular:14,
18
-		DreamStatistics:15,
19
-		DreamStatisticsCell:16,
20
-		DreamStatisticsFilter:17,
21
-		DropPercentageItem:18,
22
-		DropRecordMain:19,
23
-		DropWastageItem:20,
24
-		FilterMain:21,
25
-		HeadIcon:22,
26
-		ItemIcon:23,
27
-		NavigationMain:24
14
+		ButtonSelect2:11,
15
+		debug_alert:12,
16
+		debug_enter:13,
17
+		DreamBrilliant:14,
18
+		DreamBrilliantCell:15,
19
+		DreamDropRecord:16,
20
+		DreamMain:17,
21
+		DreamPopular:18,
22
+		DreamStatistics:19,
23
+		DreamStatisticsCell:20,
24
+		DreamStatisticsFilter:21,
25
+		DropPercentageItem:22,
26
+		DropRecordMain:23,
27
+		DropWastageItem:24,
28
+		FilterMain:25,
29
+		HeadIcon:26,
30
+		ItemIcon:27,
31
+		NavigationMain:28,
32
+		prefab_headicon_change:29,
33
+		prefab_headIcon_choose_item:30,
34
+		prefab_identitycard_change:31,
35
+		prefab_nick_change:32,
36
+		prefab_password_change:33,
37
+		prefab_personal_alert:34,
38
+		prefab_steam_change:35,
39
+		ShopItem:36,
40
+		ShopMain:37
28 41
 
29 42
 }
30 43
 window.JMC.UIPath = {
@@ -39,8 +52,12 @@ window.JMC.UIPath = {
39 52
 		[window.JMC.UIEnum.BoxContainsMain] : "BoxContains/BoxContainsMain",
40 53
 		[window.JMC.UIEnum.BoxItem] : "BoxContains/BoxItem",
41 54
 		[window.JMC.UIEnum.ButtonSelect1] : "Common/ButtonSelect1",
55
+		[window.JMC.UIEnum.ButtonSelect2] : "Common/ButtonSelect2",
56
+		[window.JMC.UIEnum.debug_alert] : "Debug/debug_alert",
57
+		[window.JMC.UIEnum.debug_enter] : "Debug/debug_enter",
42 58
 		[window.JMC.UIEnum.DreamBrilliant] : "Dream/DreamBrilliant",
43 59
 		[window.JMC.UIEnum.DreamBrilliantCell] : "Dream/DreamBrilliantCell",
60
+		[window.JMC.UIEnum.DreamDropRecord] : "Dream/DreamDropRecord",
44 61
 		[window.JMC.UIEnum.DreamMain] : "Dream/DreamMain",
45 62
 		[window.JMC.UIEnum.DreamPopular] : "Dream/DreamPopular",
46 63
 		[window.JMC.UIEnum.DreamStatistics] : "Dream/DreamStatistics",
@@ -52,6 +69,15 @@ window.JMC.UIPath = {
52 69
 		[window.JMC.UIEnum.FilterMain] : "Filter/FilterMain",
53 70
 		[window.JMC.UIEnum.HeadIcon] : "Common/HeadIcon",
54 71
 		[window.JMC.UIEnum.ItemIcon] : "Common/ItemIcon",
55
-		[window.JMC.UIEnum.NavigationMain] : "Navigation/NavigationMain"
72
+		[window.JMC.UIEnum.NavigationMain] : "Navigation/NavigationMain",
73
+		[window.JMC.UIEnum.prefab_headicon_change] : "Personal/prefab_headicon_change",
74
+		[window.JMC.UIEnum.prefab_headIcon_choose_item] : "Personal/prefab_headIcon_choose_item",
75
+		[window.JMC.UIEnum.prefab_identitycard_change] : "Personal/prefab_identitycard_change",
76
+		[window.JMC.UIEnum.prefab_nick_change] : "Personal/prefab_nick_change",
77
+		[window.JMC.UIEnum.prefab_password_change] : "Personal/prefab_password_change",
78
+		[window.JMC.UIEnum.prefab_personal_alert] : "Personal/prefab_personal_alert",
79
+		[window.JMC.UIEnum.prefab_steam_change] : "Personal/prefab_steam_change",
80
+		[window.JMC.UIEnum.ShopItem] : "Shop/ShopItem",
81
+		[window.JMC.UIEnum.ShopMain] : "Shop/ShopMain"
56 82
 
57 83
 }

+ 3 - 17
assets/script/app/view/common/ButtonSelect1.js

@@ -20,23 +20,9 @@ cc.Class({
20 20
             type: cc.Label,
21 21
             serializable: true,
22 22
         },
23
-        // bar: {
24
-        //     get () {
25
-        //         return this._bar;
26
-        //     },
27
-        //     set (value) {
28
-        //         this._bar = value;
29
-        //     }
30
-        // },
31 23
     },
32 24
 
33
-    // LIFE-CYCLE CALLBACKS:
34
-
35
-    // onLoad () {},
36
-
37
-    start () {
38
-
39
-    },
40
-
41
-    // update (dt) {},
25
+    setSelect(b) {
26
+        this.imageLight.node.active = b
27
+    }
42 28
 });

+ 13 - 7
assets/script/app/view/common/ViewBase.js

@@ -5,9 +5,13 @@ cc.Class({
5 5
 
6 6
     },
7 7
     
8
-    createComponent(type, parent, param, cb) {
8
+    initView(param) {
9
+
10
+    },
11
+
12
+    createComponent(type, parent, param, cb, cache = false) {
9 13
         let prefabPath = G.UIMgr.defaultUIPath + JMC.UIPath[type];
10
-        this.creawteUI(prefabPath, parent, param)
14
+        this.creawteUI(prefabPath, parent, param, cb, cache)
11 15
     },
12 16
 
13 17
     creawteUI(prefabPath, parent, param, cb, cache = false) {
@@ -25,23 +29,25 @@ cc.Class({
25 29
             }
26 30
 
27 31
             let node = cc.instantiate(prefab);
28
-            if (cb) {
29
-                cb(alert, 'willShow', undefined);
30
-            }
31 32
 
32 33
             let ret = self.safeAddChild(parent, node);
33 34
             if (!ret) {
34 35
                 return;
35 36
             }
36 37
 
37
-            let viewBase = node.getComponent(ViewBase);
38
+            let viewBase = node.getComponent("ViewBase");
38 39
             if (viewBase) {
39
-                viewBase.init(param)
40
+                viewBase.initView(param)
40 41
             }
41 42
 
42 43
             if (!cache) {
43 44
                 cc.loader.releaseRes(prefabPath);
44 45
             }
46
+
47
+            if (cb) {
48
+                cb(node, 'ok', undefined);
49
+            }
50
+
45 51
         });
46 52
     },
47 53
 

+ 47 - 10
assets/script/app/view/dream/DreamMain.js

@@ -27,10 +27,16 @@ cc.Class({
27 27
             type: ButtonSelect1,
28 28
             serializable: true,
29 29
         },
30
+
31
+        viewContent: {
32
+            default: null,
33
+            type: cc.Node,
34
+            serializable: true,
35
+        }
30 36
     },
31 37
 
32 38
     onLoad () {
33
-        self.buttons = [
39
+        this.buttons = [
34 40
             this.button1,
35 41
             this.button2,
36 42
             this.button3,
@@ -38,10 +44,10 @@ cc.Class({
38 44
         ];
39 45
 
40 46
         this.views = [
41
-            {type:JMC.UIEnum.DreamMain, view:null, initing:false},
42
-            {type:JMC.UIEnum.DreamMain, view:null, initing:false},
43
-            {type:JMC.UIEnum.DreamMain, view:null, initing:false},
44
-            {type:JMC.UIEnum.DreamMain, view:null, initing:false},
47
+            {type:JMC.UIEnum.DreamPopular, view:null, initing:false},
48
+            {type:JMC.UIEnum.DreamBrilliant, view:null, initing:false},
49
+            {type:JMC.UIEnum.DreamDropRecord, view:null, initing:false},
50
+            {type:JMC.UIEnum.DreamStatistics, view:null, initing:false},
45 51
         ];
46 52
 
47 53
         this.curViewType = null
@@ -50,17 +56,48 @@ cc.Class({
50 56
     
51 57
     onClickTitle(event, customEventData) {
52 58
         let index = parseInt(customEventData)
53
-        let viewType = this.views[index]
54
-
55
-        this.curViewType = viewType;
59
+        this.updateButtonSelect(index);
60
+        this.curViewType = index;
56 61
         this.createOrShowView(this.curViewType)
62
+    },
57 63
 
58
-        cc.log(G.CfgMgr.battleBoxAwardConfig.getByMultipleKey(2001, 10001));
59
-        cc.log(G.CfgMgr.battleBoxConfig.getByMainKey(2001));
64
+    updateButtonSelect(index) {
65
+        for (let i = 0; i < this.buttons.length; i++) {
66
+            const b = this.buttons[i];
67
+            b.setSelect(index == i)
68
+        }
60 69
     },
61 70
 
62 71
     createOrShowView(type) {
72
+        let viewData = this.views[type]
73
+        for (let vd of this.views) {
74
+            if (vd.view == null) {
75
+                continue
76
+            }
77
+            vd.view.active = false;
78
+        }
63 79
 
80
+        if (viewData.initing) {
81
+            return
82
+        }
83
+
84
+        if (viewData.view != null) {
85
+            viewData.view.active = true;
86
+            return
87
+        }
88
+
89
+        viewData.initing = true
90
+        let self = this
91
+        this.createComponent(viewData.type, this.viewContent, null, function(node, status) {
92
+            if (status != 'ok') {
93
+                return
94
+            }
95
+
96
+            viewData.view = node
97
+            viewData.initing = false
98
+            node.active = self.curViewType == type
99
+        })
64 100
     }
101
+
65 102
     // update (dt) {},
66 103
 });

+ 1 - 1
assets/script/core/model/UIMgr.js

@@ -77,7 +77,7 @@ let UIMgr = {
77 77
 
78 78
             let viewBase = node.getComponent(ViewBase);
79 79
             if (viewBase) {
80
-                // viewBase.init(param)
80
+                viewBase.initView(param)
81 81
             }
82 82
 
83 83
             if (!cache) {