Bladeren bron

【修改】 添加UI管理器

Hua 1 jaar geleden
bovenliggende
commit
e67376d847

+ 173 - 50
assets/edt_scene/scene_main.fire

@@ -17,7 +17,7 @@
17 17
         "__id__": 2
18 18
       },
19 19
       {
20
-        "__id__": 124
20
+        "__id__": 127
21 21
       }
22 22
     ],
23 23
     "_active": false,
@@ -78,22 +78,22 @@
78 78
         "__id__": 5
79 79
       },
80 80
       {
81
-        "__id__": 103
81
+        "__id__": 106
82 82
       },
83 83
       {
84
-        "__id__": 106
84
+        "__id__": 109
85 85
       },
86 86
       {
87
-        "__id__": 119
87
+        "__id__": 122
88 88
       }
89 89
     ],
90 90
     "_active": true,
91 91
     "_components": [
92 92
       {
93
-        "__id__": 122
93
+        "__id__": 125
94 94
       },
95 95
       {
96
-        "__id__": 123
96
+        "__id__": 126
97 97
       }
98 98
     ],
99 99
     "_prefab": null,
@@ -183,7 +183,7 @@
183 183
       "array": [
184 184
         0,
185 185
         0,
186
-        527.4094709047232,
186
+        336.01785666836224,
187 187
         0,
188 188
         0,
189 189
         0,
@@ -257,7 +257,7 @@
257 257
     "_active": true,
258 258
     "_components": [
259 259
       {
260
-        "__id__": 102
260
+        "__id__": 105
261 261
       }
262 262
     ],
263 263
     "_prefab": null,
@@ -324,12 +324,15 @@
324 324
       },
325 325
       {
326 326
         "__id__": 100
327
+      },
328
+      {
329
+        "__id__": 102
327 330
       }
328 331
     ],
329 332
     "_active": true,
330 333
     "_components": [
331 334
       {
332
-        "__id__": 101
335
+        "__id__": 104
333 336
       }
334 337
     ],
335 338
     "_prefab": null,
@@ -4133,6 +4136,95 @@
4133 4136
   },
4134 4137
   {
4135 4138
     "__type__": "cc.Node",
4139
+    "_name": "Toast",
4140
+    "_objFlags": 0,
4141
+    "_parent": {
4142
+      "__id__": 6
4143
+    },
4144
+    "_children": [],
4145
+    "_active": true,
4146
+    "_components": [
4147
+      {
4148
+        "__id__": 101
4149
+      }
4150
+    ],
4151
+    "_prefab": null,
4152
+    "_opacity": 255,
4153
+    "_color": {
4154
+      "__type__": "cc.Color",
4155
+      "r": 255,
4156
+      "g": 255,
4157
+      "b": 255,
4158
+      "a": 255
4159
+    },
4160
+    "_contentSize": {
4161
+      "__type__": "cc.Size",
4162
+      "width": 810,
4163
+      "height": 1440
4164
+    },
4165
+    "_anchorPoint": {
4166
+      "__type__": "cc.Vec2",
4167
+      "x": 0.5,
4168
+      "y": 0.5
4169
+    },
4170
+    "_trs": {
4171
+      "__type__": "TypedArray",
4172
+      "ctor": "Float64Array",
4173
+      "array": [
4174
+        0,
4175
+        0,
4176
+        0,
4177
+        0,
4178
+        0,
4179
+        0,
4180
+        1,
4181
+        1,
4182
+        1,
4183
+        1
4184
+      ]
4185
+    },
4186
+    "_eulerAngles": {
4187
+      "__type__": "cc.Vec3",
4188
+      "x": 0,
4189
+      "y": 0,
4190
+      "z": 0
4191
+    },
4192
+    "_skewX": 0,
4193
+    "_skewY": 0,
4194
+    "_is3DNode": false,
4195
+    "_groupIndex": 0,
4196
+    "groupIndex": 0,
4197
+    "_id": "ccYwTn75lEXb/Ea+5EyORl"
4198
+  },
4199
+  {
4200
+    "__type__": "cc.Widget",
4201
+    "_name": "",
4202
+    "_objFlags": 0,
4203
+    "node": {
4204
+      "__id__": 100
4205
+    },
4206
+    "_enabled": true,
4207
+    "alignMode": 1,
4208
+    "_target": null,
4209
+    "_alignFlags": 45,
4210
+    "_left": 0,
4211
+    "_right": 0,
4212
+    "_top": 0,
4213
+    "_bottom": 0,
4214
+    "_verticalCenter": 0,
4215
+    "_horizontalCenter": 0,
4216
+    "_isAbsLeft": true,
4217
+    "_isAbsRight": true,
4218
+    "_isAbsTop": true,
4219
+    "_isAbsBottom": true,
4220
+    "_isAbsHorizontalCenter": true,
4221
+    "_isAbsVerticalCenter": true,
4222
+    "_originalWidth": 0,
4223
+    "_originalHeight": 0,
4224
+    "_id": "13JGuAVupJ6rcG4E9YoixL"
4225
+  },
4226
+  {
4227
+    "__type__": "cc.Node",
4136 4228
     "_name": "UI",
4137 4229
     "_objFlags": 0,
4138 4230
     "_parent": {
@@ -4140,7 +4232,11 @@
4140 4232
     },
4141 4233
     "_children": [],
4142 4234
     "_active": true,
4143
-    "_components": [],
4235
+    "_components": [
4236
+      {
4237
+        "__id__": 103
4238
+      }
4239
+    ],
4144 4240
     "_prefab": null,
4145 4241
     "_opacity": 255,
4146 4242
     "_color": {
@@ -4152,8 +4248,8 @@
4152 4248
     },
4153 4249
     "_contentSize": {
4154 4250
       "__type__": "cc.Size",
4155
-      "width": 0,
4156
-      "height": 0
4251
+      "width": 810,
4252
+      "height": 1440
4157 4253
     },
4158 4254
     "_anchorPoint": {
4159 4255
       "__type__": "cc.Vec2",
@@ -4194,6 +4290,33 @@
4194 4290
     "_name": "",
4195 4291
     "_objFlags": 0,
4196 4292
     "node": {
4293
+      "__id__": 102
4294
+    },
4295
+    "_enabled": true,
4296
+    "alignMode": 1,
4297
+    "_target": null,
4298
+    "_alignFlags": 45,
4299
+    "_left": 0,
4300
+    "_right": 0,
4301
+    "_top": 0,
4302
+    "_bottom": 0,
4303
+    "_verticalCenter": 0,
4304
+    "_horizontalCenter": 0,
4305
+    "_isAbsLeft": true,
4306
+    "_isAbsRight": true,
4307
+    "_isAbsTop": true,
4308
+    "_isAbsBottom": true,
4309
+    "_isAbsHorizontalCenter": true,
4310
+    "_isAbsVerticalCenter": true,
4311
+    "_originalWidth": 0,
4312
+    "_originalHeight": 0,
4313
+    "_id": "e8WegFKIBE9qDRBXqsVnGF"
4314
+  },
4315
+  {
4316
+    "__type__": "cc.Widget",
4317
+    "_name": "",
4318
+    "_objFlags": 0,
4319
+    "node": {
4197 4320
       "__id__": 6
4198 4321
     },
4199 4322
     "_enabled": true,
@@ -4254,10 +4377,10 @@
4254 4377
     "_active": true,
4255 4378
     "_components": [
4256 4379
       {
4257
-        "__id__": 104
4380
+        "__id__": 107
4258 4381
       },
4259 4382
       {
4260
-        "__id__": 105
4383
+        "__id__": 108
4261 4384
       }
4262 4385
     ],
4263 4386
     "_prefab": null,
@@ -4313,7 +4436,7 @@
4313 4436
     "_name": "",
4314 4437
     "_objFlags": 0,
4315 4438
     "node": {
4316
-      "__id__": 103
4439
+      "__id__": 106
4317 4440
     },
4318 4441
     "_enabled": true,
4319 4442
     "_alertList": [],
@@ -4324,7 +4447,7 @@
4324 4447
     "_name": "",
4325 4448
     "_objFlags": 0,
4326 4449
     "node": {
4327
-      "__id__": 103
4450
+      "__id__": 106
4328 4451
     },
4329 4452
     "_enabled": true,
4330 4453
     "alignMode": 1,
@@ -4355,25 +4478,25 @@
4355 4478
     },
4356 4479
     "_children": [
4357 4480
       {
4358
-        "__id__": 107
4359
-      },
4360
-      {
4361 4481
         "__id__": 110
4362 4482
       },
4363 4483
       {
4364 4484
         "__id__": 113
4485
+      },
4486
+      {
4487
+        "__id__": 116
4365 4488
       }
4366 4489
     ],
4367 4490
     "_active": false,
4368 4491
     "_components": [
4369 4492
       {
4370
-        "__id__": 116
4493
+        "__id__": 119
4371 4494
       },
4372 4495
       {
4373
-        "__id__": 117
4496
+        "__id__": 120
4374 4497
       },
4375 4498
       {
4376
-        "__id__": 118
4499
+        "__id__": 121
4377 4500
       }
4378 4501
     ],
4379 4502
     "_prefab": null,
@@ -4429,16 +4552,16 @@
4429 4552
     "_name": "bg",
4430 4553
     "_objFlags": 0,
4431 4554
     "_parent": {
4432
-      "__id__": 106
4555
+      "__id__": 109
4433 4556
     },
4434 4557
     "_children": [],
4435 4558
     "_active": true,
4436 4559
     "_components": [
4437 4560
       {
4438
-        "__id__": 108
4561
+        "__id__": 111
4439 4562
       },
4440 4563
       {
4441
-        "__id__": 109
4564
+        "__id__": 112
4442 4565
       }
4443 4566
     ],
4444 4567
     "_prefab": null,
@@ -4494,7 +4617,7 @@
4494 4617
     "_name": "",
4495 4618
     "_objFlags": 0,
4496 4619
     "node": {
4497
-      "__id__": 107
4620
+      "__id__": 110
4498 4621
     },
4499 4622
     "_enabled": true,
4500 4623
     "_materials": [],
@@ -4522,7 +4645,7 @@
4522 4645
     "_name": "",
4523 4646
     "_objFlags": 0,
4524 4647
     "node": {
4525
-      "__id__": 107
4648
+      "__id__": 110
4526 4649
     },
4527 4650
     "_enabled": true,
4528 4651
     "alignMode": 1,
@@ -4549,16 +4672,16 @@
4549 4672
     "_name": "icon",
4550 4673
     "_objFlags": 0,
4551 4674
     "_parent": {
4552
-      "__id__": 106
4675
+      "__id__": 109
4553 4676
     },
4554 4677
     "_children": [],
4555 4678
     "_active": true,
4556 4679
     "_components": [
4557 4680
       {
4558
-        "__id__": 111
4681
+        "__id__": 114
4559 4682
       },
4560 4683
       {
4561
-        "__id__": 112
4684
+        "__id__": 115
4562 4685
       }
4563 4686
     ],
4564 4687
     "_prefab": null,
@@ -4614,7 +4737,7 @@
4614 4737
     "_name": "",
4615 4738
     "_objFlags": 0,
4616 4739
     "node": {
4617
-      "__id__": 110
4740
+      "__id__": 113
4618 4741
     },
4619 4742
     "_enabled": true,
4620 4743
     "_materials": [],
@@ -4642,7 +4765,7 @@
4642 4765
     "_name": "",
4643 4766
     "_objFlags": 0,
4644 4767
     "node": {
4645
-      "__id__": 110
4768
+      "__id__": 113
4646 4769
     },
4647 4770
     "_enabled": true,
4648 4771
     "_defaultClip": {
@@ -4661,16 +4784,16 @@
4661 4784
     "_name": "precent",
4662 4785
     "_objFlags": 0,
4663 4786
     "_parent": {
4664
-      "__id__": 106
4787
+      "__id__": 109
4665 4788
     },
4666 4789
     "_children": [],
4667 4790
     "_active": true,
4668 4791
     "_components": [
4669 4792
       {
4670
-        "__id__": 114
4793
+        "__id__": 117
4671 4794
       },
4672 4795
       {
4673
-        "__id__": 115
4796
+        "__id__": 118
4674 4797
       }
4675 4798
     ],
4676 4799
     "_prefab": null,
@@ -4726,7 +4849,7 @@
4726 4849
     "_name": "",
4727 4850
     "_objFlags": 0,
4728 4851
     "node": {
4729
-      "__id__": 113
4852
+      "__id__": 116
4730 4853
     },
4731 4854
     "_enabled": true,
4732 4855
     "_materials": [],
@@ -4754,7 +4877,7 @@
4754 4877
     "_name": "",
4755 4878
     "_objFlags": 0,
4756 4879
     "node": {
4757
-      "__id__": 113
4880
+      "__id__": 116
4758 4881
     },
4759 4882
     "_enabled": true,
4760 4883
     "_color": {
@@ -4772,11 +4895,11 @@
4772 4895
     "_name": "",
4773 4896
     "_objFlags": 0,
4774 4897
     "node": {
4775
-      "__id__": 106
4898
+      "__id__": 109
4776 4899
     },
4777 4900
     "_enabled": true,
4778 4901
     "loadPrecentLabel": {
4779
-      "__id__": 114
4902
+      "__id__": 117
4780 4903
     },
4781 4904
     "_id": "51NDBXEXxFXphPs+dV4T9s"
4782 4905
   },
@@ -4785,7 +4908,7 @@
4785 4908
     "_name": "",
4786 4909
     "_objFlags": 0,
4787 4910
     "node": {
4788
-      "__id__": 106
4911
+      "__id__": 109
4789 4912
     },
4790 4913
     "_enabled": true,
4791 4914
     "alignMode": 1,
@@ -4812,7 +4935,7 @@
4812 4935
     "_name": "",
4813 4936
     "_objFlags": 0,
4814 4937
     "node": {
4815
-      "__id__": 106
4938
+      "__id__": 109
4816 4939
     },
4817 4940
     "_enabled": true,
4818 4941
     "_id": "3ekKTLjJxP+4/QG6ngUXhj"
@@ -4828,10 +4951,10 @@
4828 4951
     "_active": true,
4829 4952
     "_components": [
4830 4953
       {
4831
-        "__id__": 120
4954
+        "__id__": 123
4832 4955
       },
4833 4956
       {
4834
-        "__id__": 121
4957
+        "__id__": 124
4835 4958
       }
4836 4959
     ],
4837 4960
     "_prefab": null,
@@ -4887,7 +5010,7 @@
4887 5010
     "_name": "",
4888 5011
     "_objFlags": 0,
4889 5012
     "node": {
4890
-      "__id__": 119
5013
+      "__id__": 122
4891 5014
     },
4892 5015
     "_enabled": true,
4893 5016
     "itemPrefab": {
@@ -4904,7 +5027,7 @@
4904 5027
     "_name": "",
4905 5028
     "_objFlags": 0,
4906 5029
     "node": {
4907
-      "__id__": 119
5030
+      "__id__": 122
4908 5031
     },
4909 5032
     "_enabled": true,
4910 5033
     "alignMode": 1,
@@ -4981,7 +5104,7 @@
4981 5104
     "_active": true,
4982 5105
     "_components": [
4983 5106
       {
4984
-        "__id__": 125
5107
+        "__id__": 128
4985 5108
       }
4986 5109
     ],
4987 5110
     "_prefab": null,
@@ -5037,17 +5160,17 @@
5037 5160
     "_name": "",
5038 5161
     "_objFlags": 0,
5039 5162
     "node": {
5040
-      "__id__": 124
5163
+      "__id__": 127
5041 5164
     },
5042 5165
     "_enabled": true,
5043 5166
     "alertCtrl": {
5044
-      "__id__": 104
5167
+      "__id__": 107
5045 5168
     },
5046 5169
     "loadingCtrl": {
5047
-      "__id__": 116
5170
+      "__id__": 119
5048 5171
     },
5049 5172
     "toastCtrl": {
5050
-      "__id__": 120
5173
+      "__id__": 123
5051 5174
     },
5052 5175
     "reconnCtrl": null,
5053 5176
     "sceneName": "Main",

+ 13 - 13
assets/resources/edt_prefab/Bag/BagMain.prefab

@@ -1694,8 +1694,8 @@
1694 1694
       }
1695 1695
     ],
1696 1696
     "_useOriginalSize": true,
1697
-    "_string": "---",
1698
-    "_N$string": "---",
1697
+    "_string": "",
1698
+    "_N$string": "",
1699 1699
     "_fontSize": 20,
1700 1700
     "_lineHeight": 25,
1701 1701
     "_enableWrapText": false,
@@ -4983,17 +4983,6 @@
4983 4983
     "sync": false
4984 4984
   },
4985 4985
   {
4986
-    "__type__": "d9d76Ag+vtEiKQviijW9rr0",
4987
-    "_name": "",
4988
-    "_objFlags": 0,
4989
-    "node": {
4990
-      "__id__": 1
4991
-    },
4992
-    "_enabled": true,
4993
-    "_alertList": [],
4994
-    "_id": ""
4995
-  },
4996
-  {
4997 4986
     "__type__": "cc.Widget",
4998 4987
     "_name": "",
4999 4988
     "_objFlags": 0,
@@ -5021,6 +5010,17 @@
5021 5010
     "_id": ""
5022 5011
   },
5023 5012
   {
5013
+    "__type__": "34c50r/l89GbL4vjuzGvS5f",
5014
+    "_name": "",
5015
+    "_objFlags": 0,
5016
+    "node": {
5017
+      "__id__": 1
5018
+    },
5019
+    "_enabled": true,
5020
+    "type": 0,
5021
+    "_id": ""
5022
+  },
5023
+  {
5024 5024
     "__type__": "cc.PrefabInfo",
5025 5025
     "root": {
5026 5026
       "__id__": 1

+ 8 - 0
assets/script/app/constants/AppConstants.js

@@ -46,4 +46,12 @@ window.JMC.ORDER_STATUS = cc.Enum({
46 46
     SUBMIT_ORDER_SUCCEEDED: 4, // 提交订单成功
47 47
     SUBMIT_ORDER_FAILED: 5,    // 提交订单失败
48 48
     SUBMIT_ORDER_UNKOWN: 6    // 提交订单未知结果
49
+});
50
+
51
+// 订单状态
52
+window.JMC.Proxy = cc.Enum({
53
+    Main: 0,
54
+    Navigation:1,
55
+    Toast:2,
56
+    UI:3,
49 57
 });

+ 3 - 3
assets/script/app/ctrl/MainCtr.js

@@ -8,16 +8,16 @@ cc.Class({
8 8
     },
9 9
 
10 10
     properties: {
11
-    
11
+        
12 12
     },
13 13
 
14
-
15 14
     onLoad () {
16 15
         this._super();
17 16
         this.initUI();
18 17
     },
19 18
 
20 19
     initUI() {
21
-        G.UIMgr.open(window.JMC.UIEnum.BagMain); 
20
+        // G.UIMgr.open(window.JMC.UIEnum.BagMain);
21
+        // G.UIMgr.open(window.JMC.UIEnum.BattleJoinRoomTip); 
22 22
     }
23 23
 });

+ 27 - 33
assets/script/app/view/UIInfo.js

@@ -1,5 +1,5 @@
1 1
 // 当前文件为手动导出文件.请勿修改.在预制体编辑界面点击右键导出即可.
2
-window.JMC.UIEnum = {
2
+ window.JMC.UIEnum = {
3 3
 		BagMain:0,
4 4
 		BattleJoinRoomTip:1,
5 5
 		BattleMain:2,
@@ -24,40 +24,34 @@ window.JMC.UIEnum = {
24 24
 		FilterMain:21,
25 25
 		HeadIcon:22,
26 26
 		ItemIcon:23,
27
-		NavigationMain:24,
28
-		prefab_alert_ctrl:25,
29
-		prefab_loading_ctrl:26,
30
-		prefab_toast_ctrl:27
27
+		NavigationMain:24
31 28
 
32 29
 }
33 30
 window.JMC.UIPath = {
34
-		[window.JMC.UIEnum.BagMain] : "Bag/BagMain.prefab",
35
-		[window.JMC.UIEnum.BattleJoinRoomTip] : "Battle/BattleJoinRoomTip.prefab",
36
-		[window.JMC.UIEnum.BattleMain] : "Battle/BattleMain.prefab",
37
-		[window.JMC.UIEnum.BattleRoom] : "Battle/BattleRoom.prefab",
38
-		[window.JMC.UIEnum.BattleRoomPlayer] : "Battle/BattleRoomPlayer.prefab",
39
-		[window.JMC.UIEnum.BattleRoomPlayerIcon] : "Battle/BattleRoomPlayerIcon.prefab",
40
-		[window.JMC.UIEnum.BattleRoomPreviweCell] : "Battle/BattleRoomPreviweCell.prefab",
41
-		[window.JMC.UIEnum.BoxChanceItem] : "BoxContains/BoxChanceItem.prefab",
42
-		[window.JMC.UIEnum.BoxContainsMain] : "BoxContains/BoxContainsMain.prefab",
43
-		[window.JMC.UIEnum.BoxItem] : "BoxContains/BoxItem.prefab",
44
-		[window.JMC.UIEnum.ButtonSelect1] : "Common/ButtonSelect1.prefab",
45
-		[window.JMC.UIEnum.DreamBrilliant] : "Dream/DreamBrilliant.prefab",
46
-		[window.JMC.UIEnum.DreamBrilliantCell] : "Dream/DreamBrilliantCell.prefab",
47
-		[window.JMC.UIEnum.DreamMain] : "Dream/DreamMain.prefab",
48
-		[window.JMC.UIEnum.DreamPopular] : "Dream/DreamPopular.prefab",
49
-		[window.JMC.UIEnum.DreamStatistics] : "Dream/DreamStatistics.prefab",
50
-		[window.JMC.UIEnum.DreamStatisticsCell] : "Dream/DreamStatisticsCell.prefab",
51
-		[window.JMC.UIEnum.DreamStatisticsFilter] : "Dream/DreamStatisticsFilter.prefab",
52
-		[window.JMC.UIEnum.DropPercentageItem] : "Drop/DropPercentageItem.prefab",
53
-		[window.JMC.UIEnum.DropRecordMain] : "Drop/DropRecordMain.prefab",
54
-		[window.JMC.UIEnum.DropWastageItem] : "Drop/DropWastageItem.prefab",
55
-		[window.JMC.UIEnum.FilterMain] : "Filter/FilterMain.prefab",
56
-		[window.JMC.UIEnum.HeadIcon] : "Common/HeadIcon.prefab",
57
-		[window.JMC.UIEnum.ItemIcon] : "Common/ItemIcon.prefab",
58
-		[window.JMC.UIEnum.NavigationMain] : "Navigation/NavigationMain.prefab",
59
-		[window.JMC.UIEnum.prefab_alert_ctrl] : "prefab_alert_ctrl.prefab",
60
-		[window.JMC.UIEnum.prefab_loading_ctrl] : "prefab_loading_ctrl.prefab",
61
-		[window.JMC.UIEnum.prefab_toast_ctrl] : "prefab_toast_ctrl.prefab"
31
+		[window.JMC.UIEnum.BagMain] : "Bag/BagMain",
32
+		[window.JMC.UIEnum.BattleJoinRoomTip] : "Battle/BattleJoinRoomTip",
33
+		[window.JMC.UIEnum.BattleMain] : "Battle/BattleMain",
34
+		[window.JMC.UIEnum.BattleRoom] : "Battle/BattleRoom",
35
+		[window.JMC.UIEnum.BattleRoomPlayer] : "Battle/BattleRoomPlayer",
36
+		[window.JMC.UIEnum.BattleRoomPlayerIcon] : "Battle/BattleRoomPlayerIcon",
37
+		[window.JMC.UIEnum.BattleRoomPreviweCell] : "Battle/BattleRoomPreviweCell",
38
+		[window.JMC.UIEnum.BoxChanceItem] : "BoxContains/BoxChanceItem",
39
+		[window.JMC.UIEnum.BoxContainsMain] : "BoxContains/BoxContainsMain",
40
+		[window.JMC.UIEnum.BoxItem] : "BoxContains/BoxItem",
41
+		[window.JMC.UIEnum.ButtonSelect1] : "Common/ButtonSelect1",
42
+		[window.JMC.UIEnum.DreamBrilliant] : "Dream/DreamBrilliant",
43
+		[window.JMC.UIEnum.DreamBrilliantCell] : "Dream/DreamBrilliantCell",
44
+		[window.JMC.UIEnum.DreamMain] : "Dream/DreamMain",
45
+		[window.JMC.UIEnum.DreamPopular] : "Dream/DreamPopular",
46
+		[window.JMC.UIEnum.DreamStatistics] : "Dream/DreamStatistics",
47
+		[window.JMC.UIEnum.DreamStatisticsCell] : "Dream/DreamStatisticsCell",
48
+		[window.JMC.UIEnum.DreamStatisticsFilter] : "Dream/DreamStatisticsFilter",
49
+		[window.JMC.UIEnum.DropPercentageItem] : "Drop/DropPercentageItem",
50
+		[window.JMC.UIEnum.DropRecordMain] : "Drop/DropRecordMain",
51
+		[window.JMC.UIEnum.DropWastageItem] : "Drop/DropWastageItem",
52
+		[window.JMC.UIEnum.FilterMain] : "Filter/FilterMain",
53
+		[window.JMC.UIEnum.HeadIcon] : "Common/HeadIcon",
54
+		[window.JMC.UIEnum.ItemIcon] : "Common/ItemIcon",
55
+		[window.JMC.UIEnum.NavigationMain] : "Navigation/NavigationMain"
62 56
 
63 57
 }

+ 28 - 22
assets/script/core/model/UIMgr.js

@@ -3,7 +3,7 @@
3 3
  */
4 4
 
5 5
 require("UIInfo")
6
-
6
+const Proxy = require('Proxy');
7 7
 
8 8
 /**
9 9
  * 登录数据管理
@@ -14,25 +14,34 @@ let UIMgr = {
14 14
      * 初始化
15 15
      *
16 16
      */
17
+
17 18
     init () {
18 19
         if (CC_EDITOR) {
19 20
             return;
20 21
         }
22
+
23
+        this.UIRoots = {
24
+            [window.JMC.Proxy.Main]:"Main",
25
+            [window.JMC.Proxy.Navigation]:"Navigation",
26
+            [window.JMC.Proxy.Toast]:"Toast",
27
+            [window.JMC.Proxy.UI]:"UI",
28
+        };
21 29
     },
22 30
 
23 31
     getUIRoot () {
24
-        return cc.director.getScene().getChildByName('Root');
32
+        let curScene = cc.director.getScene();
33
+        let root = curScene.getChildByName('Canvas').getChildByName("Root").getChildByName("UIRoot");
34
+        return root;
25 35
     },
26 36
 
27 37
     open(type, param) {
28
-        // edt_prefab/ctrl/prefab_normal_alert
29
-        let prefabPath = 'edt_prefab/ctrl/' + window.JMC.UIPath[type];
38
+        let prefabPath = 'edt_prefab/' + window.JMC.UIPath[type];
30 39
         this.showUI(prefabPath, param)
31 40
     },
32 41
 
33
-    showUI (prefabPath, alertData, cb, cache = false) {
42
+    showUI(prefabPath, alertData, cb, cache = false) {
34 43
         G.LogUtils.warn('showAlert', prefabPath);
35
-
44
+        let self = this;
36 45
         let temp = undefined;
37 46
         cc.loader.loadRes(prefabPath, cc.Prefab, (completedCount, totalCount, item)=>{
38 47
             temp = G.AppUtils.getLoadProgressInfo(temp, completedCount, totalCount);
@@ -50,22 +59,21 @@ let UIMgr = {
50 59
             }
51 60
 
52 61
             let node = cc.instantiate(prefab);
53
-            let alert = node.getComponent('JMAlertBase');
54 62
             if (cb) {
55 63
                 cb(alert, 'willShow', undefined);
56 64
             }
57 65
 
58
-            let uiRoot = this.getUIRoot();
59
-            let ret = this.pushUI(uiRoot, alert);
60
-            if (!ret) {
61
-                return;
66
+            let uiRoot = self.getUIRoot();
67
+            let proxy = node.getComponent(Proxy);
68
+            if (proxy){
69
+                uiRoot = uiRoot.getChildByName(self.UIRoots[proxy.type])
62 70
             }
63 71
 
64
-            // 因为reloadData如果出错会导致游戏闪屏,所以加上try catch
65
-            try {
66
-                alert.reloadData(alertData, cb);
67
-            } catch (error) {
68
-                G.LogUtils.error('AlertCtrl showAlert error:', error);
72
+            // let uiRoot = this.getUIRoot();
73
+            // .getChildByName(this.UIRoots[type])
74
+            let ret = self.pushUI(uiRoot, node);
75
+            if (!ret) {
76
+                return;
69 77
             }
70 78
 
71 79
             if (!cache) {
@@ -81,15 +89,13 @@ let UIMgr = {
81 89
      * @date 2019-03-22
82 90
      * @param {JMAlertBase} alert 弹框
83 91
      */
84
-    pushUI (alert) {
85
-        if (!cc.isValid(alert) || !cc.isValid(uiRoot)) {
92
+    pushUI (uiRoot, node) {
93
+        if (!cc.isValid(node) || !cc.isValid(uiRoot)) {
86 94
             return false;
87 95
         }
88 96
 
89
-        let zIndex = alert.alertZIndex;
90
-        uiRoot.addChild(alert.node, zIndex);
91
-
92
-        cc.game.emit('e_ui_push_alert', {alert: alert});
97
+        uiRoot.addChild(node);
98
+        cc.game.emit('e_ui_push_alert', {node});
93 99
         return true;
94 100
     },
95 101
 }

+ 7 - 0
assets/script/framework.meta

@@ -0,0 +1,7 @@
1
+{
2
+  "ver": "1.0.1",
3
+  "uuid": "7908a109-94ef-4bdc-bb9a-b0cbfd58e550",
4
+  "isSubpackage": false,
5
+  "subpackageName": "",
6
+  "subMetas": {}
7
+}

+ 16 - 0
assets/script/framework/Proxy.js

@@ -0,0 +1,16 @@
1
+cc.Class({
2
+    extends: cc.Component,
3
+
4
+    properties: {
5
+        type: {
6
+            default: window.JMC.Proxy.UI,
7
+            type: cc.Enum(window.JMC.Proxy),
8
+            serializable: true,
9
+        },
10
+    },
11
+
12
+    start () {
13
+
14
+    },
15
+
16
+});

+ 9 - 0
assets/script/framework/Proxy.js.meta

@@ -0,0 +1,9 @@
1
+{
2
+  "ver": "1.0.8",
3
+  "uuid": "34c50aff-97cf-466c-be2f-8eecc6bd2e5f",
4
+  "isPlugin": false,
5
+  "loadPluginInWeb": true,
6
+  "loadPluginInNative": true,
7
+  "loadPluginInEditor": false,
8
+  "subMetas": {}
9
+}

+ 2 - 2
packages/LuaExport/scene-walker.js

@@ -6,7 +6,7 @@ module.exports = {
6 6
     'exportInfo': function () {
7 7
         cc.log("export info");
8 8
 
9
-        let rootPath = Editor.url('db://assets/edt_prefab/ctrl', 'utf8')
9
+        let rootPath = Editor.url('db://assets/resources/edt_prefab', 'utf8')
10 10
         let allPrefabs = this.getAllUIPrefab(rootPath);
11 11
         let allPrefabInfos = this.getAllPrefabInfo(rootPath, allPrefabs);
12 12
         this.writeInfoFile(allPrefabInfos);
@@ -37,7 +37,7 @@ module.exports = {
37 37
         let result = [];
38 38
         allPrefabs.forEach((file) => {
39 39
             let prefabName = path.basename(file, path.extname(file));
40
-            let prefabPath = file.replace(rootPath, "").substring(1)
40
+            let prefabPath = file.replace(rootPath, "").replace(".prefab", "").substring(1)
41 41
             result.push({
42 42
                 "name":prefabName,
43 43
                 "path":prefabPath,