complete SceneRecommend
0 parents
Showing
112 changed files
with
9111 additions
and
0 deletions
.gitignore
0 → 100644
1 | #///////////////////////////////////////////////////////////////////////////// | ||
2 | # Fireball Projects | ||
3 | #///////////////////////////////////////////////////////////////////////////// | ||
4 | |||
5 | /library/ | ||
6 | /temp/ | ||
7 | /local/ | ||
8 | /build/ | ||
9 | |||
10 | #///////////////////////////////////////////////////////////////////////////// | ||
11 | # npm files | ||
12 | #///////////////////////////////////////////////////////////////////////////// | ||
13 | |||
14 | npm-debug.log | ||
15 | node_modules/ | ||
16 | |||
17 | #///////////////////////////////////////////////////////////////////////////// | ||
18 | # Logs and databases | ||
19 | #///////////////////////////////////////////////////////////////////////////// | ||
20 | |||
21 | *.log | ||
22 | *.sql | ||
23 | *.sqlite | ||
24 | |||
25 | #///////////////////////////////////////////////////////////////////////////// | ||
26 | # files for debugger | ||
27 | #///////////////////////////////////////////////////////////////////////////// | ||
28 | |||
29 | *.sln | ||
30 | *.csproj | ||
31 | *.pidb | ||
32 | *.unityproj | ||
33 | *.suo | ||
34 | |||
35 | #///////////////////////////////////////////////////////////////////////////// | ||
36 | # OS generated files | ||
37 | #///////////////////////////////////////////////////////////////////////////// | ||
38 | |||
39 | .DS_Store | ||
40 | ehthumbs.db | ||
41 | Thumbs.db | ||
42 | |||
43 | #///////////////////////////////////////////////////////////////////////////// | ||
44 | # WebStorm files | ||
45 | #///////////////////////////////////////////////////////////////////////////// | ||
46 | |||
47 | .idea/ | ||
48 | |||
49 | #////////////////////////// | ||
50 | # VS Code files | ||
51 | #////////////////////////// | ||
52 | |||
53 | .vscode/ |
assets/Scene.meta
0 → 100644
assets/Scene/SceneRecommend.fire
0 → 100644
1 | [ | ||
2 | { | ||
3 | "__type__": "cc.SceneAsset", | ||
4 | "_name": "", | ||
5 | "_objFlags": 0, | ||
6 | "_native": "", | ||
7 | "scene": { | ||
8 | "__id__": 1 | ||
9 | } | ||
10 | }, | ||
11 | { | ||
12 | "__type__": "cc.Scene", | ||
13 | "_objFlags": 0, | ||
14 | "_parent": null, | ||
15 | "_children": [ | ||
16 | { | ||
17 | "__id__": 2 | ||
18 | } | ||
19 | ], | ||
20 | "_active": true, | ||
21 | "_level": 0, | ||
22 | "_components": [], | ||
23 | "_prefab": null, | ||
24 | "_opacity": 255, | ||
25 | "_color": { | ||
26 | "__type__": "cc.Color", | ||
27 | "r": 255, | ||
28 | "g": 255, | ||
29 | "b": 255, | ||
30 | "a": 255 | ||
31 | }, | ||
32 | "_contentSize": { | ||
33 | "__type__": "cc.Size", | ||
34 | "width": 0, | ||
35 | "height": 0 | ||
36 | }, | ||
37 | "_anchorPoint": { | ||
38 | "__type__": "cc.Vec2", | ||
39 | "x": 0, | ||
40 | "y": 0 | ||
41 | }, | ||
42 | "_scale": { | ||
43 | "__type__": "cc.Vec3", | ||
44 | "x": 1, | ||
45 | "y": 1, | ||
46 | "z": 1 | ||
47 | }, | ||
48 | "_eulerAngles": { | ||
49 | "__type__": "cc.Vec3", | ||
50 | "x": 0, | ||
51 | "y": 0, | ||
52 | "z": 0 | ||
53 | }, | ||
54 | "_is3DNode": true, | ||
55 | "groupIndex": 0, | ||
56 | "autoReleaseAssets": false, | ||
57 | "_id": "2d2f792f-a40c-49bb-a189-ed176a246e49" | ||
58 | }, | ||
59 | { | ||
60 | "__type__": "cc.Node", | ||
61 | "_name": "Canvas", | ||
62 | "_objFlags": 0, | ||
63 | "_parent": { | ||
64 | "__id__": 1 | ||
65 | }, | ||
66 | "_children": [ | ||
67 | { | ||
68 | "__id__": 3 | ||
69 | }, | ||
70 | { | ||
71 | "__id__": 5 | ||
72 | }, | ||
73 | { | ||
74 | "__id__": 17 | ||
75 | }, | ||
76 | { | ||
77 | "__id__": 30 | ||
78 | } | ||
79 | ], | ||
80 | "_active": true, | ||
81 | "_level": 0, | ||
82 | "_components": [ | ||
83 | { | ||
84 | "__id__": 34 | ||
85 | }, | ||
86 | { | ||
87 | "__id__": 35 | ||
88 | }, | ||
89 | { | ||
90 | "__id__": 39 | ||
91 | } | ||
92 | ], | ||
93 | "_prefab": null, | ||
94 | "_opacity": 255, | ||
95 | "_color": { | ||
96 | "__type__": "cc.Color", | ||
97 | "r": 252, | ||
98 | "g": 252, | ||
99 | "b": 252, | ||
100 | "a": 255 | ||
101 | }, | ||
102 | "_contentSize": { | ||
103 | "__type__": "cc.Size", | ||
104 | "width": 1280, | ||
105 | "height": 720 | ||
106 | }, | ||
107 | "_anchorPoint": { | ||
108 | "__type__": "cc.Vec2", | ||
109 | "x": 0.5, | ||
110 | "y": 0.5 | ||
111 | }, | ||
112 | "_position": { | ||
113 | "__type__": "cc.Vec3", | ||
114 | "x": 640, | ||
115 | "y": 360, | ||
116 | "z": 0 | ||
117 | }, | ||
118 | "_scale": { | ||
119 | "__type__": "cc.Vec3", | ||
120 | "x": 1, | ||
121 | "y": 1, | ||
122 | "z": 1 | ||
123 | }, | ||
124 | "_eulerAngles": { | ||
125 | "__type__": "cc.Vec3", | ||
126 | "x": 0, | ||
127 | "y": 0, | ||
128 | "z": 0 | ||
129 | }, | ||
130 | "_skewX": 0, | ||
131 | "_skewY": 0, | ||
132 | "_is3DNode": false, | ||
133 | "groupIndex": 0, | ||
134 | "_rotationX": 0, | ||
135 | "_rotationY": 0, | ||
136 | "_id": "a286bbGknJLZpRpxROV6M94" | ||
137 | }, | ||
138 | { | ||
139 | "__type__": "cc.Node", | ||
140 | "_name": "Main Camera", | ||
141 | "_objFlags": 0, | ||
142 | "_parent": { | ||
143 | "__id__": 2 | ||
144 | }, | ||
145 | "_children": [], | ||
146 | "_active": true, | ||
147 | "_level": 1, | ||
148 | "_components": [ | ||
149 | { | ||
150 | "__id__": 4 | ||
151 | } | ||
152 | ], | ||
153 | "_prefab": null, | ||
154 | "_opacity": 255, | ||
155 | "_color": { | ||
156 | "__type__": "cc.Color", | ||
157 | "r": 255, | ||
158 | "g": 255, | ||
159 | "b": 255, | ||
160 | "a": 255 | ||
161 | }, | ||
162 | "_contentSize": { | ||
163 | "__type__": "cc.Size", | ||
164 | "width": 0, | ||
165 | "height": 0 | ||
166 | }, | ||
167 | "_anchorPoint": { | ||
168 | "__type__": "cc.Vec2", | ||
169 | "x": 0.5, | ||
170 | "y": 0.5 | ||
171 | }, | ||
172 | "_position": { | ||
173 | "__type__": "cc.Vec3", | ||
174 | "x": 0, | ||
175 | "y": 0, | ||
176 | "z": 0 | ||
177 | }, | ||
178 | "_scale": { | ||
179 | "__type__": "cc.Vec3", | ||
180 | "x": 1, | ||
181 | "y": 1, | ||
182 | "z": 1 | ||
183 | }, | ||
184 | "_eulerAngles": { | ||
185 | "__type__": "cc.Vec3", | ||
186 | "x": 0, | ||
187 | "y": 0, | ||
188 | "z": 0 | ||
189 | }, | ||
190 | "_skewX": 0, | ||
191 | "_skewY": 0, | ||
192 | "_is3DNode": false, | ||
193 | "groupIndex": 0, | ||
194 | "_rotationX": 0, | ||
195 | "_rotationY": 0, | ||
196 | "_id": "bajsC4KotFLZ6XLFLKnycL" | ||
197 | }, | ||
198 | { | ||
199 | "__type__": "cc.Camera", | ||
200 | "_name": "", | ||
201 | "_objFlags": 0, | ||
202 | "node": { | ||
203 | "__id__": 3 | ||
204 | }, | ||
205 | "_enabled": true, | ||
206 | "_cullingMask": 4294967295, | ||
207 | "_clearFlags": 7, | ||
208 | "_backgroundColor": { | ||
209 | "__type__": "cc.Color", | ||
210 | "r": 0, | ||
211 | "g": 0, | ||
212 | "b": 0, | ||
213 | "a": 255 | ||
214 | }, | ||
215 | "_depth": -1, | ||
216 | "_zoomRatio": 1, | ||
217 | "_targetTexture": null, | ||
218 | "_fov": 60, | ||
219 | "_orthoSize": 10, | ||
220 | "_nearClip": 1, | ||
221 | "_farClip": 4096, | ||
222 | "_ortho": true, | ||
223 | "_rect": { | ||
224 | "__type__": "cc.Rect", | ||
225 | "x": 0, | ||
226 | "y": 0, | ||
227 | "width": 1, | ||
228 | "height": 1 | ||
229 | }, | ||
230 | "_renderStages": 1, | ||
231 | "_id": "c7r5+B15dD56dUBiNj+0KH" | ||
232 | }, | ||
233 | { | ||
234 | "__type__": "cc.Node", | ||
235 | "_name": "ScrollContent", | ||
236 | "_objFlags": 0, | ||
237 | "_parent": { | ||
238 | "__id__": 2 | ||
239 | }, | ||
240 | "_children": [ | ||
241 | { | ||
242 | "__id__": 6 | ||
243 | }, | ||
244 | { | ||
245 | "__id__": 9 | ||
246 | }, | ||
247 | { | ||
248 | "__id__": 13 | ||
249 | } | ||
250 | ], | ||
251 | "_active": true, | ||
252 | "_level": 1, | ||
253 | "_components": [], | ||
254 | "_prefab": null, | ||
255 | "_opacity": 255, | ||
256 | "_color": { | ||
257 | "__type__": "cc.Color", | ||
258 | "r": 255, | ||
259 | "g": 255, | ||
260 | "b": 255, | ||
261 | "a": 255 | ||
262 | }, | ||
263 | "_contentSize": { | ||
264 | "__type__": "cc.Size", | ||
265 | "width": 1280, | ||
266 | "height": 0 | ||
267 | }, | ||
268 | "_anchorPoint": { | ||
269 | "__type__": "cc.Vec2", | ||
270 | "x": 0.5, | ||
271 | "y": 0.5 | ||
272 | }, | ||
273 | "_position": { | ||
274 | "__type__": "cc.Vec3", | ||
275 | "x": 0, | ||
276 | "y": 360, | ||
277 | "z": 0 | ||
278 | }, | ||
279 | "_scale": { | ||
280 | "__type__": "cc.Vec3", | ||
281 | "x": 1, | ||
282 | "y": 1, | ||
283 | "z": 1 | ||
284 | }, | ||
285 | "_eulerAngles": { | ||
286 | "__type__": "cc.Vec3", | ||
287 | "x": 0, | ||
288 | "y": 0, | ||
289 | "z": 0 | ||
290 | }, | ||
291 | "_skewX": 0, | ||
292 | "_skewY": 0, | ||
293 | "_is3DNode": false, | ||
294 | "groupIndex": 0, | ||
295 | "_id": "d5YgFh8GFGSYo+TkcU3i8/" | ||
296 | }, | ||
297 | { | ||
298 | "__type__": "cc.Node", | ||
299 | "_name": "background", | ||
300 | "_objFlags": 0, | ||
301 | "_parent": { | ||
302 | "__id__": 5 | ||
303 | }, | ||
304 | "_children": [], | ||
305 | "_active": true, | ||
306 | "_level": 2, | ||
307 | "_components": [ | ||
308 | { | ||
309 | "__id__": 7 | ||
310 | }, | ||
311 | { | ||
312 | "__id__": 8 | ||
313 | } | ||
314 | ], | ||
315 | "_prefab": null, | ||
316 | "_opacity": 255, | ||
317 | "_color": { | ||
318 | "__type__": "cc.Color", | ||
319 | "r": 255, | ||
320 | "g": 255, | ||
321 | "b": 255, | ||
322 | "a": 255 | ||
323 | }, | ||
324 | "_contentSize": { | ||
325 | "__type__": "cc.Size", | ||
326 | "width": 1280, | ||
327 | "height": 2885 | ||
328 | }, | ||
329 | "_anchorPoint": { | ||
330 | "__type__": "cc.Vec2", | ||
331 | "x": 0.5, | ||
332 | "y": 0.5 | ||
333 | }, | ||
334 | "_position": { | ||
335 | "__type__": "cc.Vec3", | ||
336 | "x": 0, | ||
337 | "y": -1442.5, | ||
338 | "z": 0 | ||
339 | }, | ||
340 | "_scale": { | ||
341 | "__type__": "cc.Vec3", | ||
342 | "x": 1, | ||
343 | "y": 1, | ||
344 | "z": 1 | ||
345 | }, | ||
346 | "_eulerAngles": { | ||
347 | "__type__": "cc.Vec3", | ||
348 | "x": 0, | ||
349 | "y": 0, | ||
350 | "z": 0 | ||
351 | }, | ||
352 | "_skewX": 0, | ||
353 | "_skewY": 0, | ||
354 | "_is3DNode": false, | ||
355 | "groupIndex": 0, | ||
356 | "_rotationX": 0, | ||
357 | "_rotationY": 0, | ||
358 | "_id": "e2e0crkOLxGrpMxpbC4iQg1" | ||
359 | }, | ||
360 | { | ||
361 | "__type__": "cc.Widget", | ||
362 | "_name": "", | ||
363 | "_objFlags": 0, | ||
364 | "node": { | ||
365 | "__id__": 6 | ||
366 | }, | ||
367 | "_enabled": true, | ||
368 | "alignMode": 1, | ||
369 | "_target": null, | ||
370 | "_alignFlags": 9, | ||
371 | "_left": 0, | ||
372 | "_right": 507.8855000000003, | ||
373 | "_top": 0, | ||
374 | "_bottom": -290.2645000000001, | ||
375 | "_verticalCenter": 0, | ||
376 | "_horizontalCenter": 0, | ||
377 | "_isAbsLeft": true, | ||
378 | "_isAbsRight": true, | ||
379 | "_isAbsTop": true, | ||
380 | "_isAbsBottom": true, | ||
381 | "_isAbsHorizontalCenter": true, | ||
382 | "_isAbsVerticalCenter": true, | ||
383 | "_originalWidth": 200, | ||
384 | "_originalHeight": 150, | ||
385 | "_id": "86+yud7pFDSrM+lsxByQvE" | ||
386 | }, | ||
387 | { | ||
388 | "__type__": "cc.Sprite", | ||
389 | "_name": "", | ||
390 | "_objFlags": 0, | ||
391 | "node": { | ||
392 | "__id__": 6 | ||
393 | }, | ||
394 | "_enabled": true, | ||
395 | "_materials": [ | ||
396 | { | ||
397 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
398 | } | ||
399 | ], | ||
400 | "_srcBlendFactor": 770, | ||
401 | "_dstBlendFactor": 771, | ||
402 | "_spriteFrame": { | ||
403 | "__uuid__": "eab92123-65ec-44fd-b9af-7b80346d5e64" | ||
404 | }, | ||
405 | "_type": 0, | ||
406 | "_sizeMode": 1, | ||
407 | "_fillType": 0, | ||
408 | "_fillCenter": { | ||
409 | "__type__": "cc.Vec2", | ||
410 | "x": 0, | ||
411 | "y": 0 | ||
412 | }, | ||
413 | "_fillStart": 0, | ||
414 | "_fillRange": 0, | ||
415 | "_isTrimmedMode": true, | ||
416 | "_atlas": null, | ||
417 | "_id": "6eJ8mvvn9A6o5pdFTP+tE3" | ||
418 | }, | ||
419 | { | ||
420 | "__type__": "cc.Node", | ||
421 | "_name": "RightRecommendLayout", | ||
422 | "_objFlags": 0, | ||
423 | "_parent": { | ||
424 | "__id__": 5 | ||
425 | }, | ||
426 | "_children": [], | ||
427 | "_active": true, | ||
428 | "_level": 2, | ||
429 | "_components": [ | ||
430 | { | ||
431 | "__id__": 10 | ||
432 | }, | ||
433 | { | ||
434 | "__id__": 11 | ||
435 | }, | ||
436 | { | ||
437 | "__id__": 12 | ||
438 | } | ||
439 | ], | ||
440 | "_prefab": null, | ||
441 | "_opacity": 255, | ||
442 | "_color": { | ||
443 | "__type__": "cc.Color", | ||
444 | "r": 255, | ||
445 | "g": 255, | ||
446 | "b": 255, | ||
447 | "a": 255 | ||
448 | }, | ||
449 | "_contentSize": { | ||
450 | "__type__": "cc.Size", | ||
451 | "width": 200, | ||
452 | "height": 150 | ||
453 | }, | ||
454 | "_anchorPoint": { | ||
455 | "__type__": "cc.Vec2", | ||
456 | "x": 0.5, | ||
457 | "y": 0.5 | ||
458 | }, | ||
459 | "_position": { | ||
460 | "__type__": "cc.Vec3", | ||
461 | "x": 0, | ||
462 | "y": -720, | ||
463 | "z": 0 | ||
464 | }, | ||
465 | "_scale": { | ||
466 | "__type__": "cc.Vec3", | ||
467 | "x": 1, | ||
468 | "y": 1, | ||
469 | "z": 1 | ||
470 | }, | ||
471 | "_eulerAngles": { | ||
472 | "__type__": "cc.Vec3", | ||
473 | "x": 0, | ||
474 | "y": 0, | ||
475 | "z": 0 | ||
476 | }, | ||
477 | "_skewX": 0, | ||
478 | "_skewY": 0, | ||
479 | "_is3DNode": false, | ||
480 | "groupIndex": 0, | ||
481 | "_rotationX": 0, | ||
482 | "_rotationY": 0, | ||
483 | "_id": "51WwK6fT5MhIC+kSgz1URv" | ||
484 | }, | ||
485 | { | ||
486 | "__type__": "cc.Sprite", | ||
487 | "_name": "", | ||
488 | "_objFlags": 0, | ||
489 | "node": { | ||
490 | "__id__": 9 | ||
491 | }, | ||
492 | "_enabled": true, | ||
493 | "_materials": [ | ||
494 | { | ||
495 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
496 | } | ||
497 | ], | ||
498 | "_srcBlendFactor": 770, | ||
499 | "_dstBlendFactor": 771, | ||
500 | "_spriteFrame": null, | ||
501 | "_type": 1, | ||
502 | "_sizeMode": 0, | ||
503 | "_fillType": 0, | ||
504 | "_fillCenter": { | ||
505 | "__type__": "cc.Vec2", | ||
506 | "x": 0, | ||
507 | "y": 0 | ||
508 | }, | ||
509 | "_fillStart": 0, | ||
510 | "_fillRange": 0, | ||
511 | "_isTrimmedMode": true, | ||
512 | "_atlas": null, | ||
513 | "_id": "f1MeZlDVRD2KNNosLBuU/N" | ||
514 | }, | ||
515 | { | ||
516 | "__type__": "cc.Layout", | ||
517 | "_name": "", | ||
518 | "_objFlags": 0, | ||
519 | "node": { | ||
520 | "__id__": 9 | ||
521 | }, | ||
522 | "_enabled": true, | ||
523 | "_layoutSize": { | ||
524 | "__type__": "cc.Size", | ||
525 | "width": 200, | ||
526 | "height": 150 | ||
527 | }, | ||
528 | "_resize": 0, | ||
529 | "_N$layoutType": 0, | ||
530 | "_N$padding": 0, | ||
531 | "_N$cellSize": { | ||
532 | "__type__": "cc.Size", | ||
533 | "width": 40, | ||
534 | "height": 40 | ||
535 | }, | ||
536 | "_N$startAxis": 0, | ||
537 | "_N$paddingLeft": 0, | ||
538 | "_N$paddingRight": 0, | ||
539 | "_N$paddingTop": 0, | ||
540 | "_N$paddingBottom": 0, | ||
541 | "_N$spacingX": 0, | ||
542 | "_N$spacingY": 0, | ||
543 | "_N$verticalDirection": 1, | ||
544 | "_N$horizontalDirection": 0, | ||
545 | "_N$affectedByScale": false, | ||
546 | "_id": "b3BQZMZyBBxJl5pXvEm5lx" | ||
547 | }, | ||
548 | { | ||
549 | "__type__": "cc.Widget", | ||
550 | "_name": "", | ||
551 | "_objFlags": 0, | ||
552 | "node": { | ||
553 | "__id__": 9 | ||
554 | }, | ||
555 | "_enabled": true, | ||
556 | "alignMode": 1, | ||
557 | "_target": null, | ||
558 | "_alignFlags": 9, | ||
559 | "_left": 540, | ||
560 | "_right": 0, | ||
561 | "_top": 645, | ||
562 | "_bottom": 0, | ||
563 | "_verticalCenter": 0, | ||
564 | "_horizontalCenter": 0, | ||
565 | "_isAbsLeft": true, | ||
566 | "_isAbsRight": true, | ||
567 | "_isAbsTop": true, | ||
568 | "_isAbsBottom": true, | ||
569 | "_isAbsHorizontalCenter": true, | ||
570 | "_isAbsVerticalCenter": true, | ||
571 | "_originalWidth": 0, | ||
572 | "_originalHeight": 0, | ||
573 | "_id": "57pm3qSI5K0LQU8JHl25iQ" | ||
574 | }, | ||
575 | { | ||
576 | "__type__": "cc.Node", | ||
577 | "_name": "RightTopLayout", | ||
578 | "_objFlags": 0, | ||
579 | "_parent": { | ||
580 | "__id__": 5 | ||
581 | }, | ||
582 | "_children": [], | ||
583 | "_active": true, | ||
584 | "_level": 2, | ||
585 | "_components": [ | ||
586 | { | ||
587 | "__id__": 14 | ||
588 | }, | ||
589 | { | ||
590 | "__id__": 15 | ||
591 | }, | ||
592 | { | ||
593 | "__id__": 16 | ||
594 | } | ||
595 | ], | ||
596 | "_prefab": null, | ||
597 | "_opacity": 255, | ||
598 | "_color": { | ||
599 | "__type__": "cc.Color", | ||
600 | "r": 255, | ||
601 | "g": 255, | ||
602 | "b": 255, | ||
603 | "a": 255 | ||
604 | }, | ||
605 | "_contentSize": { | ||
606 | "__type__": "cc.Size", | ||
607 | "width": 1280, | ||
608 | "height": 48 | ||
609 | }, | ||
610 | "_anchorPoint": { | ||
611 | "__type__": "cc.Vec2", | ||
612 | "x": 19.88, | ||
613 | "y": -4.06 | ||
614 | }, | ||
615 | "_position": { | ||
616 | "__type__": "cc.Vec3", | ||
617 | "x": 24806.399999999998, | ||
618 | "y": -242.88, | ||
619 | "z": 0 | ||
620 | }, | ||
621 | "_scale": { | ||
622 | "__type__": "cc.Vec3", | ||
623 | "x": 1, | ||
624 | "y": 1, | ||
625 | "z": 1 | ||
626 | }, | ||
627 | "_eulerAngles": { | ||
628 | "__type__": "cc.Vec3", | ||
629 | "x": 0, | ||
630 | "y": 0, | ||
631 | "z": 0 | ||
632 | }, | ||
633 | "_skewX": 0, | ||
634 | "_skewY": 0, | ||
635 | "_is3DNode": false, | ||
636 | "groupIndex": 0, | ||
637 | "_rotationX": 0, | ||
638 | "_rotationY": 0, | ||
639 | "_id": "35Jp4SXkxGI43N2Ggf1UCc" | ||
640 | }, | ||
641 | { | ||
642 | "__type__": "cc.Sprite", | ||
643 | "_name": "", | ||
644 | "_objFlags": 0, | ||
645 | "node": { | ||
646 | "__id__": 13 | ||
647 | }, | ||
648 | "_enabled": true, | ||
649 | "_materials": [ | ||
650 | { | ||
651 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
652 | } | ||
653 | ], | ||
654 | "_srcBlendFactor": 770, | ||
655 | "_dstBlendFactor": 771, | ||
656 | "_spriteFrame": null, | ||
657 | "_type": 1, | ||
658 | "_sizeMode": 0, | ||
659 | "_fillType": 0, | ||
660 | "_fillCenter": { | ||
661 | "__type__": "cc.Vec2", | ||
662 | "x": 0, | ||
663 | "y": 0 | ||
664 | }, | ||
665 | "_fillStart": 0, | ||
666 | "_fillRange": 0, | ||
667 | "_isTrimmedMode": true, | ||
668 | "_atlas": null, | ||
669 | "_id": "3eSf6yzglJmJ+mX2/JDKVE" | ||
670 | }, | ||
671 | { | ||
672 | "__type__": "cc.Layout", | ||
673 | "_name": "", | ||
674 | "_objFlags": 0, | ||
675 | "node": { | ||
676 | "__id__": 13 | ||
677 | }, | ||
678 | "_enabled": false, | ||
679 | "_layoutSize": { | ||
680 | "__type__": "cc.Size", | ||
681 | "width": 1280, | ||
682 | "height": 48 | ||
683 | }, | ||
684 | "_resize": 1, | ||
685 | "_N$layoutType": 0, | ||
686 | "_N$padding": 0, | ||
687 | "_N$cellSize": { | ||
688 | "__type__": "cc.Size", | ||
689 | "width": 40, | ||
690 | "height": 40 | ||
691 | }, | ||
692 | "_N$startAxis": 0, | ||
693 | "_N$paddingLeft": 0, | ||
694 | "_N$paddingRight": 0, | ||
695 | "_N$paddingTop": 0, | ||
696 | "_N$paddingBottom": 0, | ||
697 | "_N$spacingX": 0, | ||
698 | "_N$spacingY": 0, | ||
699 | "_N$verticalDirection": 1, | ||
700 | "_N$horizontalDirection": 0, | ||
701 | "_N$affectedByScale": false, | ||
702 | "_id": "56DFhkMhtPSYuyBBgvO6rZ" | ||
703 | }, | ||
704 | { | ||
705 | "__type__": "cc.Widget", | ||
706 | "_name": "", | ||
707 | "_objFlags": 0, | ||
708 | "node": { | ||
709 | "__id__": 13 | ||
710 | }, | ||
711 | "_enabled": true, | ||
712 | "alignMode": 2, | ||
713 | "_target": null, | ||
714 | "_alignFlags": 9, | ||
715 | "_left": 0, | ||
716 | "_right": 0, | ||
717 | "_top": 0, | ||
718 | "_bottom": 0, | ||
719 | "_verticalCenter": 0, | ||
720 | "_horizontalCenter": 0, | ||
721 | "_isAbsLeft": true, | ||
722 | "_isAbsRight": true, | ||
723 | "_isAbsTop": true, | ||
724 | "_isAbsBottom": true, | ||
725 | "_isAbsHorizontalCenter": true, | ||
726 | "_isAbsVerticalCenter": true, | ||
727 | "_originalWidth": 0, | ||
728 | "_originalHeight": 0, | ||
729 | "_id": "22pn9r5DZCzY8gDnbvqZki" | ||
730 | }, | ||
731 | { | ||
732 | "__type__": "cc.Node", | ||
733 | "_name": "TopTitle", | ||
734 | "_objFlags": 0, | ||
735 | "_parent": { | ||
736 | "__id__": 2 | ||
737 | }, | ||
738 | "_children": [ | ||
739 | { | ||
740 | "__id__": 18 | ||
741 | }, | ||
742 | { | ||
743 | "__id__": 21 | ||
744 | }, | ||
745 | { | ||
746 | "__id__": 24 | ||
747 | }, | ||
748 | { | ||
749 | "__id__": 27 | ||
750 | } | ||
751 | ], | ||
752 | "_active": true, | ||
753 | "_level": 1, | ||
754 | "_components": [], | ||
755 | "_prefab": null, | ||
756 | "_opacity": 255, | ||
757 | "_color": { | ||
758 | "__type__": "cc.Color", | ||
759 | "r": 255, | ||
760 | "g": 255, | ||
761 | "b": 255, | ||
762 | "a": 255 | ||
763 | }, | ||
764 | "_contentSize": { | ||
765 | "__type__": "cc.Size", | ||
766 | "width": 1280, | ||
767 | "height": 720 | ||
768 | }, | ||
769 | "_anchorPoint": { | ||
770 | "__type__": "cc.Vec2", | ||
771 | "x": 0.5, | ||
772 | "y": 0.5 | ||
773 | }, | ||
774 | "_position": { | ||
775 | "__type__": "cc.Vec3", | ||
776 | "x": 0, | ||
777 | "y": 0, | ||
778 | "z": 0 | ||
779 | }, | ||
780 | "_scale": { | ||
781 | "__type__": "cc.Vec3", | ||
782 | "x": 1, | ||
783 | "y": 1, | ||
784 | "z": 1 | ||
785 | }, | ||
786 | "_eulerAngles": { | ||
787 | "__type__": "cc.Vec3", | ||
788 | "x": 0, | ||
789 | "y": 0, | ||
790 | "z": 0 | ||
791 | }, | ||
792 | "_skewX": 0, | ||
793 | "_skewY": 0, | ||
794 | "_is3DNode": false, | ||
795 | "groupIndex": 0, | ||
796 | "_id": "cdi5cODkZFr5VmgKy1vTNk" | ||
797 | }, | ||
798 | { | ||
799 | "__type__": "cc.Node", | ||
800 | "_name": "logo", | ||
801 | "_objFlags": 0, | ||
802 | "_parent": { | ||
803 | "__id__": 17 | ||
804 | }, | ||
805 | "_children": [], | ||
806 | "_active": true, | ||
807 | "_level": 2, | ||
808 | "_components": [ | ||
809 | { | ||
810 | "__id__": 19 | ||
811 | }, | ||
812 | { | ||
813 | "__id__": 20 | ||
814 | } | ||
815 | ], | ||
816 | "_prefab": null, | ||
817 | "_opacity": 255, | ||
818 | "_color": { | ||
819 | "__type__": "cc.Color", | ||
820 | "r": 255, | ||
821 | "g": 255, | ||
822 | "b": 255, | ||
823 | "a": 255 | ||
824 | }, | ||
825 | "_contentSize": { | ||
826 | "__type__": "cc.Size", | ||
827 | "width": 649, | ||
828 | "height": 466 | ||
829 | }, | ||
830 | "_anchorPoint": { | ||
831 | "__type__": "cc.Vec2", | ||
832 | "x": 0.5, | ||
833 | "y": 0.5 | ||
834 | }, | ||
835 | "_position": { | ||
836 | "__type__": "cc.Vec3", | ||
837 | "x": -509.073, | ||
838 | "y": 311.974, | ||
839 | "z": 0 | ||
840 | }, | ||
841 | "_scale": { | ||
842 | "__type__": "cc.Vec3", | ||
843 | "x": 0.2, | ||
844 | "y": 0.2, | ||
845 | "z": 1 | ||
846 | }, | ||
847 | "_eulerAngles": { | ||
848 | "__type__": "cc.Vec3", | ||
849 | "x": 0, | ||
850 | "y": 0, | ||
851 | "z": 0 | ||
852 | }, | ||
853 | "_skewX": 0, | ||
854 | "_skewY": 0, | ||
855 | "_is3DNode": false, | ||
856 | "groupIndex": 0, | ||
857 | "_id": "beZ17y2HxMJLrQRbuVHIo3" | ||
858 | }, | ||
859 | { | ||
860 | "__type__": "cc.Sprite", | ||
861 | "_name": "", | ||
862 | "_objFlags": 0, | ||
863 | "node": { | ||
864 | "__id__": 18 | ||
865 | }, | ||
866 | "_enabled": true, | ||
867 | "_materials": [ | ||
868 | { | ||
869 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
870 | } | ||
871 | ], | ||
872 | "_srcBlendFactor": 770, | ||
873 | "_dstBlendFactor": 771, | ||
874 | "_spriteFrame": { | ||
875 | "__uuid__": "1af31773-8501-40fe-96e5-ec700c03162c" | ||
876 | }, | ||
877 | "_type": 0, | ||
878 | "_sizeMode": 1, | ||
879 | "_fillType": 0, | ||
880 | "_fillCenter": { | ||
881 | "__type__": "cc.Vec2", | ||
882 | "x": 0, | ||
883 | "y": 0 | ||
884 | }, | ||
885 | "_fillStart": 0, | ||
886 | "_fillRange": 0, | ||
887 | "_isTrimmedMode": true, | ||
888 | "_atlas": null, | ||
889 | "_id": "534Ob4DUBNoYl4CjIl8U1/" | ||
890 | }, | ||
891 | { | ||
892 | "__type__": "cc.Widget", | ||
893 | "_name": "", | ||
894 | "_objFlags": 0, | ||
895 | "node": { | ||
896 | "__id__": 18 | ||
897 | }, | ||
898 | "_enabled": true, | ||
899 | "alignMode": 1, | ||
900 | "_target": null, | ||
901 | "_alignFlags": 9, | ||
902 | "_left": 66.02700000000004, | ||
903 | "_right": 0, | ||
904 | "_top": 1.4259999999999877, | ||
905 | "_bottom": 0, | ||
906 | "_verticalCenter": 0, | ||
907 | "_horizontalCenter": 0, | ||
908 | "_isAbsLeft": true, | ||
909 | "_isAbsRight": true, | ||
910 | "_isAbsTop": true, | ||
911 | "_isAbsBottom": true, | ||
912 | "_isAbsHorizontalCenter": true, | ||
913 | "_isAbsVerticalCenter": true, | ||
914 | "_originalWidth": 0, | ||
915 | "_originalHeight": 0, | ||
916 | "_id": "00CarZ9TlCQb53TyqcYV2a" | ||
917 | }, | ||
918 | { | ||
919 | "__type__": "cc.Node", | ||
920 | "_name": "my", | ||
921 | "_objFlags": 0, | ||
922 | "_parent": { | ||
923 | "__id__": 17 | ||
924 | }, | ||
925 | "_children": [], | ||
926 | "_active": false, | ||
927 | "_level": 2, | ||
928 | "_components": [ | ||
929 | { | ||
930 | "__id__": 22 | ||
931 | }, | ||
932 | { | ||
933 | "__id__": 23 | ||
934 | } | ||
935 | ], | ||
936 | "_prefab": null, | ||
937 | "_opacity": 255, | ||
938 | "_color": { | ||
939 | "__type__": "cc.Color", | ||
940 | "r": 255, | ||
941 | "g": 255, | ||
942 | "b": 255, | ||
943 | "a": 255 | ||
944 | }, | ||
945 | "_contentSize": { | ||
946 | "__type__": "cc.Size", | ||
947 | "width": 127, | ||
948 | "height": 48 | ||
949 | }, | ||
950 | "_anchorPoint": { | ||
951 | "__type__": "cc.Vec2", | ||
952 | "x": 0.5, | ||
953 | "y": 0.5 | ||
954 | }, | ||
955 | "_position": { | ||
956 | "__type__": "cc.Vec3", | ||
957 | "x": 299.5, | ||
958 | "y": 310, | ||
959 | "z": 0 | ||
960 | }, | ||
961 | "_scale": { | ||
962 | "__type__": "cc.Vec3", | ||
963 | "x": 1, | ||
964 | "y": 1, | ||
965 | "z": 1 | ||
966 | }, | ||
967 | "_eulerAngles": { | ||
968 | "__type__": "cc.Vec3", | ||
969 | "x": 0, | ||
970 | "y": 0, | ||
971 | "z": 0 | ||
972 | }, | ||
973 | "_skewX": 0, | ||
974 | "_skewY": 0, | ||
975 | "_is3DNode": false, | ||
976 | "groupIndex": 0, | ||
977 | "_id": "f9kqgyMlpC3ozF7o6pqj+s" | ||
978 | }, | ||
979 | { | ||
980 | "__type__": "cc.Sprite", | ||
981 | "_name": "", | ||
982 | "_objFlags": 0, | ||
983 | "node": { | ||
984 | "__id__": 21 | ||
985 | }, | ||
986 | "_enabled": true, | ||
987 | "_materials": [ | ||
988 | { | ||
989 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
990 | } | ||
991 | ], | ||
992 | "_srcBlendFactor": 770, | ||
993 | "_dstBlendFactor": 771, | ||
994 | "_spriteFrame": { | ||
995 | "__uuid__": "e74a5b86-b958-43cf-a583-6ebdeb00e071" | ||
996 | }, | ||
997 | "_type": 0, | ||
998 | "_sizeMode": 1, | ||
999 | "_fillType": 0, | ||
1000 | "_fillCenter": { | ||
1001 | "__type__": "cc.Vec2", | ||
1002 | "x": 0, | ||
1003 | "y": 0 | ||
1004 | }, | ||
1005 | "_fillStart": 0, | ||
1006 | "_fillRange": 0, | ||
1007 | "_isTrimmedMode": true, | ||
1008 | "_atlas": null, | ||
1009 | "_id": "350BsuLatCF7YLMe9Kd4P5" | ||
1010 | }, | ||
1011 | { | ||
1012 | "__type__": "cc.Widget", | ||
1013 | "_name": "", | ||
1014 | "_objFlags": 0, | ||
1015 | "node": { | ||
1016 | "__id__": 21 | ||
1017 | }, | ||
1018 | "_enabled": true, | ||
1019 | "alignMode": 1, | ||
1020 | "_target": null, | ||
1021 | "_alignFlags": 9, | ||
1022 | "_left": 876, | ||
1023 | "_right": 0, | ||
1024 | "_top": 26, | ||
1025 | "_bottom": 0, | ||
1026 | "_verticalCenter": 0, | ||
1027 | "_horizontalCenter": 0, | ||
1028 | "_isAbsLeft": true, | ||
1029 | "_isAbsRight": true, | ||
1030 | "_isAbsTop": true, | ||
1031 | "_isAbsBottom": true, | ||
1032 | "_isAbsHorizontalCenter": true, | ||
1033 | "_isAbsVerticalCenter": true, | ||
1034 | "_originalWidth": 0, | ||
1035 | "_originalHeight": 0, | ||
1036 | "_id": "30wK+HB5dN+K4M5Bv7RBpz" | ||
1037 | }, | ||
1038 | { | ||
1039 | "__type__": "cc.Node", | ||
1040 | "_name": "history", | ||
1041 | "_objFlags": 0, | ||
1042 | "_parent": { | ||
1043 | "__id__": 17 | ||
1044 | }, | ||
1045 | "_children": [], | ||
1046 | "_active": false, | ||
1047 | "_level": 2, | ||
1048 | "_components": [ | ||
1049 | { | ||
1050 | "__id__": 25 | ||
1051 | }, | ||
1052 | { | ||
1053 | "__id__": 26 | ||
1054 | } | ||
1055 | ], | ||
1056 | "_prefab": null, | ||
1057 | "_opacity": 255, | ||
1058 | "_color": { | ||
1059 | "__type__": "cc.Color", | ||
1060 | "r": 255, | ||
1061 | "g": 255, | ||
1062 | "b": 255, | ||
1063 | "a": 255 | ||
1064 | }, | ||
1065 | "_contentSize": { | ||
1066 | "__type__": "cc.Size", | ||
1067 | "width": 108, | ||
1068 | "height": 48 | ||
1069 | }, | ||
1070 | "_anchorPoint": { | ||
1071 | "__type__": "cc.Vec2", | ||
1072 | "x": 0.5, | ||
1073 | "y": 0.5 | ||
1074 | }, | ||
1075 | "_position": { | ||
1076 | "__type__": "cc.Vec3", | ||
1077 | "x": 427, | ||
1078 | "y": 310, | ||
1079 | "z": 0 | ||
1080 | }, | ||
1081 | "_scale": { | ||
1082 | "__type__": "cc.Vec3", | ||
1083 | "x": 1, | ||
1084 | "y": 1, | ||
1085 | "z": 1 | ||
1086 | }, | ||
1087 | "_eulerAngles": { | ||
1088 | "__type__": "cc.Vec3", | ||
1089 | "x": 0, | ||
1090 | "y": 0, | ||
1091 | "z": 0 | ||
1092 | }, | ||
1093 | "_skewX": 0, | ||
1094 | "_skewY": 0, | ||
1095 | "_is3DNode": false, | ||
1096 | "groupIndex": 0, | ||
1097 | "_id": "5a8qPirfxKcJr1VsOOYd7K" | ||
1098 | }, | ||
1099 | { | ||
1100 | "__type__": "cc.Sprite", | ||
1101 | "_name": "", | ||
1102 | "_objFlags": 0, | ||
1103 | "node": { | ||
1104 | "__id__": 24 | ||
1105 | }, | ||
1106 | "_enabled": true, | ||
1107 | "_materials": [ | ||
1108 | { | ||
1109 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
1110 | } | ||
1111 | ], | ||
1112 | "_srcBlendFactor": 770, | ||
1113 | "_dstBlendFactor": 771, | ||
1114 | "_spriteFrame": { | ||
1115 | "__uuid__": "8c0c790b-4b85-43a1-8b6c-a8686b700df6" | ||
1116 | }, | ||
1117 | "_type": 0, | ||
1118 | "_sizeMode": 1, | ||
1119 | "_fillType": 0, | ||
1120 | "_fillCenter": { | ||
1121 | "__type__": "cc.Vec2", | ||
1122 | "x": 0, | ||
1123 | "y": 0 | ||
1124 | }, | ||
1125 | "_fillStart": 0, | ||
1126 | "_fillRange": 0, | ||
1127 | "_isTrimmedMode": true, | ||
1128 | "_atlas": null, | ||
1129 | "_id": "73kwIf2EhLvbMiSYrTU8fZ" | ||
1130 | }, | ||
1131 | { | ||
1132 | "__type__": "cc.Widget", | ||
1133 | "_name": "", | ||
1134 | "_objFlags": 0, | ||
1135 | "node": { | ||
1136 | "__id__": 24 | ||
1137 | }, | ||
1138 | "_enabled": true, | ||
1139 | "alignMode": 1, | ||
1140 | "_target": null, | ||
1141 | "_alignFlags": 9, | ||
1142 | "_left": 1013, | ||
1143 | "_right": 0, | ||
1144 | "_top": 26, | ||
1145 | "_bottom": 0, | ||
1146 | "_verticalCenter": 0, | ||
1147 | "_horizontalCenter": 0, | ||
1148 | "_isAbsLeft": true, | ||
1149 | "_isAbsRight": true, | ||
1150 | "_isAbsTop": true, | ||
1151 | "_isAbsBottom": true, | ||
1152 | "_isAbsHorizontalCenter": true, | ||
1153 | "_isAbsVerticalCenter": true, | ||
1154 | "_originalWidth": 0, | ||
1155 | "_originalHeight": 0, | ||
1156 | "_id": "91sa5VKrFDvIloUk0T/ZQm" | ||
1157 | }, | ||
1158 | { | ||
1159 | "__type__": "cc.Node", | ||
1160 | "_name": "search", | ||
1161 | "_objFlags": 0, | ||
1162 | "_parent": { | ||
1163 | "__id__": 17 | ||
1164 | }, | ||
1165 | "_children": [], | ||
1166 | "_active": false, | ||
1167 | "_level": 2, | ||
1168 | "_components": [ | ||
1169 | { | ||
1170 | "__id__": 28 | ||
1171 | }, | ||
1172 | { | ||
1173 | "__id__": 29 | ||
1174 | } | ||
1175 | ], | ||
1176 | "_prefab": null, | ||
1177 | "_opacity": 255, | ||
1178 | "_color": { | ||
1179 | "__type__": "cc.Color", | ||
1180 | "r": 255, | ||
1181 | "g": 255, | ||
1182 | "b": 255, | ||
1183 | "a": 255 | ||
1184 | }, | ||
1185 | "_contentSize": { | ||
1186 | "__type__": "cc.Size", | ||
1187 | "width": 108, | ||
1188 | "height": 48 | ||
1189 | }, | ||
1190 | "_anchorPoint": { | ||
1191 | "__type__": "cc.Vec2", | ||
1192 | "x": 0.5, | ||
1193 | "y": 0.5 | ||
1194 | }, | ||
1195 | "_position": { | ||
1196 | "__type__": "cc.Vec3", | ||
1197 | "x": 545, | ||
1198 | "y": 310, | ||
1199 | "z": 0 | ||
1200 | }, | ||
1201 | "_scale": { | ||
1202 | "__type__": "cc.Vec3", | ||
1203 | "x": 1, | ||
1204 | "y": 1, | ||
1205 | "z": 1 | ||
1206 | }, | ||
1207 | "_eulerAngles": { | ||
1208 | "__type__": "cc.Vec3", | ||
1209 | "x": 0, | ||
1210 | "y": 0, | ||
1211 | "z": 0 | ||
1212 | }, | ||
1213 | "_skewX": 0, | ||
1214 | "_skewY": 0, | ||
1215 | "_is3DNode": false, | ||
1216 | "groupIndex": 0, | ||
1217 | "_id": "f6RVR5r6xKSJwKkWfuZoVo" | ||
1218 | }, | ||
1219 | { | ||
1220 | "__type__": "cc.Sprite", | ||
1221 | "_name": "", | ||
1222 | "_objFlags": 0, | ||
1223 | "node": { | ||
1224 | "__id__": 27 | ||
1225 | }, | ||
1226 | "_enabled": true, | ||
1227 | "_materials": [ | ||
1228 | { | ||
1229 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
1230 | } | ||
1231 | ], | ||
1232 | "_srcBlendFactor": 770, | ||
1233 | "_dstBlendFactor": 771, | ||
1234 | "_spriteFrame": { | ||
1235 | "__uuid__": "2724fd4d-8592-497d-9ab1-4e33968c0e89" | ||
1236 | }, | ||
1237 | "_type": 0, | ||
1238 | "_sizeMode": 1, | ||
1239 | "_fillType": 0, | ||
1240 | "_fillCenter": { | ||
1241 | "__type__": "cc.Vec2", | ||
1242 | "x": 0, | ||
1243 | "y": 0 | ||
1244 | }, | ||
1245 | "_fillStart": 0, | ||
1246 | "_fillRange": 0, | ||
1247 | "_isTrimmedMode": true, | ||
1248 | "_atlas": null, | ||
1249 | "_id": "17hQ03BA9Ca4ThWJsVAe5t" | ||
1250 | }, | ||
1251 | { | ||
1252 | "__type__": "cc.Widget", | ||
1253 | "_name": "", | ||
1254 | "_objFlags": 0, | ||
1255 | "node": { | ||
1256 | "__id__": 27 | ||
1257 | }, | ||
1258 | "_enabled": true, | ||
1259 | "alignMode": 1, | ||
1260 | "_target": null, | ||
1261 | "_alignFlags": 9, | ||
1262 | "_left": 1131, | ||
1263 | "_right": 0, | ||
1264 | "_top": 26, | ||
1265 | "_bottom": 0, | ||
1266 | "_verticalCenter": 0, | ||
1267 | "_horizontalCenter": 0, | ||
1268 | "_isAbsLeft": true, | ||
1269 | "_isAbsRight": true, | ||
1270 | "_isAbsTop": true, | ||
1271 | "_isAbsBottom": true, | ||
1272 | "_isAbsHorizontalCenter": true, | ||
1273 | "_isAbsVerticalCenter": true, | ||
1274 | "_originalWidth": 0, | ||
1275 | "_originalHeight": 0, | ||
1276 | "_id": "a2/o9snvpNqJT40s1JTdzI" | ||
1277 | }, | ||
1278 | { | ||
1279 | "__type__": "cc.Node", | ||
1280 | "_name": "LeftNaviLayout", | ||
1281 | "_objFlags": 0, | ||
1282 | "_parent": { | ||
1283 | "__id__": 2 | ||
1284 | }, | ||
1285 | "_children": [], | ||
1286 | "_active": true, | ||
1287 | "_level": 1, | ||
1288 | "_components": [ | ||
1289 | { | ||
1290 | "__id__": 31 | ||
1291 | }, | ||
1292 | { | ||
1293 | "__id__": 32 | ||
1294 | }, | ||
1295 | { | ||
1296 | "__id__": 33 | ||
1297 | } | ||
1298 | ], | ||
1299 | "_prefab": null, | ||
1300 | "_opacity": 255, | ||
1301 | "_color": { | ||
1302 | "__type__": "cc.Color", | ||
1303 | "r": 255, | ||
1304 | "g": 255, | ||
1305 | "b": 255, | ||
1306 | "a": 255 | ||
1307 | }, | ||
1308 | "_contentSize": { | ||
1309 | "__type__": "cc.Size", | ||
1310 | "width": 100, | ||
1311 | "height": 100 | ||
1312 | }, | ||
1313 | "_anchorPoint": { | ||
1314 | "__type__": "cc.Vec2", | ||
1315 | "x": 0.5, | ||
1316 | "y": 0.5 | ||
1317 | }, | ||
1318 | "_position": { | ||
1319 | "__type__": "cc.Vec3", | ||
1320 | "x": -46.952999999999975, | ||
1321 | "y": -57.77800000000002, | ||
1322 | "z": 0 | ||
1323 | }, | ||
1324 | "_scale": { | ||
1325 | "__type__": "cc.Vec3", | ||
1326 | "x": 1, | ||
1327 | "y": 1, | ||
1328 | "z": 1 | ||
1329 | }, | ||
1330 | "_eulerAngles": { | ||
1331 | "__type__": "cc.Vec3", | ||
1332 | "x": 0, | ||
1333 | "y": 0, | ||
1334 | "z": 0 | ||
1335 | }, | ||
1336 | "_skewX": 0, | ||
1337 | "_skewY": 0, | ||
1338 | "_is3DNode": false, | ||
1339 | "groupIndex": 0, | ||
1340 | "_rotationX": 0, | ||
1341 | "_rotationY": 0, | ||
1342 | "_id": "69iub5QUFKlJZbOYd98Moy" | ||
1343 | }, | ||
1344 | { | ||
1345 | "__type__": "cc.Sprite", | ||
1346 | "_name": "", | ||
1347 | "_objFlags": 0, | ||
1348 | "node": { | ||
1349 | "__id__": 30 | ||
1350 | }, | ||
1351 | "_enabled": true, | ||
1352 | "_materials": [ | ||
1353 | { | ||
1354 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
1355 | } | ||
1356 | ], | ||
1357 | "_srcBlendFactor": 770, | ||
1358 | "_dstBlendFactor": 771, | ||
1359 | "_spriteFrame": null, | ||
1360 | "_type": 1, | ||
1361 | "_sizeMode": 0, | ||
1362 | "_fillType": 0, | ||
1363 | "_fillCenter": { | ||
1364 | "__type__": "cc.Vec2", | ||
1365 | "x": 0, | ||
1366 | "y": 0 | ||
1367 | }, | ||
1368 | "_fillStart": 0, | ||
1369 | "_fillRange": 0, | ||
1370 | "_isTrimmedMode": true, | ||
1371 | "_atlas": null, | ||
1372 | "_id": "26Ql9OXmxGI7lB2aDBhZAP" | ||
1373 | }, | ||
1374 | { | ||
1375 | "__type__": "cc.Layout", | ||
1376 | "_name": "", | ||
1377 | "_objFlags": 0, | ||
1378 | "node": { | ||
1379 | "__id__": 30 | ||
1380 | }, | ||
1381 | "_enabled": true, | ||
1382 | "_layoutSize": { | ||
1383 | "__type__": "cc.Size", | ||
1384 | "width": 100, | ||
1385 | "height": 100 | ||
1386 | }, | ||
1387 | "_resize": 2, | ||
1388 | "_N$layoutType": 3, | ||
1389 | "_N$padding": 0, | ||
1390 | "_N$cellSize": { | ||
1391 | "__type__": "cc.Size", | ||
1392 | "width": 40, | ||
1393 | "height": 40 | ||
1394 | }, | ||
1395 | "_N$startAxis": 1, | ||
1396 | "_N$paddingLeft": 0, | ||
1397 | "_N$paddingRight": 0, | ||
1398 | "_N$paddingTop": 0, | ||
1399 | "_N$paddingBottom": 0, | ||
1400 | "_N$spacingX": 0, | ||
1401 | "_N$spacingY": 0, | ||
1402 | "_N$verticalDirection": 1, | ||
1403 | "_N$horizontalDirection": 0, | ||
1404 | "_N$affectedByScale": false, | ||
1405 | "_id": "02q0yVtilE4osvaqeyHIMc" | ||
1406 | }, | ||
1407 | { | ||
1408 | "__type__": "cc.Widget", | ||
1409 | "_name": "", | ||
1410 | "_objFlags": 0, | ||
1411 | "node": { | ||
1412 | "__id__": 30 | ||
1413 | }, | ||
1414 | "_enabled": true, | ||
1415 | "alignMode": 1, | ||
1416 | "_target": null, | ||
1417 | "_alignFlags": 9, | ||
1418 | "_left": 543.047, | ||
1419 | "_right": 0, | ||
1420 | "_top": 367.778, | ||
1421 | "_bottom": 0, | ||
1422 | "_verticalCenter": 0, | ||
1423 | "_horizontalCenter": 0, | ||
1424 | "_isAbsLeft": true, | ||
1425 | "_isAbsRight": true, | ||
1426 | "_isAbsTop": true, | ||
1427 | "_isAbsBottom": true, | ||
1428 | "_isAbsHorizontalCenter": true, | ||
1429 | "_isAbsVerticalCenter": true, | ||
1430 | "_originalWidth": 0, | ||
1431 | "_originalHeight": 0, | ||
1432 | "_id": "d6M9RdbjVCuY+Yq7AAexFK" | ||
1433 | }, | ||
1434 | { | ||
1435 | "__type__": "cc.Canvas", | ||
1436 | "_name": "", | ||
1437 | "_objFlags": 0, | ||
1438 | "node": { | ||
1439 | "__id__": 2 | ||
1440 | }, | ||
1441 | "_enabled": true, | ||
1442 | "_designResolution": { | ||
1443 | "__type__": "cc.Size", | ||
1444 | "width": 1280, | ||
1445 | "height": 720 | ||
1446 | }, | ||
1447 | "_fitWidth": false, | ||
1448 | "_fitHeight": true, | ||
1449 | "_id": "6f5cteKmlPh6NGUsUqxlFR" | ||
1450 | }, | ||
1451 | { | ||
1452 | "__type__": "280c3rsZJJKnZ9RqbALVwtK", | ||
1453 | "_name": "", | ||
1454 | "_objFlags": 0, | ||
1455 | "node": { | ||
1456 | "__id__": 2 | ||
1457 | }, | ||
1458 | "_enabled": true, | ||
1459 | "_cLog": null, | ||
1460 | "_cApplication": null, | ||
1461 | "_cFocus": null, | ||
1462 | "_aFocusTargets": [], | ||
1463 | "_fiCurrentFocus": null, | ||
1464 | "_iSceneStatus": 0, | ||
1465 | "_fFocusScaleFactor": 1.06, | ||
1466 | "_bIsFocusInit": false, | ||
1467 | "_oSceneContext": null, | ||
1468 | "_oNextSceneParameter": null, | ||
1469 | "_compPlayer": null, | ||
1470 | "_aTouchContext": [], | ||
1471 | "_defaultBackScene": null, | ||
1472 | "_oFocusScaleFactorInfo": null, | ||
1473 | "holdClick": false, | ||
1474 | "_bShowExitBox": false, | ||
1475 | "_iRightRecommendHeight": 0, | ||
1476 | "_aBgHeight": [], | ||
1477 | "PFB_LEFT_RECOMMEND": { | ||
1478 | "__uuid__": "0a9ac85b-6d8a-498b-92ce-d1b35b092920" | ||
1479 | }, | ||
1480 | "PFB_RECOMMEND_RIGHT": { | ||
1481 | "__uuid__": "9058dd42-455f-43f3-93b4-ed587f2159bd" | ||
1482 | }, | ||
1483 | "targetAry": [ | ||
1484 | { | ||
1485 | "__id__": 36 | ||
1486 | }, | ||
1487 | { | ||
1488 | "__id__": 37 | ||
1489 | }, | ||
1490 | { | ||
1491 | "__id__": 38 | ||
1492 | } | ||
1493 | ], | ||
1494 | "_id": "dcGJ+cSA5D7qNtScKfLjJJ" | ||
1495 | }, | ||
1496 | { | ||
1497 | "__type__": "info", | ||
1498 | "target": { | ||
1499 | "__id__": 30 | ||
1500 | }, | ||
1501 | "num": 0 | ||
1502 | }, | ||
1503 | { | ||
1504 | "__type__": "info", | ||
1505 | "target": { | ||
1506 | "__id__": 13 | ||
1507 | }, | ||
1508 | "num": 0 | ||
1509 | }, | ||
1510 | { | ||
1511 | "__type__": "info", | ||
1512 | "target": { | ||
1513 | "__id__": 9 | ||
1514 | }, | ||
1515 | "num": 0 | ||
1516 | }, | ||
1517 | { | ||
1518 | "__type__": "cc.ScrollView", | ||
1519 | "_name": "", | ||
1520 | "_objFlags": 0, | ||
1521 | "node": { | ||
1522 | "__id__": 2 | ||
1523 | }, | ||
1524 | "_enabled": true, | ||
1525 | "horizontal": false, | ||
1526 | "vertical": true, | ||
1527 | "inertia": true, | ||
1528 | "brake": 1, | ||
1529 | "elastic": true, | ||
1530 | "bounceDuration": 1, | ||
1531 | "scrollEvents": [], | ||
1532 | "cancelInnerEvents": true, | ||
1533 | "_N$content": { | ||
1534 | "__id__": 5 | ||
1535 | }, | ||
1536 | "content": { | ||
1537 | "__id__": 5 | ||
1538 | }, | ||
1539 | "_id": "d87WXBbQpNp76VZw/tO/Tu" | ||
1540 | } | ||
1541 | ] | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Scene/SceneRecommend.fire.meta
0 → 100644
assets/Script.meta
0 → 100644
assets/Script/CCLayout.js
0 → 100644
1 | cc.Class({ | ||
2 | extends: cc.Layout, | ||
3 | |||
4 | properties: { | ||
5 | |||
6 | }, | ||
7 | |||
8 | _doLayoutDirty: function () { | ||
9 | this._layoutDirty = true; | ||
10 | //----------------------------------------------- | ||
11 | var children = this.node.children; | ||
12 | for (var i = 0; i < children.length; ++i) { | ||
13 | var child = children[i]; | ||
14 | child.zIndex=10; | ||
15 | } | ||
16 | //----------------------------------------------- | ||
17 | }, | ||
18 | |||
19 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Script/CCLayout.js.meta
0 → 100644
assets/Script/CCTVFocus.js
0 → 100644
1 | /** | ||
2 | * 扩展TVFocus,新增字段_bChangeZIndex,Layout模式下禁止改动zIndex,扰乱Layout排序 | ||
3 | */ | ||
4 | |||
5 | var Common = require('Common'); | ||
6 | var TVFocus = require('TVFocus'); | ||
7 | //var AbstractTVFocus=require('AbstractTVFocus'); | ||
8 | |||
9 | cc.Class({ | ||
10 | //name:"TVFocus", | ||
11 | extends: TVFocus, | ||
12 | //extends: cc.Node, 引擎团队的人不推荐这么做 | ||
13 | |||
14 | properties: { | ||
15 | _bChangeZIndex: false, | ||
16 | }, | ||
17 | |||
18 | init: function (strName, oScene, fiCurrentFocus,//Left,fTop,fObjectWidth,fObjectHeight, | ||
19 | fScreenWidth, fScreenHeight, fCornerOuterRadius, fCornerInnerRadius, fScaleFactor, bChangeZIndex) { | ||
20 | this._bChangeZIndex = bChangeZIndex; | ||
21 | //TODO:这个函数里面是否要做onbeforeFocus和onAfterFocus的操作 --question from eva | ||
22 | //cc.log(this instanceof Sprite); // true | ||
23 | if (strName) { | ||
24 | this.name = strName; | ||
25 | } else { | ||
26 | cc.log('No Focus Name Specified'); | ||
27 | return; | ||
28 | } | ||
29 | if (oScene) { | ||
30 | this._oScene = oScene; | ||
31 | } else { | ||
32 | cc.log('No Scene Specified for Focus'); | ||
33 | } | ||
34 | fScaleFactor = fScaleFactor || fiCurrentFocus.getScaleFactor(); | ||
35 | //this.width=fObjectWidth; | ||
36 | //this.height=fObjectHeight; | ||
37 | var fLeft = fiCurrentFocus.getLeft(); | ||
38 | var fTop = fiCurrentFocus.getTop(); | ||
39 | var fObjectWidth = fiCurrentFocus.getWidth(); | ||
40 | var fObjectHeight = fiCurrentFocus.getHeight(); | ||
41 | if (fScreenWidth) { | ||
42 | this._screenWidth = fScreenWidth; | ||
43 | } | ||
44 | if (fScreenHeight) { | ||
45 | this._screenHeight = fScreenHeight; | ||
46 | } | ||
47 | if (fCornerOuterRadius) { | ||
48 | this._cornerOuterRadius = fCornerOuterRadius; | ||
49 | } | ||
50 | if (fCornerInnerRadius) { | ||
51 | this._cornerInnerRadius = fCornerInnerRadius; | ||
52 | } | ||
53 | var oTransformedPosition = this.transformCoordinatesWeb2Cocos(fLeft, fTop, fObjectWidth, fObjectHeight); | ||
54 | this.node.x = oTransformedPosition.x; | ||
55 | this.node.y = oTransformedPosition.y; | ||
56 | var urlFocus = null; | ||
57 | var textureFocus = null; | ||
58 | //1 2 3 | ||
59 | //4 6 | ||
60 | //7 8 9 | ||
61 | for (var i = 1; i <= 9; i++) { | ||
62 | //this.node.children[i-1] = new cc.Node('focus_'+i); | ||
63 | this.node.addChild(new cc.Node('focus_' + i), 10); | ||
64 | if (5 == i) { | ||
65 | continue; | ||
66 | } | ||
67 | // urlFocus = cc.url.raw('resources/Texture/Focus/'+i+'.png'); | ||
68 | // textureFocus = cc.textureCache.addImage(urlFocus); | ||
69 | var spriteTemp = this.node.getChildByName('focus_' + i).addComponent(cc.Sprite); | ||
70 | // spriteTemp.spriteFrame = new cc.SpriteFrame(textureFocus); | ||
71 | var ftaScaleTo = null | ||
72 | if (2 == i || 8 == i) { | ||
73 | //spriteTemp.sizeMode = cc.Sprite.SizeMode.CUSTOM; | ||
74 | //spriteTemp.type= cc.Sprite.Type.FILLED; | ||
75 | //spriteTemp.fillType = cc.Sprite.FillType.HORIZONTAL; | ||
76 | //spriteTemp.width=fObjectWidth-2*fCornerInnerRadius; | ||
77 | //this.node.children[i-1].width=fObjectWidth-2*fCornerInnerRadius; | ||
78 | //this.node.children[i-1].height=fCornerOuterRadius; | ||
79 | ftaScaleTo = cc.scaleTo(0, fScaleFactor * (fObjectWidth - 2 * fCornerInnerRadius), fScaleFactor * 1.0); | ||
80 | } else if (4 == i || 6 == i) { | ||
81 | //spriteTemp.sizeMode = cc.Sprite.SizeMode.CUSTOM; | ||
82 | //spriteTemp.type= cc.Sprite.Type.FILLED; | ||
83 | //spriteTemp.fillType = cc.Sprite.FillType.VERTICAL; | ||
84 | //spriteTemp.height=fObjectHeight-2*fCornerInnerRadius; | ||
85 | //this.node.children[i-1].setContentSize(); | ||
86 | //this.node.children[i-1].width=fCornerOuterRadius; | ||
87 | //this.node.children[i-1].height=fObjectHeight-2*fCornerInnerRadius; | ||
88 | ftaScaleTo = cc.scaleTo(0, fScaleFactor * 1.0, fScaleFactor * (fObjectHeight - 2 * fCornerInnerRadius)); | ||
89 | } else { | ||
90 | ftaScaleTo = cc.scaleTo(0, fScaleFactor, fScaleFactor); | ||
91 | } | ||
92 | ftaScaleTo.setTag(Common.FOCUS_CELL_TRANSFER); | ||
93 | this.node.children[i - 1].stopAllActions(); | ||
94 | this.node.children[i - 1].runAction(ftaScaleTo); | ||
95 | } | ||
96 | //TODO:2.0版本采用异步加载本地图片,在焦点初始完成后在批量处理图片 | ||
97 | //TODO:循环中焦点框不是连续的,而批量加载的图地址是连续的需特殊处理下 | ||
98 | var self = this; | ||
99 | cc.loader.loadResDir("focus", cc.Texture2D, function (err, textures) { | ||
100 | for (let i = 1; i < 10; i++) { | ||
101 | if (i == 2 || i == 4 || i == 6 || i == 8) continue; //暂时将焦点框一部分隐藏 | ||
102 | if (i >= 5) { | ||
103 | if (i == 5) continue; | ||
104 | self.node.getChildByName('focus_' + i).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(textures[i - 2]); | ||
105 | } else { | ||
106 | self.node.getChildByName('focus_' + i).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(textures[i - 1]); | ||
107 | } | ||
108 | } | ||
109 | }); | ||
110 | |||
111 | this.node.children[0].x = fScaleFactor * (-fObjectWidth / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
112 | this.node.children[0].y = fScaleFactor * (fObjectHeight / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
113 | this.node.children[1].x = 0; | ||
114 | this.node.children[1].y = fScaleFactor * (fObjectHeight / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
115 | this.node.children[2].x = fScaleFactor * (fObjectWidth / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
116 | this.node.children[2].y = fScaleFactor * (fObjectHeight / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
117 | |||
118 | this.node.children[3].x = fScaleFactor * (-fObjectWidth / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
119 | this.node.children[3].y = 0; | ||
120 | //this.node.children[4].x=0; | ||
121 | //this.node.children[4].y=0; | ||
122 | this.node.children[5].x = fScaleFactor * (fObjectWidth / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
123 | this.node.children[5].y = 0; | ||
124 | |||
125 | this.node.children[6].x = fScaleFactor * (-fObjectWidth / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
126 | this.node.children[6].y = fScaleFactor * (-fObjectHeight / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
127 | this.node.children[7].x = 0; | ||
128 | this.node.children[7].y = fScaleFactor * (-fObjectHeight / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
129 | this.node.children[8].x = fScaleFactor * (fObjectWidth / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
130 | this.node.children[8].y = fScaleFactor * (-fObjectHeight / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
131 | |||
132 | //放大 当前选中的Node | ||
133 | var ftaScaleCurrentFocus = cc.scaleTo(0, fScaleFactor, fScaleFactor); | ||
134 | ftaScaleCurrentFocus.setTag(Common.FEATURE_NODE_TRANSFER); | ||
135 | |||
136 | if (bChangeZIndex) { | ||
137 | |||
138 | } else { | ||
139 | fiCurrentFocus.node.zIndex = 40; | ||
140 | } | ||
141 | |||
142 | fiCurrentFocus.node.stopAllActions(); | ||
143 | fiCurrentFocus.node.runAction(ftaScaleCurrentFocus); | ||
144 | |||
145 | //开始呼吸动画 | ||
146 | var aiFocusBreath = cc.repeatForever(cc.sequence(cc.fadeTo(1, 100), cc.fadeTo(1, 255), cc.fadeTo(2, 255))); | ||
147 | aiFocusBreath.setTag(Common.FOCUS_CONTAINER_BREATH); | ||
148 | this.node.stopAllActions(); | ||
149 | this.node.runAction(aiFocusBreath); | ||
150 | |||
151 | this._oScene.setCurrentFocus(fiCurrentFocus); | ||
152 | }, | ||
153 | |||
154 | flyFocus: function (fiCurrentFocus, fiFocusTarget, iDirection, fScaleFactor, oScrollParameter, iDuration) { | ||
155 | if (null == fiFocusTarget) {//todo:先判断这个是否更划得来 | ||
156 | //找不到目标的动画小交互 | ||
157 | //var blink1=cc.blink(0.6,20); | ||
158 | //this.node.runAction(blink1); | ||
159 | |||
160 | let aiJoggle = cc.repeat( | ||
161 | cc.sequence( | ||
162 | cc.rotateTo(0.02, -2), | ||
163 | cc.rotateTo(0.02, 0), | ||
164 | cc.rotateTo(0.02, 2), | ||
165 | cc.rotateTo(0.02, 0) | ||
166 | ), | ||
167 | 4 | ||
168 | ); | ||
169 | aiJoggle.setTag(Common.FOCUS_CONTAINER_JOGGLE); | ||
170 | //if (null!=this.node.getActionByTag(Common.FOCUS_CONTAINER_JOGGLE)){ | ||
171 | // this.node.stopAction(Common.FOCUS_CONTAINER_JOGGLE); | ||
172 | //} | ||
173 | this.node.stopAction(this.node.getActionByTag(Common.FOCUS_CONTAINER_JOGGLE)); | ||
174 | this.node.runAction(aiJoggle); | ||
175 | return 0; | ||
176 | } | ||
177 | |||
178 | if (null == fiCurrentFocus) { | ||
179 | fiCurrentFocus = this._oScene.getCurrentFocusInfo(); | ||
180 | } | ||
181 | |||
182 | fScaleFactor = fScaleFactor || fiFocusTarget.getScaleFactor(); | ||
183 | if (null == fScaleFactor) { | ||
184 | fScaleFactor = 1.0; | ||
185 | } | ||
186 | |||
187 | if (null == iDuration) { | ||
188 | iDuration = Common.FOCUS_FLY_DURATION; | ||
189 | } | ||
190 | |||
191 | //是否是有效方向 | ||
192 | if (Common.MOVE_DIRECTION_UP <= iDirection && iDirection <= Common.MOVE_DIRECTION_LEFT) { | ||
193 | //滚屏相关参数 elScroll,iScrollStep 如果都有效开始处理滚屏 | ||
194 | //oScrollParameter.element 需要滚动的元素 Object[Element] | ||
195 | //oScrollParameter.step 滚动的距离 Integer | ||
196 | //oScrollParameter.relation 滚动是否和焦点元素有关? Integer [0|1] | ||
197 | //oScrollParameter.direction 滚动方向 ['left'|'right'|'up'|'down'] | ||
198 | |||
199 | //旧的时间通知 | ||
200 | //this.node.dispachEvent('before_focus_change', { from: fiCurrentFocus, to: fiFocusTarget}); | ||
201 | let eventBeforeFocus = new cc.Event.EventCustom('before_focus_change', true); | ||
202 | eventBeforeFocus.setUserData({ from: fiCurrentFocus, to: fiFocusTarget }); | ||
203 | this.node.dispatchEvent(eventBeforeFocus); | ||
204 | |||
205 | let eventOnBlur = new cc.Event.EventCustom('blur', true); | ||
206 | eventOnBlur.setUserData({ from: fiCurrentFocus, to: fiFocusTarget }); | ||
207 | this.node.dispatchEvent(eventOnBlur); | ||
208 | //let eventOnFocus=new cc.Event. | ||
209 | let nodeCurrent = fiCurrentFocus.node;//node; | ||
210 | let nodeTarget = fiFocusTarget.node;//node; | ||
211 | //if (fiCurrentFocus && fiCurrentFocus.onBlur && typeof fiCurrentFocus.onBlur =='function' ){ | ||
212 | // fiCurrentFocus.onBlur(); | ||
213 | //} | ||
214 | //处理因焦点移动导致的部分界面滑动 | ||
215 | let fXScrollStep = 0; | ||
216 | let fYScrollStep = 0; | ||
217 | let fXScrollTarget = 0; //新方法 | ||
218 | let fYScrollTarget = 0; //新方法 | ||
219 | if (null != oScrollParameter && null != oScrollParameter.node | ||
220 | && null != oScrollParameter.getStep() && null != oScrollParameter.getHasRelation()) { //满足此条件才考虑界面滚动 | ||
221 | //MOVE_DIRECTION_UP:0, | ||
222 | //MOVE_DIRECTION_RIGHT:1, | ||
223 | //MOVE_DIRECTION_DOWN:2, | ||
224 | //MOVE_DIRECTION_LEFT:3, | ||
225 | //默认反向 | ||
226 | if (null == oScrollParameter.getDirection()) { | ||
227 | switch (iDirection) { | ||
228 | case Common.MOVE_DIRECTION_UP: oScrollParameter.setDirection(Common.MOVE_DIRECTION_DOWN); break; | ||
229 | case Common.MOVE_DIRECTION_RIGHT: oScrollParameter.setDirection(Common.MOVE_DIRECTION_LEFT); break; | ||
230 | case Common.MOVE_DIRECTION_DOWN: oScrollParameter.setDirection(Common.MOVE_DIRECTION_UP); break; | ||
231 | case Common.MOVE_DIRECTION_LEFT: oScrollParameter.setDirection(Common.MOVE_DIRECTION_RIGHT); break; | ||
232 | } | ||
233 | } | ||
234 | //Deprecated Start | ||
235 | switch (oScrollParameter.getDirection()) { | ||
236 | case Common.MOVE_DIRECTION_UP: | ||
237 | fYScrollStep = oScrollParameter.getStep(); | ||
238 | break; | ||
239 | case Common.MOVE_DIRECTION_DOWN: | ||
240 | fYScrollStep = -oScrollParameter.getStep(); | ||
241 | break; | ||
242 | case Common.MOVE_DIRECTION_LEFT: | ||
243 | fXScrollStep = -oScrollParameter.getStep(); | ||
244 | break; | ||
245 | case Common.MOVE_DIRECTION_RIGHT: | ||
246 | fXScrollStep = oScrollParameter.getStep(); | ||
247 | break; | ||
248 | |||
249 | } | ||
250 | //let ftaMoveToScrollParameter = cc.moveTo(iDuration, | ||
251 | // oScrollParameter.node.x+fXScrollStep, | ||
252 | // oScrollParameter.node.y-fYScrollStep | ||
253 | // ); | ||
254 | //Deprecated End | ||
255 | switch (oScrollParameter.getDirection()) { //正负在外面算好了 | ||
256 | case Common.MOVE_DIRECTION_UP: | ||
257 | fYScrollTarget = oScrollParameter.getTargetPosition(); | ||
258 | break; | ||
259 | case Common.MOVE_DIRECTION_DOWN: | ||
260 | fYScrollTarget = oScrollParameter.getTargetPosition(); | ||
261 | break; | ||
262 | case Common.MOVE_DIRECTION_LEFT: | ||
263 | fXScrollTarget = oScrollParameter.getTargetPosition(); | ||
264 | break; | ||
265 | case Common.MOVE_DIRECTION_RIGHT: | ||
266 | fXScrollTarget = oScrollParameter.getTargetPosition(); | ||
267 | break; | ||
268 | |||
269 | } | ||
270 | let finished = cc.callFunc((oScrollParameter.callback ? oScrollParameter.callback : function () { | ||
271 | cc.log("do something"); | ||
272 | }), this, oScrollParameter.scope);//todo:这里是否考虑要个回调 | ||
273 | let ftaMoveToScrollParameter = cc.sequence(cc.moveTo(iDuration, fXScrollTarget, fYScrollTarget), finished); | ||
274 | |||
275 | ftaMoveToScrollParameter.setTag(Common.SCROLL_BY_FOCUS_CHANGE); | ||
276 | oScrollParameter.node.stopAction(oScrollParameter.node.getActionByTag(Common.SCROLL_BY_FOCUS_CHANGE)); | ||
277 | //oScrollParameter.node.stopAllActions(); | ||
278 | oScrollParameter.node.runAction(ftaMoveToScrollParameter); | ||
279 | oScrollParameter.setDirection(null); | ||
280 | //oScrollParameter.node.x+=fXScrollStep; | ||
281 | //oScrollParameter.node.y-=fYScrollStep; | ||
282 | } | ||
283 | |||
284 | //由于浮点数变成坐标必须取整所以不可避免会形成误差,其中的+1 -1为了保证边框不留空隙 | ||
285 | //Target会比边框稍大 | ||
286 | |||
287 | //let fDestFocusLeft = iScaledTargetLeft - g_iFocusFrameWidth + iXScrollStep + "px"; | ||
288 | //let fDestFocusTop = iScaledTargetTop - g_iFocusFrameHeight + iYScrollStep + "px"; | ||
289 | //let fDestFocusWidth = iScaledTargetWidth + 2 * g_iFocusFrameWidth + "px"; | ||
290 | //let fDestFocusHeight = iScaledTargetHeight + 2 * g_iFocusFrameHeight + "px"; | ||
291 | |||
292 | //只要改掉相对Left Top 就可 | ||
293 | //此处需很小心处理和上下代码的关系 | ||
294 | /* | ||
295 | if (null != oScrollParameter && null != oScrollParameter.node | ||
296 | && null != oScrollParameter.getStep() && null != oScrollParameter.getHasRelation()) { //满足此条件才考虑界面滚动 | ||
297 | let sizeVisible = cc.Director.getVisibleSize(); | ||
298 | let fDestScrollElementLeft = oScrollParameter.node.x + fXScrollStep; | ||
299 | let fDestScrollElementTop = sizeVisible.height - oScrollParameter.node.y + fYScrollStep; | ||
300 | |||
301 | //这里还缺少动画 必须一起开始动 | ||
302 | oScrollParameter.node.x=fDestScrollElementLeft; | ||
303 | oScrollParameter.node.y=oScrollParameter.node.y - fYScrollStep; | ||
304 | }*/ | ||
305 | |||
306 | //准备好了所有数据 这里开始一起行动 | ||
307 | //if (g_fnOnBeforeFocusChange) { | ||
308 | // g_fnOnBeforeFocusChange(elFocusNow, elFocusTarget, strDirection); | ||
309 | //} | ||
310 | |||
311 | //按比例将焦点目标的区域进行缩放 得注意浮点数的问题 | ||
312 | |||
313 | let ftaScaleCurrentFocus = cc.scaleTo(iDuration, 1.0, 1.0); | ||
314 | let ftaScaleFocusTarget = cc.scaleTo(iDuration, fScaleFactor, fScaleFactor); | ||
315 | |||
316 | /* | ||
317 | log("ArchorPoint:%f,%f,%f,%f", pfiCurrentFocus->node->getAnchorPoint().x, | ||
318 | pfiCurrentFocus->node->getAnchorPoint().y, | ||
319 | pfiCurrentFocus->node->getAnchorPointInPoints().x, | ||
320 | pfiCurrentFocus->node->getAnchorPointInPoints().y ); | ||
321 | */ | ||
322 | /* | ||
323 | //红点测试 | ||
324 | auto sprite1 = cocos2d::Sprite::create("image/red_point.png"); | ||
325 | sprite1->setPosition(0,0 | ||
326 | // pfiCurrentFocus->node->getAnchorPointInPoints().x | ||
327 | //, pfiCurrentFocus->node->getAnchorPointInPoints().y); | ||
328 | |||
329 | pfiCurrentFocus->node->addChild(sprite1, 20, "PointFlag"); | ||
330 | */ | ||
331 | |||
332 | // nodeCurrent.setLocalZOrder(10); | ||
333 | // nodeTarget.setLocalZOrder(40); | ||
334 | if (this._bChangeZIndex) { | ||
335 | |||
336 | } else { | ||
337 | nodeCurrent.zIndex = 10; | ||
338 | nodeTarget.zIndex = 40; | ||
339 | } | ||
340 | |||
341 | ftaScaleCurrentFocus.setTag(Common.FEATURE_NODE_TRANSFER); | ||
342 | ftaScaleFocusTarget.setTag(Common.FEATURE_NODE_TRANSFER); | ||
343 | //if (null!=nodeCurrent.getActionByTag(Common.FEATURE_NODE_TRANSFER)){ | ||
344 | // nodeCurrent.stopAction(Common.FEATURE_NODE_TRANSFER); | ||
345 | //} | ||
346 | //if (null!=nodeTarget.getActionByTag(Common.FEATURE_NODE_TRANSFER)){ | ||
347 | // nodeTarget.stopAction(Common.FEATURE_NODE_TRANSFER); | ||
348 | //} | ||
349 | nodeCurrent.stopAction(nodeCurrent.getActionByTag(Common.FEATURE_NODE_TRANSFER)); | ||
350 | nodeTarget.stopAction(nodeTarget.getActionByTag(Common.FEATURE_NODE_TRANSFER)); | ||
351 | nodeCurrent.runAction(ftaScaleCurrentFocus); | ||
352 | nodeTarget.runAction(ftaScaleFocusTarget); | ||
353 | cc.log(fiFocusTarget.getLeft()); | ||
354 | cc.log(fiFocusTarget.getTop()); | ||
355 | this.fly(fiFocusTarget.getLeft() + fXScrollStep, fiFocusTarget.getTop() + fYScrollStep, | ||
356 | fiFocusTarget.getWidth(), fiFocusTarget.getHeight(), | ||
357 | iDuration, fScaleFactor); | ||
358 | //if (fiTarget.onFocus && typeof fiTarget.onFocus =='function' ){ | ||
359 | // fiTarget.onFocus(); | ||
360 | //} | ||
361 | let eventOnFocus = new cc.Event.EventCustom('focus', true); | ||
362 | eventOnFocus.setUserData({ from: fiCurrentFocus, to: fiFocusTarget }); | ||
363 | this.node.dispatchEvent(eventOnFocus); | ||
364 | //旧的事件通知 | ||
365 | //this.node.emit('after_focus_change', { from: fiCurrentFocus, to: fiFocusTarget}); | ||
366 | let eventAfterFocus = new cc.Event.EventCustom('after_focus_change', true); | ||
367 | eventAfterFocus.setUserData({ from: fiCurrentFocus, to: fiFocusTarget }); | ||
368 | this.node.dispatchEvent(eventAfterFocus); | ||
369 | //新的事件通知方式 是否科学有待检验 | ||
370 | //let eventFocusLeave=new cc.Event.EventCustom('focus_leave',true); | ||
371 | //eventFocusLeave.setUserData({from:fiCurrentFocus,to:fiFocusTarget}); | ||
372 | //nodeCurrent.dispatchEvent(eventFocusLeave); | ||
373 | |||
374 | //let eventFocusHover=new cc.Event.EventCustom('focus_hover',true); | ||
375 | //eventFocusHover.setUserData({from:fiCurrentFocus,to:fiFocusTarget}); | ||
376 | //nodeTarget.dispatchEvent(eventFocusHover); | ||
377 | this._oScene.setCurrentFocus(fiFocusTarget); | ||
378 | //计算完成以下开始完成所有动作 | ||
379 | //elFocusNow.style.zIndex = 0; | ||
380 | //elFocusTarget.style.zIndex = 20; | ||
381 | /* | ||
382 | var elFocusContainer = document.getElementById("focus_container"); | ||
383 | //document.getElementById('view_port').style.left = destViewPortLeft; | ||
384 | elFocusContainer.style.left = destFocusLeft; | ||
385 | elFocusContainer.style.top = destFocusTop; | ||
386 | //document.getElementById("focus5").style.width = destFocusWidth; | ||
387 | //document.getElementById("focus5").style.height = destFocusHeight; | ||
388 | elFocusContainer.style.width = destFocusWidth; | ||
389 | elFocusContainer.style.height = destFocusHeight; | ||
390 | */ | ||
391 | //if (g_fnOnAfterFocusChange) { | ||
392 | // g_fnOnAfterFocusChange(elFocusNow, elFocusTarget, strDirection); | ||
393 | //} | ||
394 | //总要先将前面那个复原 | ||
395 | //scaleElement(g_strFocusElementId, 1, 1); | ||
396 | //g_strFocusElementId = elFocusTarget.id; | ||
397 | return 1; | ||
398 | } else { | ||
399 | cc.log("No Target Found to Fly: Unavailable Direction"); | ||
400 | return 0; | ||
401 | } | ||
402 | }, | ||
403 | |||
404 | }); |
assets/Script/CCTVFocus.js.meta
0 → 100644
assets/Script/Recommend.js
0 → 100644
1 | var Common = require('Common'); | ||
2 | var Network = require('Network'); | ||
3 | var TVFocus = require('TVFocus'); | ||
4 | var CCTVFocus = require('CCTVFocus'); | ||
5 | var FocusInfo = require('FocusInfo'); | ||
6 | var TVCanvas = require('TVCanvas'); | ||
7 | var TestLayout = require('TestLayout'); | ||
8 | var waterfall_recommend = require('waterfall_recommend'); | ||
9 | var waterfall_course = require('waterfall_course'); | ||
10 | var waterfall_parent = require('waterfall_parent'); | ||
11 | var waterfall_primarySchool = require('waterfall_primarySchool'); | ||
12 | var waterfall_three2six = require('waterfall_three2six'); | ||
13 | |||
14 | /** | ||
15 | * ScrollView有问题, | ||
16 | * 多个scrollView切换时,高度短的ScrollView无法向上/向下滚动,且初始化后的scrollView位置会错乱 | ||
17 | * 目前暂且将所有scrollView设置为固定高度 | ||
18 | */ | ||
19 | |||
20 | var info = cc.Class({ | ||
21 | name: 'info', | ||
22 | properties: { | ||
23 | target: cc.Node, | ||
24 | num: 0 | ||
25 | } | ||
26 | }); | ||
27 | |||
28 | cc.Class({ | ||
29 | extends: TVCanvas, | ||
30 | |||
31 | properties: { | ||
32 | |||
33 | _iRightRecommendHeight: 0, //右侧瀑布流宽度 | ||
34 | _aBgHeight: [], //右侧瀑布流楼层高度 | ||
35 | |||
36 | PFB_LEFT_RECOMMEND: { //左侧导航栏 | ||
37 | default: null, | ||
38 | type: cc.Prefab | ||
39 | }, | ||
40 | PFB_RECOMMEND_RIGHT: { | ||
41 | default: null, | ||
42 | type: cc.Prefab | ||
43 | }, | ||
44 | targetAry: { | ||
45 | default: [], | ||
46 | type: [info], | ||
47 | }, | ||
48 | }, | ||
49 | |||
50 | onLoad: function () { | ||
51 | this._super(); | ||
52 | this._scrollview = this.node.getComponent(cc.ScrollView); | ||
53 | this._oSceneContext.focusPath = "LeftNaviLayout/NaviCell0"; | ||
54 | this._oSceneContext._iPageIndex = 1; | ||
55 | this._oSceneContext._iCurrentLeftIndex = 0; | ||
56 | this._oInit = {}; | ||
57 | |||
58 | this.getLeftBgRequest(); //渲染左侧导航 | ||
59 | this.getTopBgRequest(); //渲染顶部导航 | ||
60 | this.getRightBgRequest(); //渲染右侧导航 | ||
61 | this.getRightRecommendRequest(waterfall_recommend); //渲染右侧推荐框架 | ||
62 | }, | ||
63 | |||
64 | //请求左侧导航 | ||
65 | getLeftBgRequest: function () { | ||
66 | var arrModules = TestLayout.layout4Page.children; //拿到模拟数据 | ||
67 | let aLeftRecommend = arrModules[0].data.resultSet; //左侧导航栏数据 | ||
68 | let count = aLeftRecommend.length; | ||
69 | var leftNavLayout = this.targetAry[0].target; | ||
70 | this._oInit.aLeftImg = []; | ||
71 | |||
72 | for (let i = 0; i < aLeftRecommend.length; i++) { | ||
73 | let nodeLeftRecommend = cc.instantiate(this.PFB_LEFT_RECOMMEND); | ||
74 | this._oInit.aLeftImg.push(Common.TOPDRAW_IMAGE_SERVER_EDU + aLeftRecommend[i].imageURL); | ||
75 | nodeLeftRecommend.getComponent('pfbRecommendCell').init(aLeftRecommend[i], function () { //让细胞自己渲染 | ||
76 | count--; | ||
77 | if (!count) { //初始化完成了 | ||
78 | leftNavLayout.getComponent(cc.Layout).updateLayout(); | ||
79 | } | ||
80 | }); | ||
81 | leftNavLayout.addChild(nodeLeftRecommend, 10, "NaviCell" + i); | ||
82 | |||
83 | //准备焦点坐标 | ||
84 | let fiNodeBlock = nodeLeftRecommend.addComponent(FocusInfo); | ||
85 | fiNodeBlock.init( | ||
86 | aLeftRecommend[i].tvlink, true, null, null, 1.0 //最后一个参数决定要不要放大显示 | ||
87 | ); | ||
88 | this._aFocusTargets[0]["NaviCell" + i] = nodeLeftRecommend; | ||
89 | } | ||
90 | |||
91 | if (arrModules[0].childrenSize[0] && arrModules[0].childrenSize[1]) { //子元素大小 | ||
92 | leftNavLayout.getComponent(cc.Layout).cellSize = new cc.size(arrModules[0].childrenSize[0], arrModules[0].childrenSize[1]); | ||
93 | leftNavLayout.Width = arrModules[0].childrenSize[0]; //计算Layout宽高 | ||
94 | leftNavLayout.height = arrModules[0].childrenSize[1] * 5 + arrModules[0].childrenMargin[2] * 4; | ||
95 | } | ||
96 | leftNavLayout.getComponent(cc.Layout).spacingY = arrModules[0].childrenMargin[2]; //子元素间距 | ||
97 | if (arrModules[0].position[0] && arrModules[0].position[1]) { //确定位置 | ||
98 | leftNavLayout.getComponent(cc.Widget).top = arrModules[0].position[1]; | ||
99 | leftNavLayout.getComponent(cc.Widget).left = arrModules[0].position[0]; | ||
100 | } | ||
101 | this.checkDataReadyAndInitFocus(); | ||
102 | }, | ||
103 | |||
104 | //请求顶部导航 | ||
105 | getTopBgRequest: function () { | ||
106 | var arrModules = TestLayout.layout4Page.children; //拿到模拟数据 | ||
107 | let aLeftRecommend = arrModules[1].data.resultSet; //顶部导航栏数据 | ||
108 | let count = aLeftRecommend.length; | ||
109 | var topNavLayout = this.targetAry[1].target; | ||
110 | topNavLayout.getComponent(cc.Widget).top = 0; | ||
111 | topNavLayout.getComponent(cc.Widget).left = 0; | ||
112 | |||
113 | this._oInit.aTopImg = []; | ||
114 | for (let i = 0; i < aLeftRecommend.length; i++) { | ||
115 | let nodeLeftRecommend = cc.instantiate(this.PFB_LEFT_RECOMMEND); | ||
116 | nodeLeftRecommend.width = aLeftRecommend[i].width; | ||
117 | nodeLeftRecommend.height = aLeftRecommend[i].height; | ||
118 | this._oInit.aTopImg.push(Common.TOPDRAW_IMAGE_SERVER_EDU + aLeftRecommend[i].imageURL); | ||
119 | nodeLeftRecommend.getComponent('pfbRecommendCell').init(aLeftRecommend[i], function () { //让细胞自己渲染 | ||
120 | count--; | ||
121 | if (!count) { //初始化完成了 | ||
122 | |||
123 | } | ||
124 | }); | ||
125 | // cc.log("------------------->"+aLeftRecommend[i].left); | ||
126 | nodeLeftRecommend.getComponent(cc.Widget).top = aLeftRecommend[i].top; | ||
127 | nodeLeftRecommend.getComponent(cc.Widget).left = aLeftRecommend[i].left; | ||
128 | topNavLayout.addChild(nodeLeftRecommend, 10, "TopCell" + i); | ||
129 | |||
130 | //准备焦点坐标 | ||
131 | let fiNodeBlock = nodeLeftRecommend.addComponent(FocusInfo); | ||
132 | fiNodeBlock.init( | ||
133 | aLeftRecommend[i].tvlink, true, null, null, 1.0 //最后一个参数决定要不要放大显示 | ||
134 | ); | ||
135 | this._aFocusTargets[0]["TopCell" + i] = nodeLeftRecommend; | ||
136 | } | ||
137 | }, | ||
138 | |||
139 | //请求右侧导航 | ||
140 | getRightBgRequest: function () { | ||
141 | var arrModules = TestLayout.layout4Page.children; //拿到模拟数据 | ||
142 | let aLeftRecommend = arrModules[2].data.resultSet; //顶部导航栏数据 | ||
143 | let count = aLeftRecommend.length; | ||
144 | var rightNavLayout = this.targetAry[2].target; | ||
145 | rightNavLayout.width = arrModules[2].width; | ||
146 | rightNavLayout.height = arrModules[2].height; | ||
147 | this._iRightRecommendHeight = arrModules[2].width; | ||
148 | |||
149 | if (arrModules[2].position[0] && arrModules[2].position[1]) { //确定位置 | ||
150 | rightNavLayout.getComponent(cc.Widget).top = arrModules[2].position[1] + 20; //加20是内边距 | ||
151 | rightNavLayout.getComponent(cc.Widget).left = arrModules[2].position[0] + 20; | ||
152 | } | ||
153 | }, | ||
154 | |||
155 | //渲染推荐框架 | ||
156 | getRightRecommendRequest: function (waterfall_model) { | ||
157 | var rightNodeLayout = this.targetAry[2].target; | ||
158 | var arrModules = waterfall_model.waterfall; //拿到模拟数据 | ||
159 | var bgHeight = 0; | ||
160 | this._aBgHeight = []; | ||
161 | this._aBgHeight.push(0); | ||
162 | for (let i = 0; i < arrModules.resultSet.length; i++) { | ||
163 | let nodeLayout = new cc.Node(arrModules.resultSet[i].name); //创建瀑布流的每一层layout | ||
164 | nodeLayout.width = this._iRightRecommendHeight; | ||
165 | nodeLayout.height = arrModules.resultSet[i].height; | ||
166 | var widgetLayout = nodeLayout.addComponent(cc.Widget); | ||
167 | widgetLayout.isAlignTop = true; | ||
168 | widgetLayout.top = bgHeight; | ||
169 | bgHeight += arrModules.resultSet[i].height; //逐层增加高度 | ||
170 | // cc.log("高度"+bgHeight); | ||
171 | if (i == arrModules.resultSet.length - 1) { //最后一个条目不够高,手动加高 | ||
172 | bgHeight += 300; | ||
173 | } | ||
174 | this._aBgHeight.push(bgHeight); | ||
175 | if (arrModules.resultSet[i].hasChildFrame) { //还有子列表 | ||
176 | for (let j = 0; j < arrModules.resultSet[i].data.resultSet.length; j++) { | ||
177 | let oModule = arrModules.resultSet[i].data.resultSet[j]; | ||
178 | if (oModule.hasChildFrame) { | ||
179 | let autoNode = new cc.Node(); //创建特殊层的第二层自动填充的布局 | ||
180 | let autoNodeLayout = autoNode.addComponent(cc.Layout); | ||
181 | autoNodeLayout.type = cc.Layout.Type.GRID; //网格 | ||
182 | autoNodeLayout.resizeMode = cc.Layout.ResizeMode.CHILDREN; //对子节点大小进行缩放 | ||
183 | autoNodeLayout.startAxis = cc.Layout.AxisDirection.HORIZONTAL; //排版起始轴 | ||
184 | autoNodeLayout.horizontalDirection = cc.Layout.HorizontalDirection.LEFT_TO_RIGHT; //布局方向 | ||
185 | let widgetAutoNode = autoNode.addComponent(cc.Widget); | ||
186 | widgetAutoNode.isAlignLeft = true; | ||
187 | widgetAutoNode.isAlignTop = true; | ||
188 | autoNode.width = oModule.width; //获取自动布局宽高 | ||
189 | if (oModule.childrenSize[0] && oModule.childrenSize[1]) { | ||
190 | autoNode.height = oModule.childrenSize[1]; //拿子节点的高 | ||
191 | autoNodeLayout.cellSize = new cc.size(oModule.childrenSize[0], oModule.childrenSize[1]); | ||
192 | } | ||
193 | if (oModule.childrenMargin[1]) { //细胞间隔小些 | ||
194 | autoNodeLayout.spacingX = oModule.childrenMargin[1] / 2; | ||
195 | } | ||
196 | if (oModule.position[0] != "undefined" && oModule.position[1] != "undefined") { //确定位置 | ||
197 | widgetAutoNode.top = oModule.position[1]; | ||
198 | widgetAutoNode.left = oModule.position[0]; | ||
199 | } | ||
200 | for (let k = 0; k < oModule.data.resultSet.length; k++) { //渲染子细胞 | ||
201 | let node = cc.instantiate(this.PFB_RECOMMEND_RIGHT); | ||
202 | if (oModule.childrenSize[0] && oModule.childrenSize[1]) { | ||
203 | node.height = oModule.childrenSize[1]; //拿子节点的高 | ||
204 | node.width = oModule.childrenSize[0]; | ||
205 | node.getChildByName('Pic').height = oModule.childrenSize[1]; //拿子节点的高 | ||
206 | node.getChildByName('Pic').width = oModule.childrenSize[0]; | ||
207 | } | ||
208 | autoNode.addChild(node, 10, oModule.data.resultSet[k].code); | ||
209 | |||
210 | //准备焦点坐标 | ||
211 | let fiNodeBlock = node.addComponent(FocusInfo); | ||
212 | // fiNodeBlock.init( | ||
213 | // oParameter.promotion_items[i].tvlink, true, null, null, 1.0 //最后一个参数决定要不要放大显示 | ||
214 | // ); | ||
215 | this._aFocusTargets[0][oModule.data.resultSet[k].code] = node; | ||
216 | } | ||
217 | // autoNode.parent=nodeLayout; | ||
218 | // cc.log("添加循环子节点"+autoNode.childrenCount); | ||
219 | nodeLayout.addChild(autoNode, 10, "hasChildFrame"); | ||
220 | } else { | ||
221 | let node = cc.instantiate(this.PFB_RECOMMEND_RIGHT); | ||
222 | node.width = oModule.width; | ||
223 | node.height = oModule.height; | ||
224 | node.getChildByName('Pic').width = oModule.width; | ||
225 | node.getChildByName('Pic').height = oModule.height; | ||
226 | node.getComponent(cc.Widget).top = oModule.top; | ||
227 | node.getComponent(cc.Widget).left = oModule.left; | ||
228 | nodeLayout.addChild(node, 10, oModule.code); | ||
229 | |||
230 | if (!oModule.disable) { //标题不给他焦点 | ||
231 | //准备焦点坐标 | ||
232 | let fiNodeBlock = node.addComponent(FocusInfo); | ||
233 | // fiNodeBlock.init( | ||
234 | // oParameter.promotion_items[i].tvlink, true, null, null, 1.0 //最后一个参数决定要不要放大显示 | ||
235 | // ); | ||
236 | this._aFocusTargets[0][oModule.code] = node; | ||
237 | } | ||
238 | } | ||
239 | } | ||
240 | } | ||
241 | nodeLayout.parent = rightNodeLayout; | ||
242 | // cc.log("子节点:"+nodeLayout.childrenCount); | ||
243 | } | ||
244 | this.node.getChildByName("ScrollContent").height = 2539; //这里暂且写死,scrollView有bug | ||
245 | cc.log("ScrollView高度: " + bgHeight); 2239 | ||
246 | this._scrollview.scrollToTop(); | ||
247 | // cc.log("ScrollView相对的偏移量 "+this._scrollview.getMaxScrollOffset()); | ||
248 | |||
249 | // cc.log("子节点个数: "+rightNodeLayout.childrenCount); | ||
250 | |||
251 | this.getNaviPromotion("page_d14e8acf-db3d-4f74-b535-c98458596eb8"); | ||
252 | }, | ||
253 | |||
254 | //请求各导航推荐位图片 | ||
255 | getNaviPromotion: function (pageCode) { | ||
256 | var self = this; | ||
257 | var oGetPromotionPara = { | ||
258 | "view": "json", | ||
259 | "pageCode": pageCode, | ||
260 | token: Common.TEST_API_TOKEN_EDU, | ||
261 | }; | ||
262 | Network.ajax('GET', Common.TOPDRAW_API_SERVER_EDU + "Promotion/ListItemByPage", null, oGetPromotionPara, | ||
263 | function (strResponse) { | ||
264 | try { | ||
265 | var oJSONResult = JSON.parse(strResponse); | ||
266 | var rightNodeLayout = this.targetAry[2].target; | ||
267 | let bolockCount = rightNodeLayout.childrenCount; //组个数 | ||
268 | for (let i = 0; i < oJSONResult.resultSet.length; i++) { //先循环对比最外层 | ||
269 | for (let j = 0; j < bolockCount; j++) { | ||
270 | if (oJSONResult.resultSet[i].name == rightNodeLayout.children[j].name) { | ||
271 | for (let m = 0; m < oJSONResult.resultSet[i].promotions[0].promotion_items.length; m++) { //对比内层 | ||
272 | for (let n = 0; n < rightNodeLayout.children[j].childrenCount; n++) { | ||
273 | let currentRemote = oJSONResult.resultSet[i].promotions[0].promotion_items[m];//匹配的远程条目 | ||
274 | let currentNode = rightNodeLayout.children[j].children[n]; //匹配的已经渲染过的节点 | ||
275 | if (currentRemote.code == currentNode.name) { | ||
276 | Network.loadImageInNativeRuntime( | ||
277 | Common.TOPDRAW_IMAGE_SERVER_EDU_RIGHT + currentRemote.image[0].fileUrl, | ||
278 | function (texture) { | ||
279 | currentNode.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
280 | }, null, this | ||
281 | ); | ||
282 | } else if (currentNode.name == "hasChildFrame" && currentNode.childrenCount > 0) { //渲染自动布局的节点 | ||
283 | for (let k = 0; k < currentNode.childrenCount; k++) { | ||
284 | let sonCurrentNode = currentNode.children[k]; | ||
285 | if (currentRemote.code == sonCurrentNode.name) { | ||
286 | Network.loadImageInNativeRuntime( | ||
287 | Common.TOPDRAW_IMAGE_SERVER_EDU_RIGHT + currentRemote.image[0].fileUrl, | ||
288 | function (texture) { | ||
289 | sonCurrentNode.getChildByName('Pic').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
290 | }, null, this | ||
291 | ); | ||
292 | } | ||
293 | } | ||
294 | } | ||
295 | } | ||
296 | } | ||
297 | } | ||
298 | } | ||
299 | } | ||
300 | } catch (error) { | ||
301 | cc.log("Exception When FloorPromotion..." + error); | ||
302 | } | ||
303 | }, | ||
304 | function (strResponse) { | ||
305 | cc.log("Error When FloorPromotion..." + strResponse); | ||
306 | }, this, "uuid"); | ||
307 | }, | ||
308 | |||
309 | checkDataReadyAndInitFocus: function () { | ||
310 | if (!this._bIsFocusInit) { | ||
311 | this.scheduleOnce(() => { //指定0让回调函数在下一帧立即执行 | ||
312 | this.initFocus(); | ||
313 | }, 0); | ||
314 | this._bIsFocusInit = true; | ||
315 | } | ||
316 | }, | ||
317 | |||
318 | //初始化焦点框 | ||
319 | initFocus: function () { | ||
320 | var nodeInitFocus = cc.find(this._oSceneContext.focusPath, this.node); | ||
321 | // cc.log("初始化 "+nodeInitFocus.name); | ||
322 | var nodeFocus = new cc.Node('nodeFocus'); | ||
323 | this.node.addChild(nodeFocus, 10); | ||
324 | this._cFocus = this.node.getChildByName('nodeFocus').addComponent(CCTVFocus); | ||
325 | this._cFocus.init('focusContainer', this, | ||
326 | nodeInitFocus.getComponent(FocusInfo), | ||
327 | Common.SCREEN_WIDTH, Common.SCREEN_HEIGHT, 2, 6, 1.0, true); | ||
328 | if (0 == nodeInitFocus.name.indexOf('NaviCell')) { | ||
329 | // nodeInitFocus.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, nodeInitFocus.height, nodeInitFocus.width, nodeInitFocus.height)); | ||
330 | Network.loadImageInNativeRuntime( | ||
331 | this._oInit.aLeftImg[0], | ||
332 | function (texture) { | ||
333 | nodeInitFocus.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, nodeInitFocus.height, nodeInitFocus.width, nodeInitFocus.height)); | ||
334 | }, null, this | ||
335 | ); | ||
336 | } | ||
337 | }, | ||
338 | |||
339 | onBeforeFocusChange: function (event) { | ||
340 | this._super(event); | ||
341 | let fiFrom = event.detail.from; | ||
342 | let fiTo = event.detail.to; | ||
343 | |||
344 | if (0 == this._fiCurrentFocus.node.getName().indexOf('NaviCell') && 0 == fiTo.node.getName().indexOf('NaviCell')) { | ||
345 | // fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height)); | ||
346 | let iIndex = fiFrom.node.name.replace("NaviCell", ''); | ||
347 | if (this._oInit.aLeftImg[iIndex]) { | ||
348 | Network.loadImageInNativeRuntime( | ||
349 | this._oInit.aLeftImg[iIndex], | ||
350 | function (texture) { | ||
351 | fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height)); | ||
352 | }, null, this | ||
353 | ); | ||
354 | } | ||
355 | } | ||
356 | |||
357 | if (0 == this._fiCurrentFocus.node.getName().indexOf('TopCell')) { | ||
358 | // fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height)); | ||
359 | let iIndex = fiFrom.node.name.replace("TopCell", ''); | ||
360 | if (this._oInit.aTopImg[iIndex]) { | ||
361 | Network.loadImageInNativeRuntime( | ||
362 | this._oInit.aTopImg[iIndex], | ||
363 | function (texture) { | ||
364 | fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height)); | ||
365 | }, null, this | ||
366 | ); | ||
367 | } | ||
368 | } | ||
369 | }, | ||
370 | |||
371 | onAfterFocusChange: function (event) { | ||
372 | this._super(event); | ||
373 | let fiTo = event.detail.to; | ||
374 | let fiFrom = event.detail.from; | ||
375 | |||
376 | if (0 == fiTo.node.getName().indexOf('NaviCell')) { | ||
377 | let iIndex = fiTo.node.name.replace("NaviCell", ''); | ||
378 | // fiTo.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); | ||
379 | if (this._oInit.aLeftImg[iIndex]) { | ||
380 | Network.loadImageInNativeRuntime( | ||
381 | this._oInit.aLeftImg[iIndex], | ||
382 | function (texture) { | ||
383 | fiTo.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); | ||
384 | }, null, this | ||
385 | ); | ||
386 | } | ||
387 | |||
388 | this._oSceneContext._iCurrentLeftIndex = iIndex; | ||
389 | } | ||
390 | |||
391 | if (0 == fiTo.node.getName().indexOf('TopCell')) { | ||
392 | let iIndex = fiTo.node.name.replace("TopCell", ''); | ||
393 | // fiTo.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); | ||
394 | if (this._oInit.aTopImg[iIndex]) { | ||
395 | Network.loadImageInNativeRuntime( | ||
396 | this._oInit.aTopImg[iIndex], | ||
397 | function (texture) { | ||
398 | fiTo.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); | ||
399 | }, null, this | ||
400 | ); | ||
401 | } | ||
402 | } | ||
403 | }, | ||
404 | |||
405 | keyDownDirection: function (Direct) { | ||
406 | var fiFocusTarget = null; | ||
407 | var fiCurrentFocus = this._fiCurrentFocus; | ||
408 | var oScrollParameter = null; | ||
409 | let aCheckResult; | ||
410 | fiFocusTarget = this._cFocus.findTarget(fiCurrentFocus, this._aFocusTargets, 0, Direct); | ||
411 | if (!fiFocusTarget) { return; } | ||
412 | aCheckResult = this.checkFocusTarget(fiFocusTarget); | ||
413 | fiFocusTarget = aCheckResult[0]; | ||
414 | oScrollParameter = aCheckResult[1]; | ||
415 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Direct, null, oScrollParameter); | ||
416 | }, | ||
417 | |||
418 | checkFocusTarget: function (fiFocusTarget, oScrollParameter) { | ||
419 | var leftNavLayout = this.targetAry[0].target; | ||
420 | if (fiFocusTarget && 0 == fiFocusTarget.node.name.indexOf("NaviCell")) { | ||
421 | if (0 != this._fiCurrentFocus.node.name.indexOf("NaviCell")) {//如果不是TypeList之间跳转,则哪里来回哪里去 | ||
422 | fiFocusTarget = cc.find("NaviCell" + this._oSceneContext._iCurrentLeftIndex, leftNavLayout).getComponent(FocusInfo); | ||
423 | } | ||
424 | } | ||
425 | |||
426 | return [fiFocusTarget, oScrollParameter]; | ||
427 | }, | ||
428 | |||
429 | onKeyDown: function (event) { | ||
430 | this._super(event); | ||
431 | var fiFocusTarget = null; | ||
432 | var fiCurrentFocus = this._fiCurrentFocus; | ||
433 | switch (event.keyCode) { | ||
434 | case cc.macro.KEY.up: | ||
435 | case Common.ANDROID_KEY.up: | ||
436 | fiFocusTarget = this._cFocus.findTarget(fiCurrentFocus, this._aFocusTargets, this._iSceneStatus, Common.MOVE_DIRECTION_UP); | ||
437 | if (!fiFocusTarget) { return; } | ||
438 | let iTargetTopUp = 0; | ||
439 | if (0 == fiFocusTarget.node.getParent().getParent().name.indexOf("block")) { //嵌套了两层的布局 | ||
440 | iTargetTopUp = fiFocusTarget.node.getParent().getParent().getComponent(cc.Widget).top; | ||
441 | } else { | ||
442 | iTargetTopUp = fiFocusTarget.node.getParent().getComponent(cc.Widget).top; | ||
443 | } | ||
444 | // cc.log("目标节点: "+fiCurrentFocus.node.name); | ||
445 | let iCurrentFloorBottomUp = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0;//当前楼层底部高度 | ||
446 | // cc.log(iCurrentFloorBottomUp + "目标节点的高度:" + iTargetTopUp); | ||
447 | if (iTargetTopUp < iCurrentFloorBottomUp && fiCurrentFocus.node.name.indexOf("NaviCell") == -1) { | ||
448 | if (this._oSceneContext._iPageIndex > 1) { | ||
449 | //---------------隐藏焦点0.6秒,就看不到焦点框长时间的跳转------------------ | ||
450 | this._cFocus.hide(); | ||
451 | setTimeout(function () { | ||
452 | this._cFocus.show(); | ||
453 | }.bind(this), 600); | ||
454 | //---------------------------------------------------------------------- | ||
455 | this._oSceneContext._iPageIndex--; | ||
456 | let height = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0; //520,750,1177,1463,1737,2119,2239 | ||
457 | this._scrollview.scrollToOffset(cc.v2(0, height), 0.5); | ||
458 | // cc.log("滚动到:" + height); | ||
459 | setTimeout(function () { | ||
460 | this.keyDownDirection(Common.MOVE_DIRECTION_UP); | ||
461 | }.bind(this), 300); | ||
462 | return; | ||
463 | } | ||
464 | } | ||
465 | this.keyDownDirection(Common.MOVE_DIRECTION_UP); | ||
466 | break; | ||
467 | case cc.macro.KEY.right: | ||
468 | case Common.ANDROID_KEY.right: | ||
469 | this.keyDownDirection(Common.MOVE_DIRECTION_RIGHT); | ||
470 | break; | ||
471 | case cc.macro.KEY.down: | ||
472 | case Common.ANDROID_KEY.down: | ||
473 | fiFocusTarget = this._cFocus.findTarget(fiCurrentFocus, this._aFocusTargets, this._iSceneStatus, Common.MOVE_DIRECTION_DOWN); | ||
474 | if (!fiFocusTarget) { return; } | ||
475 | let iTargetTop = 0; | ||
476 | if (0 == fiFocusTarget.node.getParent().getParent().name.indexOf("block")) { //嵌套了两层的布局 | ||
477 | iTargetTop = fiFocusTarget.node.getParent().getParent().getComponent(cc.Widget).top; | ||
478 | } else { | ||
479 | iTargetTop = fiFocusTarget.node.getParent().getComponent(cc.Widget).top; | ||
480 | } | ||
481 | let iCurrentFloorBottom = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0;//当前楼层底部高度 | ||
482 | // cc.log(iCurrentFloorBottom+"目标节点的高度:"+iTargetTop); | ||
483 | if (iTargetTop > iCurrentFloorBottom && fiCurrentFocus.node.name.indexOf("NaviCell") == -1) { | ||
484 | if (this._oSceneContext._iPageIndex < this._aBgHeight.length - 1) { | ||
485 | //---------------隐藏焦点0.6秒,就看不到焦点框长时间的跳转------------------ | ||
486 | this._cFocus.hide(); | ||
487 | setTimeout(function () { | ||
488 | this._cFocus.show(); | ||
489 | }.bind(this), 600); | ||
490 | //---------------------------------------------------------------------- | ||
491 | let height = this._aBgHeight[this._oSceneContext._iPageIndex] || 0; //520,750,1177,1463,1737,2119,2239 | ||
492 | this._scrollview.scrollToOffset(cc.v2(0, height), 0.5); | ||
493 | // cc.log("滚动到:"+height); | ||
494 | this._oSceneContext._iPageIndex++; | ||
495 | setTimeout(function () { | ||
496 | this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); | ||
497 | }.bind(this), 300); | ||
498 | return; | ||
499 | } | ||
500 | } | ||
501 | this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); | ||
502 | break; | ||
503 | case cc.macro.KEY.left: | ||
504 | case Common.ANDROID_KEY.left: | ||
505 | this.keyDownDirection(Common.MOVE_DIRECTION_LEFT); | ||
506 | break; | ||
507 | case cc.macro.KEY.enter: | ||
508 | case cc.macro.KEY.space: | ||
509 | case Common.ANDROID_KEY.enter: | ||
510 | this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); | ||
511 | break; | ||
512 | case cc.macro.KEY.backspace: | ||
513 | case Common.ANDROID_KEY.back: | ||
514 | this.backAScene(); | ||
515 | break; | ||
516 | } | ||
517 | }, | ||
518 | |||
519 | doCurrentFocusTVLinkAction: function (strAction) { | ||
520 | let strTVLink = this._fiCurrentFocus.getTVLink(); | ||
521 | cc.log("tvlink===============" + strTVLink); | ||
522 | try { | ||
523 | let oTVLink = JSON.parse(strTVLink); | ||
524 | let aOperationList = oTVLink.click; | ||
525 | var rightNavLayout = this.targetAry[2].target; | ||
526 | rightNavLayout.destroyAllChildren(); //销毁完以前所有的子模块 | ||
527 | this._oSceneContext._iPageIndex = 1; | ||
528 | for (let i = 0; i < aOperationList.length; i++) { | ||
529 | switch (aOperationList[i].action) { | ||
530 | case "changeLayout": | ||
531 | let model = aOperationList[i].parameters.layoutPath; //获取要加载的框架 | ||
532 | if (-1 != model.indexOf("waterfall_recommend")) { | ||
533 | this.getRightRecommendRequest(waterfall_recommend); //渲染右侧推荐框架 | ||
534 | } else if (-1 != model.indexOf("waterfall_parent")) { | ||
535 | this.getRightRecommendRequest(waterfall_parent); //渲染右侧推荐框架 | ||
536 | } else if (-1 != model.indexOf("waterfall_course")) { | ||
537 | this.getRightRecommendRequest(waterfall_course); //渲染右侧推荐框架 | ||
538 | } else if (-1 != model.indexOf("waterfall_primarySchool")) { | ||
539 | this.getRightRecommendRequest(waterfall_primarySchool); //渲染右侧推荐框架 | ||
540 | } else if (-1 != model.indexOf("waterfall_three2six")) { | ||
541 | this.getRightRecommendRequest(waterfall_three2six); //渲染右侧推荐框架 | ||
542 | } | ||
543 | break; | ||
544 | default: | ||
545 | // this.doTVLinkAction(aOperationList[i]); | ||
546 | break; | ||
547 | } | ||
548 | } | ||
549 | } catch (error) { | ||
550 | cc.log("runTVLinkAction Exception..." + error); | ||
551 | } | ||
552 | }, | ||
553 | |||
554 | }); |
assets/Script/Recommend.js.meta
0 → 100644
assets/Script/TestLayout.js
0 → 100644
1 | //模拟动态数据 | ||
2 | |||
3 | cc.Class({ | ||
4 | extends: cc.Component, | ||
5 | |||
6 | statics: { | ||
7 | layout4Page: { | ||
8 | id: 121,//每个页面对应一个pageId,后台创建下发生成 | ||
9 | name: "首页",//page layout名称 | ||
10 | code: "eb954b1e-712e-415c-ba27-ddcf60f64adf",//每个页面对应一个pageCode,后台创建生成 | ||
11 | layout: "absolute",//页面整理布局,非必填字段 | ||
12 | children: [ | ||
13 | { | ||
14 | "name": "Navigator",/* 左侧导航 */ | ||
15 | "layout": "vertical",//浮动式垂直布局 | ||
16 | "position": [44, 98],//框架的起始坐标 | ||
17 | "childrenSize": [166, 94],//子元素尺寸 | ||
18 | "childrenMargin": [0, 0, 3, 0],//子元素边距 | ||
19 | "dataContainer": "promotion_list",//列表名称 | ||
20 | "data": {/* 对于数据比较少的采取这种方式或者本地数据 */ | ||
21 | "name": "Navigator", | ||
22 | "resultSet": [ | ||
23 | { | ||
24 | "name": "recommend",//项名称 填写比较规范 | ||
25 | "tvlink": '{"click": [{"action": "changeLayout","parameters": {"layoutPath": "layout/waterfall_recommend.json"}}]}',//项动作 | ||
26 | "type": "promotion_item",//项类型 非必填 | ||
27 | "imageURL": "image/navigator/recommend.png",//项图片路径 | ||
28 | "top": 120, | ||
29 | "left": 100, | ||
30 | }, | ||
31 | { | ||
32 | "name": "three2six", | ||
33 | "tvlink": '{"click": [{"action": "changeLayout","parameters": {"layoutPath": "layout/waterfall_three2six.json"}}]}', | ||
34 | "type": "promotion_item", | ||
35 | "imageURL": "image/navigator/three2six.png", | ||
36 | "top": 240, | ||
37 | "left": 100, | ||
38 | }, | ||
39 | { | ||
40 | "name": "primarySchool", | ||
41 | "tvlink": '{"click": [{"action": "changeLayout","parameters": {"layoutPath": "layout/waterfall_primarySchool.json"}}]}', | ||
42 | "type": "promotion_item", | ||
43 | "imageURL": "image/navigator/primary.png", | ||
44 | "top": 360, | ||
45 | "left": 100, | ||
46 | }, | ||
47 | { | ||
48 | "name": "course", | ||
49 | "tvlink": '{"click": [{"action": "changeLayout","parameters": {"layoutPath": "layout/waterfall_course.json"}}]}', | ||
50 | "type": "promotion_item", | ||
51 | "imageURL": "image/navigator/course.png", | ||
52 | "top": 480, | ||
53 | "left": 100, | ||
54 | }, | ||
55 | { | ||
56 | "name": "parent", | ||
57 | "tvlink": '{"click": [{"action": "changeLayout","parameters": {"layoutPath": "layout/waterfall_parent.json"}}]}', | ||
58 | "type": "promotion_item", | ||
59 | "imageURL": "image/navigator/parent.png", | ||
60 | "top": 600, | ||
61 | "left": 100, | ||
62 | } | ||
63 | ] | ||
64 | }, | ||
65 | // "dataSrc" : "layout/navigator.json", | ||
66 | "dataTmpl": "tmplNavigator",//数据渲染jsrender模板 | ||
67 | "cellName": "navigator_list_cell"//渲染元素class和id前缀 | ||
68 | }, | ||
69 | { | ||
70 | "name": "Additional",/* 我的、搜索、历史 - 在右上角 */ | ||
71 | "layout": "absolute",//绝对布局 | ||
72 | "position": [0, 0],//框架的起点坐标 | ||
73 | "focusstatus": 2,//列表元素焦点状态位,默认是0 | ||
74 | "dataContainer": "addition_list",//列表容器id | ||
75 | "data": {//数据列表 | ||
76 | "name": "Addition",//模块名称 | ||
77 | "resultSet": [ | ||
78 | { | ||
79 | "name": "我的", | ||
80 | "left": 822, | ||
81 | "top": 19, | ||
82 | "width": 137, | ||
83 | "height": 65, | ||
84 | "tvlink": "{click: [{action: 'changeUI',parameters: {uiName: 'collection'}}]}", | ||
85 | "type" : "promotion_item", | ||
86 | "imageURL": "image/addition/my.png" | ||
87 | }, | ||
88 | { | ||
89 | "name": "历史", | ||
90 | "left": 965, | ||
91 | "top": 19, | ||
92 | "width": 137, | ||
93 | "height": 65, | ||
94 | "tvlink": "{click: [{action: 'changeUI',parameters: {uiName: 'history'}}]}", | ||
95 | "type" : "promotion_item", | ||
96 | "imageURL": "image/addition/history.png" | ||
97 | }, | ||
98 | { | ||
99 | "name": "搜索", | ||
100 | "left": 1108, | ||
101 | "top": 19, | ||
102 | "width": 137, | ||
103 | "height": 65, | ||
104 | "tvlink": "{click: [{action: 'changeUI',parameters: {uiName: 'search'}}]}", | ||
105 | "type" : "promotion_item", | ||
106 | "imageURL": "image/addition/search.png" | ||
107 | } | ||
108 | ] | ||
109 | }, | ||
110 | //"dataSrc" : "layout/addition.json", | ||
111 | "dataTmpl": "tmplAddition", | ||
112 | "cellName": "addition_list_cell" | ||
113 | }, | ||
114 | { | ||
115 | "name": "WaterFall",/* 右侧瀑布流 */ | ||
116 | "layout": "abosolute", | ||
117 | "position": [207, 78], | ||
118 | "width": 1100,//框架宽度 | ||
119 | "height": 642,//框架高度 | ||
120 | "extraClass": "move_transition", | ||
121 | "dataContainer": "waterfall_list_wrapper", | ||
122 | "data": { | ||
123 | "name": "WaterFallList", | ||
124 | "resultSet": [ | ||
125 | { | ||
126 | "name": "WaterFallList", | ||
127 | "layout": "absolute", | ||
128 | "position": [20, 20],//这里是根据上下文拿 | ||
129 | "disable": true,//是否是焦点控件 | ||
130 | "containerId": "waterfall_list",//个性化元素id | ||
131 | "dataContainer": "waterfall_list", | ||
132 | "hasChildFrame": true,//是否有子框架 | ||
133 | "frozen": true,//是否冻结获得的框架数据,在后续适当时机再解除冻结,继续渲染框架和数据 true 冻结 false 不冻结 | ||
134 | "data": [], | ||
135 | "dataSrc": "layout/waterfall_recommend.json",//在没有data的情况下,dataSrc生效,并且成为请求数据路径的参考,是否要在远程服务器地址,视页面情况而定 | ||
136 | "dataTmpl": "tmplPromotionGroup",//渲染jsrender模板 | ||
137 | "cellName": "group_list",//同上 | ||
138 | "childLayout": "absolute",//子元素布局,子元素框架可继承父元素框架 | ||
139 | "childDataTmpl": "tmplPromotionGroupCell",//子元素渲染的jsrender模板 | ||
140 | "childFramePath": "layout/recommend/"//子元素渲染框架路径 | ||
141 | } | ||
142 | ] | ||
143 | }, | ||
144 | "dataTmpl": "tmplPromotionGroupCell2",//jsrender渲染模板 | ||
145 | "cellName": "waterfall_list"//同上 | ||
146 | |||
147 | } | ||
148 | ] | ||
149 | }, | ||
150 | |||
151 | } | ||
152 | }); |
assets/Script/TestLayout.js.meta
0 → 100644
assets/Script/common.meta
0 → 100644
assets/Script/common/Application.js
0 → 100644
1 | cc.Class({ | ||
2 | extends: cc.Component, | ||
3 | |||
4 | properties: { | ||
5 | |||
6 | //键值由具体场景决定 | ||
7 | _aSceneContext:{default:[]}, | ||
8 | |||
9 | /* | ||
10 | { | ||
11 | categoryId:123, | ||
12 | history:[] | ||
13 | } | ||
14 | /*/ | ||
15 | _aSceneParameter:{default:[]}, | ||
16 | _bBackStatus:false, | ||
17 | _iDefaultCollectionId:-1, | ||
18 | |||
19 | _iTotalFrames:0, | ||
20 | }, | ||
21 | |||
22 | // use this for initialization | ||
23 | onLoad: function () { | ||
24 | this._aSceneContext=[]; | ||
25 | this._aSceneParameter=[]; | ||
26 | }, | ||
27 | |||
28 | getSceneContext:function(){ | ||
29 | return this._aSceneContext; | ||
30 | }, | ||
31 | popSceneContext:function(){ | ||
32 | return this._aSceneContext.pop(); | ||
33 | }, | ||
34 | getTopSceneContext:function(){ | ||
35 | return this._aSceneContext[this._aSceneContext.length-1]; | ||
36 | }, | ||
37 | setSceneContext:function(aSceneContext){ | ||
38 | this._aSceneContext=aSceneContext; | ||
39 | }, | ||
40 | getSceneParameter:function(){ | ||
41 | return this._aSceneParameter; | ||
42 | }, | ||
43 | popSceneParameter:function(){ | ||
44 | return this._aSceneParameter.pop(); | ||
45 | }, | ||
46 | getTopSceneParameter:function(){ | ||
47 | return this._aSceneParameter[this._aSceneParameter.length-1]; | ||
48 | }, | ||
49 | setSceneParameter:function(aSceneParameter){ | ||
50 | this._aSceneParameter=aSceneParameter; | ||
51 | }, | ||
52 | getBackStatus:function(){ | ||
53 | return this._bBackStatus; | ||
54 | }, | ||
55 | |||
56 | setBackStatus:function(bBackStatus){ | ||
57 | this._bBackStatus=bBackStatus; | ||
58 | }, | ||
59 | |||
60 | getDefaultCollectionId:function(){ | ||
61 | return this._iDefaultCollectionId; | ||
62 | }, | ||
63 | |||
64 | setDefaultCollectionId:function(iCollectionId){ | ||
65 | this._iDefaultCollectionId=iCollectionId; | ||
66 | }, | ||
67 | |||
68 | setTotalFrames:function(iFrames){ | ||
69 | this._iTotalFrames=iFrames; | ||
70 | }, | ||
71 | |||
72 | getTotalFrames:function(){ | ||
73 | return this._iTotalFrames; | ||
74 | } | ||
75 | |||
76 | // called every frame, uncomment this function to activate update callback | ||
77 | // update: function (dt) { | ||
78 | |||
79 | // }, | ||
80 | }); |
assets/Script/common/Application.js.meta
0 → 100644
assets/Script/common/BusinessParameter.js
0 → 100644
1 | //公用参数 | ||
2 | |||
3 | cc.Class({ | ||
4 | extends: cc.Component, | ||
5 | statics: { | ||
6 | CARTOON_SPECIAL: '0', | ||
7 | |||
8 | //各应用基础分类 | ||
9 | SONG_CATEGORY:"20", | ||
10 | ENHLISH_CATEGORY:"34", | ||
11 | STORY_CATEGORY:"43", | ||
12 | SCIENCE_CATEGORY:"46", | ||
13 | EDUCATION_CATEGORY:"35", | ||
14 | CLASSICAL_CATEGORY:"32", | ||
15 | ART_CATEGORY:"65", | ||
16 | //各应用appId | ||
17 | SONG_APPID:"td9c60ab5ba1f3c44c", | ||
18 | ENHLISH_APPID:"tdde7add064d218a84", | ||
19 | STORY_APPID:"td16283e54e262f207", | ||
20 | SCIENCE_APPID:"td9eeab808e4d1a4b7", | ||
21 | EDUCATION_APPID:"td8765403b3f38d1a8", | ||
22 | CLASSICAL_APPID:"td7a74235419ac55ee", | ||
23 | ART_APPID:"tdd72ee5abf9a38754", | ||
24 | CARTOON_APPID:"tda7e47f868313d9f5", | ||
25 | //各应用免费分类id | ||
26 | SONG_FREE_CID:"143", | ||
27 | ENGLISH_FREE_CID:"149", | ||
28 | STORY_FREE_CID:"152", | ||
29 | SCIENCE_FREE_CID:"158", | ||
30 | EDUCATION_FREE_CID:"155", | ||
31 | CLASSICAL_FREE_CID:"146", | ||
32 | ART_FREE_CID:"161", | ||
33 | |||
34 | }, | ||
35 | }); |
assets/Script/common/CCNetwork.js
0 → 100644
1 | //修改Network,解决闪屏问题 | ||
2 | var Network = require('Network'); | ||
3 | cc.Class({ | ||
4 | extends: Network, | ||
5 | |||
6 | properties: { | ||
7 | |||
8 | }, | ||
9 | |||
10 | // use this for initialization | ||
11 | onLoad: function () { | ||
12 | |||
13 | }, | ||
14 | |||
15 | |||
16 | statics: { | ||
17 | //_count: 0, | ||
18 | |||
19 | /* | ||
20 | var txt = document.getElementById('txt'); | ||
21 | //1.创建XMLHttpRequest对象 | ||
22 | var xhr = null; | ||
23 | if(window.XMLHttpRequest) { | ||
24 | xhr = new XMLHttpRequest(); | ||
25 | }else { | ||
26 | xhr = new ActiveXObject('Microsoft.XMLHTTP'); | ||
27 | } | ||
28 | //2.打开与服务器的链接 | ||
29 | xhr.open('get',url,false); | ||
30 | //3.发送给服务器 | ||
31 | xhr.send(null); | ||
32 | //4.响应就绪(同步请求) | ||
33 | var json = JSON.parse(xhr.responseText); | ||
34 | txt.innerHTML = json; | ||
35 | cc.log('其他程序'); | ||
36 | */ | ||
37 | |||
38 | |||
39 | |||
40 | //ajax请求函数 | ||
41 | ajax: function (strMethod, strURL, astrContentType, oDataOrPostBody, onSuccess, onError, oScope, oAdditionalData) { | ||
42 | var xlr = null; | ||
43 | var oResult = {}; | ||
44 | |||
45 | |||
46 | |||
47 | if (window.XMLHttpRequest) {// code for IE7, Firefox, Opera, etc. | ||
48 | xlr = new XMLHttpRequest(); //Log.info('XMLHttpRequest'); | ||
49 | } else if (window.ActiveXObject) {// code for IE6, IE5 | ||
50 | xlr = new ActiveXObject("Microsoft.XMLHTTP"); //Log.info('ActiveXObject'); | ||
51 | } | ||
52 | |||
53 | if (!xlr) { | ||
54 | cc.log("Your browser does not support XMLHTTP, using iframe instead.."); | ||
55 | //退化到使用iframe 在cocos中无用 //这里两个函数名需要字符串输入 | ||
56 | //iframeRequest(strMethod, strURL, astrContentType, oDataOrPostBody, onSuccess, onError, oAdditionalData) | ||
57 | return; | ||
58 | } | ||
59 | |||
60 | function onStateChange() { | ||
61 | if (xlr.readyState == 4) {// 4 = "loaded" | ||
62 | if (xlr.status == 200) {// 200 = OK | ||
63 | if (null != oScope) { | ||
64 | onSuccess.call(oScope, xlr.responseText, oAdditionalData); | ||
65 | } else { | ||
66 | onSuccess(xlr.responseText, oAdditionalData); | ||
67 | } | ||
68 | } else { | ||
69 | if (null != oScope) { | ||
70 | onError.call(oScope, xlr.responseText, oAdditionalData); | ||
71 | } else { | ||
72 | onError(xlr.responseText, oAdditionalData); | ||
73 | } | ||
74 | } | ||
75 | xlr = null; | ||
76 | } | ||
77 | } | ||
78 | |||
79 | |||
80 | |||
81 | strMethod = strMethod.toUpperCase(); | ||
82 | var strDataOrPostBody = ''; | ||
83 | if (strMethod == "GET") { | ||
84 | |||
85 | //以下这段可使用正则表达式改造 | ||
86 | if (oDataOrPostBody) { | ||
87 | if (strURL.indexOf('?') > 0) { //有问号 | ||
88 | if (strURL.indexOf('=') > strURL.indexOf('?') //并且有等号在问号右边 | ||
89 | && strURL.lastIndexOf('&') != strURL.length - 1) //最后一个不是& | ||
90 | { | ||
91 | strURL = strURL.concat('&'); | ||
92 | } else { //光有问号没等号 | ||
93 | cc.log('Unavailable Request URL!'); | ||
94 | return; | ||
95 | } | ||
96 | } else {//没问号 | ||
97 | strURL = strURL.concat('?'); | ||
98 | } | ||
99 | |||
100 | if (typeof oDataOrPostBody == "string") { | ||
101 | strDataOrPostBody = oDataOrPostBody; | ||
102 | } else if (oDataOrPostBody instanceof Object) { | ||
103 | for (var key in oDataOrPostBody) { | ||
104 | strDataOrPostBody = strDataOrPostBody.concat(key).concat('=').concat(oDataOrPostBody[key]).concat('&'); | ||
105 | } | ||
106 | strDataOrPostBody = strDataOrPostBody.substring(0, strDataOrPostBody.length - 1); | ||
107 | //strDataOrPostBody.TrimEnd('&'); | ||
108 | } else { | ||
109 | cc.log('Unavailable Parameters!'); | ||
110 | return; | ||
111 | } | ||
112 | } | ||
113 | |||
114 | strURL = strURL.concat(strDataOrPostBody); | ||
115 | } | ||
116 | |||
117 | xlr.onreadystatechange = onStateChange; | ||
118 | |||
119 | xlr.open(strMethod, strURL, true); | ||
120 | |||
121 | var isWWWFormURLEncoded = false; | ||
122 | if (astrContentType) { | ||
123 | for (var i = 0; i < astrContentType.length; i++) { | ||
124 | xlr.setRequestHeader('Content-type', astrContentType[i]); | ||
125 | if (astrContentType[i] == 'application/x-www-form-urlencoded') { | ||
126 | isWWWFormURLEncoded = true; | ||
127 | break; | ||
128 | } | ||
129 | } | ||
130 | } | ||
131 | //xlr.setRequestHeader('Connection', 'close'); | ||
132 | |||
133 | switch (strMethod) { | ||
134 | case 'GET': | ||
135 | xlr.send(null); | ||
136 | break; | ||
137 | case 'POST': | ||
138 | if (isWWWFormURLEncoded) { | ||
139 | |||
140 | } | ||
141 | if (oDataOrPostBody) { | ||
142 | /* | ||
143 | if (isWWWFormURLEncoded) { | ||
144 | var fd=new FormData(); | ||
145 | if (typeof oDataOrPostBody == "string") { | ||
146 | strDataOrPostBody = oDataOrPostBody; | ||
147 | |||
148 | var aParameters1=oDataOrPostBody.split('&'); | ||
149 | for (var i=0;i<aParameters1.length;i++){ | ||
150 | var aPairs1=aParameters1.split('='); | ||
151 | if (aPairs1[0] && aPairs1[1]){ | ||
152 | fd.append(aPairs1[0],aPairs1[1]); | ||
153 | } | ||
154 | } | ||
155 | |||
156 | } else if (oDataOrPostBody instanceof Object) { | ||
157 | for (var key in oDataOrPostBody) { | ||
158 | fd.append(key,oDataOrPostBody[key]); | ||
159 | } | ||
160 | //strDataOrPostBody.TrimEnd('&'); | ||
161 | //strDataOrPostBody = strDataOrPostBody.substring(0, strDataOrPostBody.length - 1); | ||
162 | } else { | ||
163 | console.log("Unavailable Parameters!"); | ||
164 | return | ||
165 | } | ||
166 | xlr.send(fd); | ||
167 | }else{*/ | ||
168 | if (typeof oDataOrPostBody == "string") { | ||
169 | strDataOrPostBody = oDataOrPostBody; | ||
170 | |||
171 | } else if (oDataOrPostBody instanceof Object) { | ||
172 | for (var key in oDataOrPostBody) { | ||
173 | strDataOrPostBody = strDataOrPostBody.concat(key).concat('=').concat(oDataOrPostBody[key]).concat('&'); | ||
174 | } | ||
175 | //strDataOrPostBody.TrimEnd('&'); | ||
176 | strDataOrPostBody = strDataOrPostBody.substring(0, strDataOrPostBody.length - 1); | ||
177 | } else { | ||
178 | oResult.businessCode = 'success'; | ||
179 | oResult.description = 'Unavailable Parameters!'; | ||
180 | return oResult; | ||
181 | } | ||
182 | xlr.send(strDataOrPostBody); | ||
183 | //} | ||
184 | } else { | ||
185 | xlr.send(null); | ||
186 | } | ||
187 | |||
188 | break; | ||
189 | } | ||
190 | |||
191 | |||
192 | // cc.director.on(cc.Director.EVENT_BEFORE_SCENE_LOADING, function () { | ||
193 | // // cc.log("运行新场景之前所触发的事件------------->"); | ||
194 | // xlr.abort(); | ||
195 | // }); | ||
196 | |||
197 | }, | ||
198 | loadImageInJSRuntime: function (strURL, iRequestId, onSuccess, onError, oScope) { | ||
199 | cc.loader.load( | ||
200 | { | ||
201 | url: strURL, | ||
202 | isCrossOrigin: false, | ||
203 | type: 'jpg' //防止跨域问题 | ||
204 | }, | ||
205 | function (err, texture) { | ||
206 | if (!err) { | ||
207 | if (null != oScope) { | ||
208 | onSuccess.call(oScope, texture, iRequestId); | ||
209 | } else { | ||
210 | onSuccess(texture); | ||
211 | } | ||
212 | } else { | ||
213 | if (null != oScope) { | ||
214 | onError.call(oScope, err, iRequestId); | ||
215 | } else { | ||
216 | onError(err); | ||
217 | } | ||
218 | } | ||
219 | } | ||
220 | ); | ||
221 | |||
222 | }, | ||
223 | |||
224 | loadImageInNativeRuntime: function (strURL, iRequestId, onSuccess, onError, oScope) { | ||
225 | cc.loader.load(strURL, function (err, texture) { | ||
226 | if (null != oScope) { | ||
227 | onSuccess.call(oScope, texture, iRequestId); | ||
228 | } else { | ||
229 | onSuccess(texture); | ||
230 | } | ||
231 | cc.log('Should load a texture from external url: ' + (texture instanceof cc.Texture2D)); | ||
232 | }); | ||
233 | }, | ||
234 | |||
235 | }, | ||
236 | |||
237 | |||
238 | // called every frame, uncomment this function to activate update callback | ||
239 | // update: function (dt) { | ||
240 | |||
241 | // }, | ||
242 | }); |
assets/Script/common/CCNetwork.js.meta
0 → 100644
assets/Script/common/Common.js
0 → 100644
1 | cc.Class({ | ||
2 | extends: cc.Component, | ||
3 | |||
4 | properties: { | ||
5 | |||
6 | }, | ||
7 | |||
8 | // use this for initialization | ||
9 | onLoad: function () { | ||
10 | |||
11 | }, | ||
12 | |||
13 | statics: { | ||
14 | |||
15 | SCREEN_WIDTH: 1280.0, | ||
16 | SCREEN_HEIGHT: 720.0, | ||
17 | |||
18 | MOVE_DIRECTION_UP: 0, | ||
19 | MOVE_DIRECTION_RIGHT: 1, | ||
20 | MOVE_DIRECTION_DOWN: 2, | ||
21 | MOVE_DIRECTION_LEFT: 3, | ||
22 | |||
23 | FOCUS_FLY_DURATION: 0.3, | ||
24 | FOCUS_BREATH_DURATION: 0.8, | ||
25 | |||
26 | //Action Tag | ||
27 | FEATURE_NODE_TRANSFER: 1, | ||
28 | FOCUS_CELL_TRANSFER: 1, | ||
29 | FOCUS_CONTAINER_TRANSFER: 1, | ||
30 | FOCUS_CONTAINER_BREATH: 2, | ||
31 | FOCUS_CONTAINER_JOGGLE: 3, | ||
32 | |||
33 | OVERLENGTH_MOVING: 4, | ||
34 | |||
35 | SCROLL_BY_FOCUS_CHANGE: 5, | ||
36 | |||
37 | API_SORT_ASC: 'asc', | ||
38 | API_SORT_DESC: 'desc', | ||
39 | |||
40 | FEMALE: 0, | ||
41 | MALE: 1, | ||
42 | BAND: 2, | ||
43 | |||
44 | ANDROID_KEY: { | ||
45 | back: 6, | ||
46 | up: 1003, | ||
47 | right: 1001, | ||
48 | down: 1004, | ||
49 | left: 1000, | ||
50 | enter: 1005 | ||
51 | }, | ||
52 | |||
53 | BUSINESS_PARAMETER: { | ||
54 | // {:, | ||
55 | |||
56 | }, | ||
57 | |||
58 | //天津少儿2.0测试接口 | ||
59 | // TOPDRAW_API_SERVER:'http://202.99.114.74:52118/hyperion.chimera/', | ||
60 | // TOPDRAW_API_SERVER2:'http://202.99.114.74:52118/hyperion.archer/', | ||
61 | // TOPDRAW_IMAGE_SERVER:'http://202.99.114.74:52118/hyperion.resource/', | ||
62 | |||
63 | //新部署测试接口 | ||
64 | TOPDRAW_API_SERVER: 'http://139.196.192.242:8080/hyperion.chimera/', | ||
65 | TOPDRAW_API_SERVER2: 'http://139.196.192.242:8080/hyperion.archer/', | ||
66 | TOPDRAW_IMAGE_SERVER: 'http://139.196.192.242:8080/hyperion.resource/', | ||
67 | // TOPDRAW_API_SERVER : "http://111.11.189.12:8080/hyperion.chimera/", //暂且取用EPG数据 | ||
68 | // TOPDRAW_IMAGE_SERVER : "http://111.11.189.12:8080/hyperion.resource/", | ||
69 | // TOPDRAW_API_SERVER2:'http://111.11.189.12:8080/hyperion.archer/', | ||
70 | TEST_API_TOKEN: 'dd4b1968eb5b417e834c2687e23d2471', | ||
71 | |||
72 | //教育 | ||
73 | TOPDRAW_API_SERVER_EDU: 'http://139.196.4.234:38080/hyperion.chimera/', | ||
74 | TOPDRAW_IMAGE_SERVER_EDU: 'http://139.196.4.234:38080/eduHall/pages/index/', | ||
75 | TOPDRAW_IMAGE_SERVER_EDU_RIGHT: 'http://139.196.4.234:38080/hyperion.resource/', | ||
76 | TEST_API_TOKEN_EDU: 'b4863228c5ef4593991ad4cc83f0cabf', | ||
77 | |||
78 | BI_BASE_PATH: 'http://139.196.192.242:82/1.gif', | ||
79 | |||
80 | TV_LINK_ACTION_CLICK: 100, | ||
81 | TV_LINK_ACTION_HOVER: 101, | ||
82 | |||
83 | // TEST_API_TOKEN:'8a56a215e7be4cf6910990d4d7c95e2c', | ||
84 | USER_ID: '1', | ||
85 | AUTH_STATUS: 0, | ||
86 | DEBUG_MODE: 0,//0非调试模式,1调试模式 | ||
87 | APP_VERSION_NAME: '1.0.0', | ||
88 | |||
89 | g_strCurrentSceneName: "", | ||
90 | |||
91 | loadRes: function (strResourceURL,/*iResourceIndex,*/onSuccess, onError, oScope) { | ||
92 | cc.loader.loadRes(strResourceURL, | ||
93 | function (error, loadedResource) { | ||
94 | if (error) { | ||
95 | if (null != oScope) { | ||
96 | onError.call(oScope, error); | ||
97 | } else { | ||
98 | onError(error); | ||
99 | } | ||
100 | } else { | ||
101 | if (null != oScope) { | ||
102 | onSuccess.call(oScope, loadedResource/*,iResourceIndex*/); | ||
103 | } else { | ||
104 | onSuccess(loadedResource/*,iResourceIndex*/); | ||
105 | } | ||
106 | } | ||
107 | } | ||
108 | ); | ||
109 | |||
110 | }, | ||
111 | |||
112 | setTimeout: function (onTimeComplete, iDuration, oScope, argements) { | ||
113 | |||
114 | /* | ||
115 | window.setTimeout(onTimeComplete,iDuration,); | ||
116 | |||
117 | |||
118 | cc.loader.loadRes(strResourceURL, | ||
119 | function(error,loadedResource){ | ||
120 | if (error){ | ||
121 | if(null!=oScope){ | ||
122 | onError.call(oScope,error); | ||
123 | }else{ | ||
124 | onError(error); | ||
125 | } | ||
126 | }else{ | ||
127 | if(null!=oScope){ | ||
128 | onSuccess.call(oScope,loadedResource); | ||
129 | }else{ | ||
130 | onSuccess(loadedResource); | ||
131 | } | ||
132 | } | ||
133 | } | ||
134 | ); | ||
135 | */ | ||
136 | }, | ||
137 | getAbsolutePositionX: function (node) { | ||
138 | |||
139 | }, | ||
140 | getAbsolutePositionY: function (node) { | ||
141 | |||
142 | }, | ||
143 | promiseAjax: function () { | ||
144 | |||
145 | }, | ||
146 | |||
147 | getNodePath: function (node) { | ||
148 | let strPath = ""; | ||
149 | while (node.parent && node.parent.parent) {//不算TopCanvas | ||
150 | strPath = "/" + node.name + strPath; | ||
151 | node = node.parent; | ||
152 | } | ||
153 | return strPath.substring(1); | ||
154 | }, | ||
155 | getX: function (tempNode) { | ||
156 | let fCenterX = 0; | ||
157 | while (tempNode.parent.parent) {//不算TopCanvas | ||
158 | //cc.log(tempNode.name+" X: "+tempNode.x) | ||
159 | fCenterX += tempNode.x; | ||
160 | tempNode = tempNode.parent; | ||
161 | } | ||
162 | return fCenterX; | ||
163 | }, | ||
164 | getY: function (tempNode) { | ||
165 | let fCenterY = 0; | ||
166 | while (tempNode.parent.parent) {//不算TopCanvas | ||
167 | //cc.log(tempNode.name+" Y: "+tempNode.y) | ||
168 | fCenterY += tempNode.y; | ||
169 | tempNode = tempNode.parent; | ||
170 | } | ||
171 | return fCenterY; | ||
172 | }, | ||
173 | |||
174 | |||
175 | /** | ||
176 | * 用于合并对象 By Eva | ||
177 | * @param target | ||
178 | * @param firstSource | ||
179 | * @returns {any} | ||
180 | */ | ||
181 | assign: function (target, firstSource) { | ||
182 | if (target === undefined || target === null) | ||
183 | throw new TypeError("Cannot convert first argument to object"); | ||
184 | var to = Object(target); | ||
185 | for (var i = 1; i < arguments.length; i++) { | ||
186 | var nextSource = arguments[i]; | ||
187 | if (nextSource === undefined || nextSource === null) continue; | ||
188 | var keysArray = Object.keys(Object(nextSource)); | ||
189 | for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { | ||
190 | var nextKey = keysArray[nextIndex]; | ||
191 | var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); | ||
192 | if (desc !== undefined && desc.enumerable) to[nextKey] = nextSource[nextKey]; | ||
193 | } | ||
194 | } | ||
195 | return to; | ||
196 | }, | ||
197 | |||
198 | |||
199 | } | ||
200 | // called every frame, uncomment this function to activate update callback | ||
201 | // update: function (dt) { | ||
202 | |||
203 | // }, | ||
204 | }); |
assets/Script/common/Common.js.meta
0 → 100644
assets/Script/common/FocusInfo.js
0 → 100644
1 | var Common = require('Common'); | ||
2 | var FocusInfo = require('FocusInfo'); | ||
3 | |||
4 | cc.Class({ | ||
5 | extends: cc.Component, | ||
6 | properties: { | ||
7 | // TODO: to be a real Component? | ||
8 | //_fLeft:0, | ||
9 | //_fTop:0, | ||
10 | //_fWidth:0, | ||
11 | //_fHeight:0, | ||
12 | //_oFocusNode:null,//deprecated | ||
13 | _strTVLink: '', | ||
14 | _bEnable: false, | ||
15 | _fScaleFactor: 1.06, | ||
16 | }, | ||
17 | |||
18 | //ctor: function (fLeft,fTop,fWidth,fHeight,oFocusNode,strTVLink,bEnable,fnOnFocus,fnOnBlur) { | ||
19 | ctor: function () { | ||
20 | //this._fLeft=arguments[0]; | ||
21 | //this._fTop=arguments[1]; | ||
22 | //this._fWidth=arguments[2]; | ||
23 | //this._fHeight=arguments[3]; | ||
24 | //this._oFocusNode=arguments[4]; | ||
25 | this._strTVLink = arguments[0]; | ||
26 | this._bEnable = arguments[1]; | ||
27 | this._fnOnFocus = arguments[2]; | ||
28 | this._fnOnBlur = arguments[3]; | ||
29 | //this._fLeft=fLeft; | ||
30 | //this._fTop=fTop; | ||
31 | //this._fWidth=fWidth; | ||
32 | //this._fHeight=fHeight; | ||
33 | //this._oFocusNode=oFocusNode; | ||
34 | }, | ||
35 | |||
36 | init: function (/*fLeft,fTop,fWidth,fHeight,oFocusNode,*/strTVLink, bEnable, fnOnFocus, fnOnBlur, fScaleFactor) { | ||
37 | //this._fLeft=arguments[0]; | ||
38 | //this._fTop=arguments[1]; | ||
39 | //this._fWidth=arguments[2]; | ||
40 | //this._fHeight=arguments[3]; | ||
41 | //this._oFocusNode=arguments[4]; | ||
42 | this._strTVLink = strTVLink; | ||
43 | this._bEnable = bEnable; | ||
44 | this._fnOnFocus = fnOnFocus; | ||
45 | this._fnOnBlur = fnOnBlur; | ||
46 | this._fScaleFactor = fScaleFactor; | ||
47 | //this._fLeft=fLeft; | ||
48 | //this._fTop=fTop; | ||
49 | //this._fWidth=fWidth; | ||
50 | //this._fHeight=fHeight; | ||
51 | //this._oFocusNode=oFocusNode; | ||
52 | }, | ||
53 | |||
54 | // use this for initialization | ||
55 | onLoad: function () { | ||
56 | //气泡式向上传递 通常收不到 | ||
57 | //this.node.on('foucs', this._fnOnFocus || function(){},this); | ||
58 | //this.node.on('blur', this._fnOnBlur || function(){},this); | ||
59 | }, | ||
60 | |||
61 | getLeft: function () { | ||
62 | //return this._fLeft; | ||
63 | return Common.SCREEN_WIDTH / 2 + (this.getX() - this.node.width / 2); | ||
64 | }, | ||
65 | |||
66 | //setLeft:function(fLeft){ | ||
67 | // this._fLeft=fLeft; | ||
68 | //}, | ||
69 | |||
70 | getTop: function () { | ||
71 | //return this._fTop; | ||
72 | return Common.SCREEN_HEIGHT / 2 - (this.getY() + this.node.height / 2); | ||
73 | }, | ||
74 | |||
75 | getX: function () { | ||
76 | return Common.getX(this.node); | ||
77 | }, | ||
78 | getY: function () { | ||
79 | return Common.getY(this.node); | ||
80 | }, | ||
81 | //setTop:function(fTop){ | ||
82 | // this._fTop=fTop; | ||
83 | //}, | ||
84 | getWidth: function () { | ||
85 | //return this._fWidth; | ||
86 | return this.node.width; | ||
87 | }, | ||
88 | setWidth: function (fWidth) { | ||
89 | // this._fWidth=fWidth; | ||
90 | this.node.width = fWidth; | ||
91 | }, | ||
92 | getHeight: function () { | ||
93 | //return this._fHeight; | ||
94 | return this.node.height; | ||
95 | }, | ||
96 | //setHeight:function(fHeight){ | ||
97 | // this._fHeight=fHeight; | ||
98 | //}, | ||
99 | //getFocusNode:function(){ | ||
100 | // return this._oFocusNode; | ||
101 | //}, | ||
102 | //setFocusNode:function(oFocusNode){ | ||
103 | // this._oFocusNode=oFocusNode; | ||
104 | //}, | ||
105 | getTVLink: function () { | ||
106 | return this._strTVLink; | ||
107 | }, | ||
108 | setTVLink: function (strTVLink) { | ||
109 | this._strTVLink = strTVLink; | ||
110 | }, | ||
111 | getEnable: function () { | ||
112 | return this._bEnable; | ||
113 | }, | ||
114 | setEnable: function (bEnable) { | ||
115 | this._bEnable = bEnable; | ||
116 | }, | ||
117 | onFocus: function (fiFrom) { | ||
118 | if (this._fnOnFocus) { | ||
119 | this._fnOnFocus(fiFrom); | ||
120 | } | ||
121 | }, | ||
122 | onBlur: function (fiTo) { | ||
123 | if (this._fnOnBlur) { | ||
124 | this._fnOnBlur(fiTo); | ||
125 | } | ||
126 | }, | ||
127 | getScaleFactor: function () { | ||
128 | return this._fScaleFactor; | ||
129 | }, | ||
130 | setScaleFactor: function (fScaleFactor) { | ||
131 | this._fScaleFactor = fScaleFactor; | ||
132 | }, | ||
133 | |||
134 | onEnable: function () { //修改节点的active属性为true时会执行挂载组件的onEnable方法 | ||
135 | //注意:子节点有ListView要慎用!会使所有未初始化数据的子节点也改变焦点状态 | ||
136 | // cc.log("执行FocusInfo中onEnable方法"); | ||
137 | if (0 != this.node.name.indexOf('RoleInstallListCell') && 0 != this.node.name.indexOf('AchievementListCell')) { | ||
138 | this._bEnable = true; | ||
139 | } | ||
140 | }, | ||
141 | |||
142 | onDisable: function () { //修改节点的active属性为false时会执行挂载组件的onDisable方法 | ||
143 | // cc.log("执行FocusInfo中onDisable方法" + this.node.name); | ||
144 | this._bEnable = false; | ||
145 | }, | ||
146 | |||
147 | onDestroy: function () { | ||
148 | // cc.log("节点销毁-------->" + this.node.name); | ||
149 | cc.director.emit('stop_render'); //分发事件 | ||
150 | |||
151 | // this.node.removeComponent(FocusInfo); | ||
152 | }, | ||
153 | |||
154 | }); |
assets/Script/common/FocusInfo.js.meta
0 → 100644
assets/Script/common/Globals.js
0 → 100644
assets/Script/common/Globals.js.meta
0 → 100644
assets/Script/common/Log.js
0 → 100644
1 | var Network = require('Network'); | ||
2 | var Common = require('Common'); | ||
3 | cc.Class({ | ||
4 | extends: cc.Component, | ||
5 | |||
6 | properties: { | ||
7 | // foo: { | ||
8 | // default: null, // The default value will be used only when the component attaching | ||
9 | // to a node for the first time | ||
10 | // url: cc.Texture2D, // optional, default is typeof default | ||
11 | // serializable: true, // optional, default is true | ||
12 | // visible: true, // optional, default is true | ||
13 | // displayName: 'Foo', // optional | ||
14 | // readonly: false, // optional, default is false | ||
15 | // }, | ||
16 | // ... | ||
17 | _iLogCount:0, | ||
18 | _oScene:null, | ||
19 | |||
20 | }, | ||
21 | |||
22 | init: function (oScene) { | ||
23 | this._oScene=oScene; | ||
24 | }, | ||
25 | // use this for initialization | ||
26 | onLoad: function () { | ||
27 | //设置本身节点的宽高透明 | ||
28 | this.node.x=0; | ||
29 | this.node.y=0; | ||
30 | this.node.width=Common.SCREEN_WIDTH; | ||
31 | this.node.height=Common.SCREEN_HEIGHT; | ||
32 | |||
33 | let nodeLogMask=new cc.Node('LogMask'); | ||
34 | nodeLogMask.x=0; | ||
35 | nodeLogMask.y=0; | ||
36 | |||
37 | this.node.addChild(nodeLogMask,10); | ||
38 | |||
39 | //设置为全屏遮罩 | ||
40 | // let urlSplash = cc.url.raw('resources/Texture/splash_black.png'); | ||
41 | // let textureFocus = cc.textureCache.addImage(urlSplash); | ||
42 | |||
43 | let spriteSplash=nodeLogMask.addComponent(cc.Sprite); | ||
44 | // spriteSplash.spriteFrame = new cc.SpriteFrame(textureFocus); | ||
45 | //TODO:2.0移除cc.textureCache | ||
46 | // cc.loader.loadRes("Texture/ui/splash_black",cc.SpriteFrame,function(error,spriteFrame){ | ||
47 | // spriteSplash.spriteFrame=spriteFrame; | ||
48 | // }); | ||
49 | //因为纹理2*2所以这里写死了 | ||
50 | nodeLogMask.setScale(Common.SCREEN_WIDTH/2,Common.SCREEN_HEIGHT/2); | ||
51 | nodeLogMask.opacity=100; | ||
52 | // nodeLogMask.setLocalZOrder(400);//2.0中所有子节点都会在父节点之后渲染 | ||
53 | |||
54 | let nodeLogList=new cc.Node('LogList'); | ||
55 | nodeLogList.x = 20 - Common.SCREEN_WIDTH/2; | ||
56 | nodeLogList.y = Common.SCREEN_HEIGHT/2 - 20; | ||
57 | nodeLogList.setAnchorPoint(0,1); | ||
58 | this.node.addChild(nodeLogList,10); | ||
59 | // nodeLogList.setLocalZOrder(402); | ||
60 | this._nodeLogList = nodeLogList; | ||
61 | |||
62 | //this.node.color=new cc.Color(0, 0, 0); //黑色 | ||
63 | //this.node.cascadeOpacity=false; | ||
64 | |||
65 | //this.node.parent=this._oScene.node; | ||
66 | |||
67 | //this.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(Texture2D.); | ||
68 | |||
69 | //parentNode.cascadeOpacity=false; | ||
70 | }, | ||
71 | |||
72 | //statics: { | ||
73 | |||
74 | |||
75 | serverD:function(strInfo){ | ||
76 | |||
77 | }, | ||
78 | screenD:function(strInfo){ | ||
79 | this.flushLogToScreen(strInfo,'Debug'); | ||
80 | }, | ||
81 | serverI:function(strInfo){ | ||
82 | |||
83 | }, | ||
84 | screenI:function(strInfo){ | ||
85 | |||
86 | this.flushLogToScreen(strInfo,'Info'); | ||
87 | }, | ||
88 | serverW:function(strInfo){ | ||
89 | |||
90 | }, | ||
91 | screenW:function(strInfo){ | ||
92 | |||
93 | this.flushLogToScreen(strInfo,'Warning'); | ||
94 | }, | ||
95 | serverE:function(strInfo){ | ||
96 | |||
97 | }, | ||
98 | screenE:function(strInfo){ | ||
99 | |||
100 | this.flushLogToScreen(strInfo,'Error'); | ||
101 | }, | ||
102 | |||
103 | flushLogToScreen:function(strInfo, strLevel){ | ||
104 | let nodeInfo=new cc.Node('log_info_'+this._iLogCount); | ||
105 | let lblInfo=nodeInfo.addComponent(cc.Label); | ||
106 | this._iLogCount++; | ||
107 | //if _iLogCount>20 | ||
108 | lblInfo.string=strLevel+':'+strInfo;//+(nodeInfo.width/2-Common.SCREEN_WIDTH/2); | ||
109 | lblInfo.fontSize=18; | ||
110 | lblInfo.lineHeight=20; | ||
111 | //nodeInfo.parent=this.node; | ||
112 | nodeInfo.parent=this._nodeLogList; | ||
113 | switch(strLevel){ | ||
114 | case 'Debug': | ||
115 | nodeInfo.color=new cc.color(51,255,255,255); | ||
116 | break; | ||
117 | case 'Info': | ||
118 | nodeInfo.color=new cc.color(51,255,51,255); | ||
119 | break; | ||
120 | case 'Warning': | ||
121 | nodeInfo.color=new cc.color(255,255,51,255); | ||
122 | break; | ||
123 | case 'Error': | ||
124 | nodeInfo.color=new cc.color(255,51,51,255); | ||
125 | break; | ||
126 | default: | ||
127 | nodeInfo.color=new cc.color(255,255,255,255); | ||
128 | |||
129 | } | ||
130 | |||
131 | //nodeInfo.color=new cc.color(255,255,255,255); | ||
132 | nodeInfo.height=20; | ||
133 | nodeInfo.setAnchorPoint(0,1); | ||
134 | nodeInfo.y = -(this._iLogCount-1)*20; | ||
135 | // nodeInfo.setLocalZOrder(401); | ||
136 | this._nodeLogList.y = this._nodeLogList.y + ((this._iLogCount - parseInt(Common.SCREEN_HEIGHT/20)+1)>0 ? 20 : 0); | ||
137 | }, | ||
138 | clearLogOnScreen : function () { | ||
139 | this._nodeLogList.destroy(); | ||
140 | this._iLogCount = 0; | ||
141 | let nodeLogList=new cc.Node('LogList'); | ||
142 | nodeLogList.x = 20 - Common.SCREEN_WIDTH/2; | ||
143 | nodeLogList.y = Common.SCREEN_HEIGHT/2 - 20; | ||
144 | nodeLogList.setAnchorPoint(0,1); | ||
145 | this.node.addChild(nodeLogList,10); | ||
146 | // nodeLogList.setLocalZOrder(402); | ||
147 | this._nodeLogList = nodeLogList; | ||
148 | }, | ||
149 | flushLogToServer:function(){ | ||
150 | |||
151 | |||
152 | } | ||
153 | //TODO:需要加一个清除(所有条目全删除)和删除日志(一条一条删除)的函数 | ||
154 | //} | ||
155 | // called every frame, uncomment this function to activate update callback | ||
156 | // update: function (dt) { | ||
157 | |||
158 | // }, | ||
159 | }); |
assets/Script/common/Log.js.meta
0 → 100644
assets/Script/common/Network.js
0 → 100644
1 | var Common = require('Common'); | ||
2 | cc.Class({ | ||
3 | extends: cc.Component, | ||
4 | |||
5 | properties: { | ||
6 | }, | ||
7 | |||
8 | // use this for initialization | ||
9 | onLoad: function () { | ||
10 | |||
11 | }, | ||
12 | |||
13 | |||
14 | statics: { | ||
15 | //_count: 0, | ||
16 | |||
17 | /* | ||
18 | var txt = document.getElementById('txt'); | ||
19 | //1.创建XMLHttpRequest对象 | ||
20 | var xhr = null; | ||
21 | if(window.XMLHttpRequest) { | ||
22 | xhr = new XMLHttpRequest(); | ||
23 | }else { | ||
24 | xhr = new ActiveXObject('Microsoft.XMLHTTP'); | ||
25 | } | ||
26 | //2.打开与服务器的链接 | ||
27 | xhr.open('get',url,false); | ||
28 | //3.发送给服务器 | ||
29 | xhr.send(null); | ||
30 | //4.响应就绪(同步请求) | ||
31 | var json = JSON.parse(xhr.responseText); | ||
32 | txt.innerHTML = json; | ||
33 | cc.log('其他程序'); | ||
34 | */ | ||
35 | |||
36 | |||
37 | |||
38 | //ajax请求函数 | ||
39 | ajax: function (strMethod, strURL, astrContentType, oDataOrPostBody, onSuccess, onError, oScope, oAdditionalData) { | ||
40 | var xlr = null; | ||
41 | var oResult = {}; | ||
42 | |||
43 | if (window.XMLHttpRequest) {// code for IE7, Firefox, Opera, etc. | ||
44 | xlr = new XMLHttpRequest(); //Log.info('XMLHttpRequest'); | ||
45 | } else if (window.ActiveXObject) {// code for IE6, IE5 | ||
46 | xlr = new ActiveXObject("Microsoft.XMLHTTP"); //Log.info('ActiveXObject'); | ||
47 | } | ||
48 | |||
49 | if (!xlr) { | ||
50 | cc.log("Your browser does not support XMLHTTP, using iframe instead.."); | ||
51 | //退化到使用iframe 在cocos中无用 //这里两个函数名需要字符串输入 | ||
52 | //iframeRequest(strMethod, strURL, astrContentType, oDataOrPostBody, onSuccess, onError, oAdditionalData) | ||
53 | return; | ||
54 | } | ||
55 | |||
56 | function onStateChange() { | ||
57 | if (xlr.readyState == 4) {// 4 = "loaded" | ||
58 | if (xlr.status == 200) {// 200 = OK | ||
59 | if (null != oScope) { | ||
60 | onSuccess.call(oScope, xlr.responseText, oAdditionalData); | ||
61 | } else { | ||
62 | onSuccess(xlr.responseText, oAdditionalData); | ||
63 | } | ||
64 | } else { | ||
65 | if (null != oScope) { | ||
66 | onError.call(oScope, xlr.responseText, oAdditionalData); | ||
67 | } else { | ||
68 | onError(xlr.responseText, oAdditionalData); | ||
69 | } | ||
70 | } | ||
71 | xlr = null; | ||
72 | } | ||
73 | } | ||
74 | |||
75 | |||
76 | |||
77 | strMethod = strMethod.toUpperCase(); | ||
78 | var strDataOrPostBody = ''; | ||
79 | if (strMethod == "GET") { | ||
80 | |||
81 | //以下这段可使用正则表达式改造 | ||
82 | if (oDataOrPostBody) { | ||
83 | if (strURL.indexOf('?') > 0) { //有问号 | ||
84 | if (strURL.indexOf('=') > strURL.indexOf('?') //并且有等号在问号右边 | ||
85 | && strURL.lastIndexOf('&') != strURL.length - 1) //最后一个不是& | ||
86 | { | ||
87 | strURL = strURL.concat('&'); | ||
88 | } else { //光有问号没等号 | ||
89 | cc.log('Unavailable Request URL!'); | ||
90 | return; | ||
91 | } | ||
92 | } else {//没问号 | ||
93 | strURL = strURL.concat('?'); | ||
94 | } | ||
95 | |||
96 | if (typeof oDataOrPostBody == "string") { | ||
97 | strDataOrPostBody = oDataOrPostBody; | ||
98 | } else if (oDataOrPostBody instanceof Object) { | ||
99 | for (var key in oDataOrPostBody) { | ||
100 | strDataOrPostBody = strDataOrPostBody.concat(key).concat('=').concat(oDataOrPostBody[key]).concat('&'); | ||
101 | } | ||
102 | strDataOrPostBody = strDataOrPostBody.substring(0, strDataOrPostBody.length - 1); | ||
103 | //strDataOrPostBody.TrimEnd('&'); | ||
104 | } else { | ||
105 | cc.log('Unavailable Parameters!'); | ||
106 | return; | ||
107 | } | ||
108 | } | ||
109 | |||
110 | strURL = strURL.concat(strDataOrPostBody); | ||
111 | } | ||
112 | |||
113 | xlr.onreadystatechange = onStateChange; | ||
114 | |||
115 | xlr.open(strMethod, strURL, true); | ||
116 | |||
117 | var isWWWFormURLEncoded = false; | ||
118 | if (astrContentType) { | ||
119 | for (var i = 0; i < astrContentType.length; i++) { | ||
120 | xlr.setRequestHeader('Content-type', astrContentType[i]); | ||
121 | if (astrContentType[i] == 'application/x-www-form-urlencoded') { | ||
122 | isWWWFormURLEncoded = true; | ||
123 | break; | ||
124 | } | ||
125 | } | ||
126 | } | ||
127 | //xlr.setRequestHeader('Connection', 'close'); | ||
128 | |||
129 | switch (strMethod) { | ||
130 | case 'GET': | ||
131 | xlr.send(null); | ||
132 | break; | ||
133 | case 'POST': | ||
134 | if (isWWWFormURLEncoded) { | ||
135 | |||
136 | } | ||
137 | if (oDataOrPostBody) { | ||
138 | /* | ||
139 | if (isWWWFormURLEncoded) { | ||
140 | var fd=new FormData(); | ||
141 | if (typeof oDataOrPostBody == "string") { | ||
142 | strDataOrPostBody = oDataOrPostBody; | ||
143 | |||
144 | var aParameters1=oDataOrPostBody.split('&'); | ||
145 | for (var i=0;i<aParameters1.length;i++){ | ||
146 | var aPairs1=aParameters1.split('='); | ||
147 | if (aPairs1[0] && aPairs1[1]){ | ||
148 | fd.append(aPairs1[0],aPairs1[1]); | ||
149 | } | ||
150 | } | ||
151 | |||
152 | } else if (oDataOrPostBody instanceof Object) { | ||
153 | for (var key in oDataOrPostBody) { | ||
154 | fd.append(key,oDataOrPostBody[key]); | ||
155 | } | ||
156 | //strDataOrPostBody.TrimEnd('&'); | ||
157 | //strDataOrPostBody = strDataOrPostBody.substring(0, strDataOrPostBody.length - 1); | ||
158 | } else { | ||
159 | console.log("Unavailable Parameters!"); | ||
160 | return | ||
161 | } | ||
162 | xlr.send(fd); | ||
163 | }else{*/ | ||
164 | if (typeof oDataOrPostBody == "string") { | ||
165 | strDataOrPostBody = oDataOrPostBody; | ||
166 | |||
167 | } else if (oDataOrPostBody instanceof Object) { | ||
168 | for (var key in oDataOrPostBody) { | ||
169 | strDataOrPostBody = strDataOrPostBody.concat(key).concat('=').concat(oDataOrPostBody[key]).concat('&'); | ||
170 | } | ||
171 | //strDataOrPostBody.TrimEnd('&'); | ||
172 | strDataOrPostBody = strDataOrPostBody.substring(0, strDataOrPostBody.length - 1); | ||
173 | } else { | ||
174 | oResult.businessCode = 'success'; | ||
175 | oResult.description = 'Unavailable Parameters!'; | ||
176 | return oResult; | ||
177 | } | ||
178 | xlr.send(strDataOrPostBody); | ||
179 | //} | ||
180 | } else { | ||
181 | xlr.send(null); | ||
182 | } | ||
183 | |||
184 | break; | ||
185 | } | ||
186 | |||
187 | }, | ||
188 | loadImageInJSRuntime: function (strURL, onSuccess, onError, oScope) { | ||
189 | cc.loader.load( | ||
190 | { | ||
191 | url: strURL, | ||
192 | isCrossOrigin: false, | ||
193 | type: 'jpg' //防止跨域问题 | ||
194 | }, | ||
195 | function (err, texture) { | ||
196 | if (!err) { | ||
197 | if (null != oScope) { | ||
198 | onSuccess.call(oScope, texture); | ||
199 | } else { | ||
200 | onSuccess(texture); | ||
201 | } | ||
202 | } else { | ||
203 | if (null != oScope) { | ||
204 | onError.call(oScope, err); | ||
205 | } else { | ||
206 | onError(err); | ||
207 | } | ||
208 | } | ||
209 | } | ||
210 | ); | ||
211 | |||
212 | }, | ||
213 | |||
214 | loadImageInNativeRuntime: function (strURL, onSuccess, onError, oScope, node, strAnimationTag) {//留个钩子以便为图片加载做动画 | ||
215 | let flag = false; | ||
216 | //这里使用cc.director.once而不是cc.director.on避免多次累加注册 | ||
217 | cc.director.once('stop_render', function (event) { //注册并监听事件 | ||
218 | cc.log("Network(diapatchEvent)-------------------------->"); | ||
219 | flag = true; | ||
220 | }); | ||
221 | |||
222 | try { | ||
223 | cc.loader.load(strURL, function (err, texture) { | ||
224 | if (null != oScope) { | ||
225 | // let flag = false; | ||
226 | // if (Common.g_strCurrentSceneName && cc.director.getScene() && Common.g_strCurrentSceneName == cc.director.getScene().name) { | ||
227 | // flag = true; | ||
228 | // } | ||
229 | if (!flag) {//如果已经切换场景就不做下面这件事情 | ||
230 | try { | ||
231 | onSuccess.call(oScope, texture); | ||
232 | } catch (err) { | ||
233 | cc.log(err); | ||
234 | } | ||
235 | } | ||
236 | } else { | ||
237 | onSuccess(texture); | ||
238 | } | ||
239 | // cc.log('Should load a texture from external url: ' + (texture instanceof cc.Texture2D)); | ||
240 | }); | ||
241 | } catch (err) { | ||
242 | cc.log(err); | ||
243 | } | ||
244 | }, | ||
245 | |||
246 | }, | ||
247 | |||
248 | |||
249 | // called every frame, uncomment this function to activate update callback | ||
250 | // update: function (dt) { | ||
251 | |||
252 | // }, | ||
253 | }); |
assets/Script/common/Network.js.meta
0 → 100644
assets/Script/common/TVCanvas.js
0 → 100644
1 | var Common = require('Common'); | ||
2 | var Network = require('Network'); | ||
3 | var FocusInfo = require('FocusInfo'); | ||
4 | var Application = require('Application'); | ||
5 | var Log = require('Log'); | ||
6 | cc.Topdraw = cc.Topdraw || {}; | ||
7 | cc.Topdraw.TVCanvas = | ||
8 | cc.Class({ | ||
9 | extends: cc.Component, | ||
10 | properties: { | ||
11 | //如果成功了要添加 | ||
12 | //Log 版块 | ||
13 | _cLog: null, | ||
14 | _cApplication: null, | ||
15 | _cFocus: null, | ||
16 | _aFocusTargets: [], //可被聚焦的块集合 分成状态区 | ||
17 | _fiCurrentFocus: null, | ||
18 | _iSceneStatus: 0, //场景状态 和焦点寻找有关系 | ||
19 | _fFocusScaleFactor: 1.06, //焦点缩放因数 | ||
20 | //数据初始化状态 | ||
21 | _bIsFocusInit: false, | ||
22 | _oSceneContext: null, //当前场景的上下文,用于后续恢复 | ||
23 | //_oCurrentSceneParameter:null, //去下一个场景的参数 | ||
24 | _oNextSceneParameter: null, //去下一个场景的参数 | ||
25 | _compPlayer: null, | ||
26 | _aTouchContext: [], | ||
27 | _defaultBackScene: null,//每个场景Canvas都有的 默认返回场景 每个场景自己构造函数内设置值 | ||
28 | _oFocusScaleFactorInfo: null, | ||
29 | |||
30 | holdClick: false, //检测是否长按 | ||
31 | _bShowExitBox: false, | ||
32 | }, | ||
33 | |||
34 | // use this for initialization | ||
35 | onLoad: function () { | ||
36 | //关掉调试信息 | ||
37 | cc.debug.setDisplayStats(true); | ||
38 | //设置背景为透明 | ||
39 | //TODO:2.0警告建议cc.Camera.main.backgroundColor = cc.Color.TRANSPARENT; | ||
40 | // cc.director.setClearColor(cc.Color.TRANSPARENT); | ||
41 | cc.Camera.main.backgroundColor = cc.Color.TRANSPARENT; | ||
42 | this._oSceneContext = {}; | ||
43 | this._oNextSceneParameter = {}; | ||
44 | //获得应用级别的上下文状态 | ||
45 | if (cc.find('application')) { | ||
46 | this._cApplication = cc.find('application').getComponent(Application); | ||
47 | } else { | ||
48 | let nodeApplication = new cc.Node('application'); | ||
49 | cc.game.addPersistRootNode(nodeApplication); | ||
50 | this._cApplication = nodeApplication.addComponent(Application); | ||
51 | } | ||
52 | //创建Log节点 | ||
53 | let nodeLog = new cc.Node('Log'); | ||
54 | this._cLog = nodeLog.addComponent(Log); | ||
55 | this._cLog.init(this); | ||
56 | nodeLog.parent = this.node; | ||
57 | nodeLog.opacity = 0; | ||
58 | //注册键盘事件 | ||
59 | cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDown, this); | ||
60 | cc.systemEvent.on(cc.SystemEvent.EventType.KEY_UP, this.onKeyUp, this); | ||
61 | //注册摸来摸去事件 | ||
62 | this.node.on('touchstart', this.onTouchStart, this); | ||
63 | this.node.on('touchmove', this.onTouchMove, this); | ||
64 | this.node.on('touchend', this.onTouchEnd, this); | ||
65 | this.node.on('before_focus_change', this.onBeforeFocusChange, this); | ||
66 | this.node.on('after_focus_change', this.onAfterFocusChange, this); | ||
67 | this.node.on('focus', this.onFocus, this); | ||
68 | this.node.on('blur', this.onBlur, this); | ||
69 | //以后再考虑是否用这种做法 | ||
70 | //this.node.on('focus_leave', this.onFocusLeave,this); | ||
71 | //this.node.on('focus_hover', this.onFocusHover,this); | ||
72 | //初始化焦点临接表 | ||
73 | if (null == this._aFocusTargets[0]) { | ||
74 | this._aFocusTargets[0] = []; | ||
75 | } | ||
76 | |||
77 | //添加探针 | ||
78 | this.sceneBIProbe(); | ||
79 | }, | ||
80 | onKeyUp: function (event) { | ||
81 | cc.log('OnKeyUp In TVCanvas'); | ||
82 | //-----------------------禁止长按------------------------------- | ||
83 | this.holdClick = false; | ||
84 | //------------------------------------------------------ | ||
85 | }, | ||
86 | onKeyDown: function (event) { | ||
87 | //-------------------------禁止长按------------------------------ | ||
88 | if (!this.holdClick) { | ||
89 | this.holdClick = true; | ||
90 | } else { | ||
91 | event.keyCode = 0; //更改keyCode值使该键值失效, | ||
92 | // return; | ||
93 | } | ||
94 | //------------------------------------------------------- | ||
95 | |||
96 | let nodeLog = null; | ||
97 | switch (event.keyCode) { | ||
98 | case cc.macro.KEY.t: | ||
99 | nodeLog = this.node.getChildByName('Log'); | ||
100 | nodeLog.opacity = ((nodeLog.opacity == 0) ? 255 : 0); | ||
101 | this._cLog.screenD('....日志测试Test-' + nodeLog.opacity + '-a'); | ||
102 | this._cLog.screenI('....日志测试Test-' + nodeLog.opacity + '-b'); | ||
103 | this._cLog.screenW('....日志测试Test-' + nodeLog.opacity + '-c'); | ||
104 | this._cLog.screenE('....日志测试Test-' + nodeLog.opacity + '-d'); | ||
105 | break; | ||
106 | case cc.macro.KEY.enter: | ||
107 | case cc.macro.KEY.space: | ||
108 | case Common.ANDROID_KEY.enter: | ||
109 | if (0 == this._fiCurrentFocus.node.getName().indexOf('AppIcon')) { | ||
110 | this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); | ||
111 | } | ||
112 | if (0 == this._fiCurrentFocus.node.getName().indexOf('BtnBackTop')) { | ||
113 | this.backAScene(); | ||
114 | } | ||
115 | break; | ||
116 | } | ||
117 | }, | ||
118 | onTouchStart: function (event) { | ||
119 | cc.log('OnTouchStart In TVCanvas'); | ||
120 | }, | ||
121 | onTouchMove: function (event) { | ||
122 | cc.log('OnTouchMove In TVCanvas'); | ||
123 | }, | ||
124 | onTouchEnd: function (event) { | ||
125 | cc.log('OnTouchEnd In TVCanvas'); | ||
126 | }, | ||
127 | setCurrentFocus: function (fiCurrentFocus) { | ||
128 | this._fiCurrentFocus = fiCurrentFocus; | ||
129 | }, | ||
130 | |||
131 | /** | ||
132 | * 返回上一个场景 | ||
133 | */ | ||
134 | backAScene: function () { | ||
135 | //上下文 | ||
136 | let compApplication = cc.find('application').getComponent(Application); | ||
137 | let aSceneContext = compApplication.getSceneContext(); | ||
138 | let aSceneParameter = compApplication.getSceneParameter(); | ||
139 | cc.log(aSceneContext); | ||
140 | if (aSceneParameter.length) { | ||
141 | this._bShowExitBox = false; | ||
142 | let oSceneParameter = aSceneParameter.pop(); | ||
143 | cc.director.loadScene(oSceneParameter.backSceneName); | ||
144 | compApplication.setBackStatus(true); | ||
145 | } else { | ||
146 | if (!this._bShowExitBox) { //弹出挽留界面 | ||
147 | this.showExitBox(); | ||
148 | } else { | ||
149 | cc.log("退出应用!"); | ||
150 | cc.game.end(); | ||
151 | } | ||
152 | } | ||
153 | }, | ||
154 | doTVLinkAction: function (oOperation) { | ||
155 | let nodeApplication = cc.find('application').getComponent(Application); | ||
156 | let aSceneContext = nodeApplication.getSceneContext(); | ||
157 | let aSceneParameter = nodeApplication.getSceneParameter(); | ||
158 | //--------------- | ||
159 | nodeApplication.setTotalFrames(cc.director.getTotalFrames()); | ||
160 | //--------------- | ||
161 | let strForwardSceneName = ""; | ||
162 | this._oNextSceneParameter.backSceneName = cc.director.getScene().name; | ||
163 | if (this._bShowExitBox && this._focusPath) { //挽留页跳转采用原先的值 | ||
164 | this._oSceneContext.focusPath = this._focusPath; | ||
165 | } else { | ||
166 | this._oSceneContext.focusPath = Common.getNodePath(this._fiCurrentFocus.node); | ||
167 | } | ||
168 | switch (oOperation.action) { | ||
169 | case "ChangeScene": | ||
170 | strForwardSceneName = oOperation.parameters.sceneName; | ||
171 | for (let key in oOperation.parameters) { | ||
172 | if (null != oOperation.parameters[key] && '' != oOperation.parameters[key]) | ||
173 | this._oNextSceneParameter[key] = oOperation.parameters[key]; | ||
174 | } | ||
175 | break; | ||
176 | case "promotionBIProbe": | ||
177 | this.promotionBIProbe(oOperation.parameters.id); | ||
178 | break; | ||
179 | case "changeLayout": | ||
180 | cc.log("改变模型布局"); | ||
181 | break; | ||
182 | default: | ||
183 | /* | ||
184 | oSceneContext.categoryId="10"; | ||
185 | oSceneContext.songListPageIndex="10"; | ||
186 | oSceneContext.focusPath=""; //光标对象 如何保存 从场景中往下寻找Node | ||
187 | aSceneContext.push(oSceneContext); | ||
188 | cc.director.loadScene('sceneSearch'); | ||
189 | */ | ||
190 | } | ||
191 | |||
192 | if (null != strForwardSceneName && 0 < strForwardSceneName.length) { | ||
193 | aSceneParameter.push(this._oNextSceneParameter); | ||
194 | aSceneContext.push(this._oSceneContext); | ||
195 | cc.director.loadScene(strForwardSceneName, function () { | ||
196 | cc.sys.garbageCollect(); | ||
197 | }); | ||
198 | } | ||
199 | }, | ||
200 | addNodeToFocusTarget: function (iStatus, strKey, nodeFocusable) { | ||
201 | this._aFocusTargets[iStatus][strKey] = nodeFocusable; | ||
202 | }, | ||
203 | getFocus: function () { | ||
204 | return this._cFocus; | ||
205 | }, | ||
206 | getCurrentFocusInfo: function () { | ||
207 | return this._fiCurrentFocus; | ||
208 | }, | ||
209 | getFocusTargets: function () { | ||
210 | return this._aFocusTargets; | ||
211 | |||
212 | }, | ||
213 | onFocus: function (event) { | ||
214 | let fiFrom = event.detail.from; | ||
215 | let fiTo = event.detail.to; | ||
216 | fiTo.onFocus(fiFrom); | ||
217 | }, | ||
218 | onBlur: function (event) { | ||
219 | let fiFrom = event.detail.from; | ||
220 | let fiTo = event.detail.to; | ||
221 | fiFrom.onBlur(fiTo); | ||
222 | |||
223 | }, | ||
224 | |||
225 | /** | ||
226 | * 仅供测试使用 | ||
227 | * @param strPlayURL 回调后得到的播放地址 | ||
228 | * | ||
229 | */ | ||
230 | onGetPlayURL: function (strPlayURL) { | ||
231 | cc.log('TVCanvas onGetPlayURL..:' + strPlayURL); | ||
232 | if (this._compPlayer) { | ||
233 | this._compPlayer.remoteURL = strPlayURL; | ||
234 | this._compPlayer.play(); | ||
235 | } | ||
236 | }, | ||
237 | |||
238 | getPageBg: function (context, kind, spriteBg) { | ||
239 | let oRankingRequestParameters = { | ||
240 | "view": "json", | ||
241 | "token": Common.TEST_API_TOKEN, | ||
242 | }; | ||
243 | Network.ajax('GET', Common.TOPDRAW_API_SERVER2 + 'ArrangeHut/GetWallPaperFrame', null, oRankingRequestParameters, | ||
244 | function (strResponse) { | ||
245 | // cc.log("Success When Get Ranking..."+strResponse); | ||
246 | try { | ||
247 | var oJSONResult = JSON.parse(strResponse); | ||
248 | if (oJSONResult.businessCode == 'success') { | ||
249 | if (oJSONResult.resultSet.length > 0) { | ||
250 | let nodeLeftRecommendPic = cc.find('Bg', context.node); | ||
251 | let normal = oJSONResult.resultSet[0].images.map.normal[0]; | ||
252 | let background = oJSONResult.resultSet[0].images.map.background[0]; | ||
253 | var strUrl = ""; | ||
254 | if (kind == 'background') { | ||
255 | strUrl = Common.TOPDRAW_IMAGE_SERVER + oJSONResult.resultSet[0].images.list[background].fileUrl; | ||
256 | } else if (kind == 'normal') { | ||
257 | strUrl = Common.TOPDRAW_IMAGE_SERVER + oJSONResult.resultSet[0].images.list[normal].fileUrl; | ||
258 | } | ||
259 | if (spriteBg) { //新增骚操作 | ||
260 | cc.loader.load(strUrl, function (err, texture) { | ||
261 | spriteBg.spriteFrame = new cc.SpriteFrame(texture); | ||
262 | }); | ||
263 | return; | ||
264 | } | ||
265 | if (strUrl) { | ||
266 | cc.loader.load(strUrl, function (err, texture) { | ||
267 | nodeLeftRecommendPic.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
268 | }); | ||
269 | } | ||
270 | } else { | ||
271 | cc.log("Nothing..."); | ||
272 | } | ||
273 | } else { | ||
274 | cc.log("Error When Get WallPaper..." + oJSONResult.description); | ||
275 | } | ||
276 | } catch (error) { | ||
277 | cc.log("Exception When Get WallPaper..." + error); | ||
278 | } | ||
279 | }, | ||
280 | function (strResponse) { | ||
281 | cc.log("Error When Get WallPaper..." + strResponse); | ||
282 | }, this, "uuid"); | ||
283 | }, | ||
284 | |||
285 | //添加场景BI探针 | ||
286 | sceneBIProbe: function () { | ||
287 | try { | ||
288 | //场景参数 | ||
289 | let oSceneParameter = this._cApplication.getTopSceneParameter() || {}; | ||
290 | let strCurSceneName = cc.director.getScene().name; | ||
291 | let strCurURL = strCurSceneName + "?"; | ||
292 | |||
293 | for (let key in oSceneParameter) { | ||
294 | if (key != "sceneName") { | ||
295 | strCurURL += (key + "=" + oSceneParameter[key] + "&"); | ||
296 | } | ||
297 | } | ||
298 | strCurURL = strCurURL.substring(0, strCurURL.length - 1); | ||
299 | |||
300 | //附加参数 | ||
301 | oSceneParameter.platformAccount = Common.USER_ID; | ||
302 | oSceneParameter.url = encodeURIComponent(strCurURL); | ||
303 | oSceneParameter.referURL = oSceneParameter.backSceneName || ""; | ||
304 | |||
305 | Network.ajax('GET', Common.BI_BASE_PATH, null, oSceneParameter, | ||
306 | function (strResponse) { | ||
307 | try { | ||
308 | // var oJSONResult = JSON.parse(strResponse); | ||
309 | // if (oJSONResult.businessCode == "success") { | ||
310 | // cc.log("Business Success : Page BI Probe Request Success"); | ||
311 | // } else { | ||
312 | // cc.log("Business Error : Page BI Probe Request failed..." + oJSONResult.description); | ||
313 | // } | ||
314 | } catch (ex) { | ||
315 | cc.log("Business Exception : Page BI Probe Request Error.." + ex); | ||
316 | } | ||
317 | }, | ||
318 | function (strResponse) { | ||
319 | cc.log("Communication Error : Page BI Probe Request Error..." + strResponse + "\r\n"); | ||
320 | }, this, "uuid" | ||
321 | ); | ||
322 | } catch (err) { | ||
323 | cc.log("Page BI Probe Request Error in promotionBIProbe..." + err); | ||
324 | } | ||
325 | }, | ||
326 | |||
327 | /*推荐位BI探针*/ | ||
328 | createPromotionBIProbeAction: function (strTVLink, strId) { | ||
329 | let joTVLink = JSON.parse(strTVLink); | ||
330 | joTVLink.click.push({ "action": "promotionBIProbe", "parameters": { "id": strId } }); | ||
331 | return JSON.stringify(joTVLink); | ||
332 | }, | ||
333 | promotionBIProbe: function (strPromotionId) { | ||
334 | try { | ||
335 | //为了BI方便统计,做些变形 | ||
336 | let strBIURL = './NoPage/TopdrawPromotion?id=' + strPromotionId;//todo:这个地址其实还不确定 | ||
337 | let oParams = { | ||
338 | "platformAccount": Common.USER_ID, | ||
339 | "url": strBIURL, | ||
340 | }; | ||
341 | Network.ajax('GET', Common.BI_BASE_PATH, null, oParams, | ||
342 | function (strResponse) { | ||
343 | try { | ||
344 | let oJSONResult = JSON.parse(strResponse); | ||
345 | if (oJSONResult.businessCode == "success") { | ||
346 | cc.log("Business Success : Promotion BI Probe Request Success"); | ||
347 | } else { | ||
348 | cc.log("Business Error : Promotion BI Probe Request failed..." + oJSONResult.description); | ||
349 | } | ||
350 | } catch (ex) { | ||
351 | cc.log("Business Exception : Promotion BI Probe Request Error.." + ex); | ||
352 | } | ||
353 | }, | ||
354 | function (strResponse) { | ||
355 | cc.log("Communication Error : Promotion BI Probe Request Error..." + strResponse + "\r\n"); | ||
356 | }, this, "uuid" | ||
357 | ); | ||
358 | } catch (err) { | ||
359 | cc.log("Promotion BI Probe Request Error in promotionBIProbe..." + err); | ||
360 | } | ||
361 | }, | ||
362 | |||
363 | /** | ||
364 | *黄色提示框 | ||
365 | * @param strTip String | ||
366 | * @param iTime Number | ||
367 | */ | ||
368 | commonTip: function (strTip, iTime) { | ||
369 | if (!this.commonTipFnCallback) { | ||
370 | this.commonTipFnCallback = function () { | ||
371 | nodeTip.opacity = 0; | ||
372 | } | ||
373 | } | ||
374 | this.unschedule(this.commonTipFnCallback); | ||
375 | if (!strTip) return; | ||
376 | iTime = iTime || 5; | ||
377 | let labelText = null; | ||
378 | let nodeTip = cc.find("CommonTip", this.node); | ||
379 | let nodeText = nodeTip && nodeTip.getChildByName("TipText"); | ||
380 | if (!nodeText) { | ||
381 | nodeTip = new cc.Node("CommonTip"); | ||
382 | let layout = nodeTip.addComponent(cc.Layout); | ||
383 | layout.type = 1; | ||
384 | layout.resizeMode = 1; | ||
385 | layout.paddingLeft = 20; | ||
386 | layout.paddingRight = 20; | ||
387 | layout.horizontalDirection = 0; | ||
388 | let spriteTipBg = nodeTip.addComponent(cc.Sprite); | ||
389 | // spriteTipBg.spriteFrame = new cc.SpriteFrame(cc.textureCache.addImage(cc.url.raw('resources/Texture/common_tip_bg.png'))); | ||
390 | cc.loader.loadRes("Texture/cabin/common_tip_bg", cc.SpriteFrame, function (err, spriteFrame) { | ||
391 | spriteTipBg.spriteFrame = spriteFrame; | ||
392 | }); | ||
393 | nodeTip.parent = this.node; | ||
394 | // nodeTip.setLocalZOrder(1000); | ||
395 | nodeTip.zIndex = 1000; | ||
396 | nodeText = new cc.Node("TipText"); | ||
397 | labelText = nodeText.addComponent(cc.Label); | ||
398 | nodeText.color = cc.Color.RED; | ||
399 | nodeTip.addChild(nodeText); | ||
400 | } else { | ||
401 | labelText = nodeText.getComponent(cc.Label); | ||
402 | } | ||
403 | labelText.string = strTip; | ||
404 | nodeTip.opacity = 255; | ||
405 | this.scheduleOnce(this.commonTipFnCallback, iTime); //修改tip时间 | ||
406 | }, | ||
407 | |||
408 | /** | ||
409 | * 统一添加订购、推荐等按钮 | ||
410 | */ | ||
411 | addHomeIcon: function (context) { | ||
412 | // var nodeOrder = new cc.Node('OrderIcon'); //订购 | ||
413 | // nodeOrder.addComponent(cc.Sprite); | ||
414 | // var widgetOrder = nodeOrder.addComponent(cc.Widget); | ||
415 | // widgetOrder.isAlignLeft = true; | ||
416 | // widgetOrder.isAlignTop = true; | ||
417 | // widgetOrder.top = 44; | ||
418 | // widgetOrder.left = 1150; | ||
419 | // cc.loader.loadRes("Texture/common/order_icon", cc.SpriteFrame, function (err, spriteFrame) { | ||
420 | // spriteFrame.setTexture(null, cc.rect(0, 0, 54, 68)); | ||
421 | // nodeOrder.getComponent(cc.Sprite).spriteFrame = spriteFrame; | ||
422 | // spriteFrame._calculateUV(); | ||
423 | // }); | ||
424 | // var fiOrderIcon = nodeOrder.addComponent(FocusInfo); | ||
425 | // context._aFocusTargets[0]['to_order_icon'] = nodeOrder; | ||
426 | // fiOrderIcon.init( | ||
427 | // null, true | ||
428 | // ); | ||
429 | // context.node.addChild(nodeOrder, 10); | ||
430 | |||
431 | // var nodeApp = new cc.Node('AppIcon'); //首页 | ||
432 | // nodeApp.addComponent(cc.Sprite); | ||
433 | // var widgetApp = nodeApp.addComponent(cc.Widget); | ||
434 | // widgetApp.isAlignLeft = true; | ||
435 | // widgetApp.isAlignTop = true; | ||
436 | // widgetApp.top = 44; | ||
437 | // widgetApp.left = 1213; | ||
438 | // cc.loader.loadRes("Texture/common/level_icon", cc.SpriteFrame, function (err, spriteFrame) { | ||
439 | // spriteFrame.setTexture(null, cc.rect(0, 0, 54, 68)); | ||
440 | // nodeApp.getComponent(cc.Sprite).spriteFrame = spriteFrame; | ||
441 | // spriteFrame._calculateUV(); | ||
442 | // }); | ||
443 | // var fiAppIcon = nodeApp.addComponent(FocusInfo); | ||
444 | // context._aFocusTargets[0]['to_app_icon'] = nodeApp; | ||
445 | // fiAppIcon.init( | ||
446 | // '{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneRecommend"}}]}', true | ||
447 | // ); | ||
448 | // context.node.addChild(nodeApp, 10); | ||
449 | }, | ||
450 | |||
451 | //弹出挽留界面 | ||
452 | showExitBox: function () { | ||
453 | this._bShowExitBox = true; | ||
454 | if (this._nodeExitBox) { | ||
455 | this._focusPath = Common.getNodePath(this._fiCurrentFocus.node); //记录原来值 | ||
456 | //焦点框跳到第二次后不会干扰第一层级 | ||
457 | this._cFocus.flyFocus(this._fiCurrentFocus, this._aFocusTargets[1]['back_right_btn'].getComponent(FocusInfo), | ||
458 | Common.MOVE_DIRECTION_UP, this._fFocusScaleFactor, null); | ||
459 | |||
460 | var oIndexBackPromotionPara = { | ||
461 | 'view': 'json', | ||
462 | 'limit': 2, | ||
463 | 'start': 0, | ||
464 | 'name': 'BabyDontGo', | ||
465 | "sortField": "left", | ||
466 | "sortDirection": "asc", | ||
467 | token: Common.TEST_API_TOKEN, | ||
468 | }; | ||
469 | Network.ajax('GET', Common.TOPDRAW_API_SERVER + "Promotion/ListItemByName", null, oIndexBackPromotionPara, | ||
470 | function (strResponse) { | ||
471 | try { | ||
472 | var oJSONResult = JSON.parse(strResponse); | ||
473 | for (let i = 0; i < oJSONResult.resultSet.length; i++) { | ||
474 | let nodeBackPromotion = new cc.Node("backPromotion" + i); | ||
475 | nodeBackPromotion.width = oJSONResult.resultSet[i].width; | ||
476 | nodeBackPromotion.height = oJSONResult.resultSet[i].height; | ||
477 | let spritePromotion = nodeBackPromotion.addComponent(cc.Sprite); | ||
478 | spritePromotion.type = cc.Sprite.Type.SIMPLE; | ||
479 | spritePromotion.sizeMode = cc.Sprite.SizeMode.CUSTOM; | ||
480 | var widgetPromotion = nodeBackPromotion.addComponent(cc.Widget); | ||
481 | widgetPromotion.isAlignTop = true; | ||
482 | widgetPromotion.isAlignLeft = true; | ||
483 | if (oJSONResult.resultSet[i].image[0].fileUrl) { | ||
484 | nodeBackPromotion.zIndex = 101; //让导航栏背景处于最底层 | ||
485 | cc.loader.load(Common.TOPDRAW_IMAGE_SERVER + oJSONResult.resultSet[i].image[0].fileUrl, function (err, texture) { | ||
486 | spritePromotion.spriteFrame = new cc.SpriteFrame(texture); | ||
487 | }); | ||
488 | } | ||
489 | widgetPromotion.top = oJSONResult.resultSet[i].top; | ||
490 | widgetPromotion.left = oJSONResult.resultSet[i].left; | ||
491 | nodeBackPromotion.parent = this._nodeExitBox; | ||
492 | } | ||
493 | //绑定立即观看按钮的tvlink | ||
494 | cc.find("BtnBackLeft", this._nodeExitBox).getComponent(FocusInfo).init( | ||
495 | oJSONResult.resultSet[0].tvlink, true | ||
496 | ); | ||
497 | cc.find("BtnBackRight", this._nodeExitBox).getComponent(FocusInfo).init( | ||
498 | oJSONResult.resultSet[1].tvlink, true | ||
499 | ); | ||
500 | } catch (error) { | ||
501 | cc.log("Exception When IndexBackPromotion..." + error); | ||
502 | } | ||
503 | }, | ||
504 | function (strResponse) { | ||
505 | cc.log("Error When IndexBackPromotion..." + strResponse); | ||
506 | }, this, "uuid"); | ||
507 | } else { | ||
508 | Common.loadRes("prefab/home/pfbExitBox", //挽留弹窗预制 | ||
509 | function (loadedResource) { | ||
510 | this._nodeExitBox = cc.instantiate(loadedResource); | ||
511 | this._nodeExitBox.parent = this.node; | ||
512 | this._nodeExitBox.zIndex = 400; //假设400为最高zIndex | ||
513 | cc.find("BtnBackLeft", this._nodeExitBox).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 294, 102)); | ||
514 | cc.find("BtnBackRight", this._nodeExitBox).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 294, 102)); | ||
515 | cc.find("BtnBackTop", this._nodeExitBox).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 140, 50)); | ||
516 | cc.find("BtnBackLeft", this._nodeExitBox).addComponent(FocusInfo); | ||
517 | cc.find("BtnBackRight", this._nodeExitBox).addComponent(FocusInfo); | ||
518 | cc.find("BtnBackTop", this._nodeExitBox).addComponent(FocusInfo); | ||
519 | if (null == this._aFocusTargets[1]) { //focus放到第二层级,避免冲突 | ||
520 | this._aFocusTargets[1] = []; | ||
521 | } | ||
522 | this._aFocusTargets[1]['back_left_btn'] = cc.find("BtnBackLeft", this._nodeExitBox); | ||
523 | this._aFocusTargets[1]['back_right_btn'] = cc.find("BtnBackRight", this._nodeExitBox); | ||
524 | this._aFocusTargets[1]['back_top_btn'] = cc.find("BtnBackTop", this._nodeExitBox); | ||
525 | this.showExitBox(); | ||
526 | }, | ||
527 | function (error) { | ||
528 | cc.log("Error When Loading Prefab pfbExitBox ..."); | ||
529 | }, this) | ||
530 | } | ||
531 | }, | ||
532 | |||
533 | onBeforeFocusChange: function (event) { | ||
534 | let fiFrom = event.detail.from; | ||
535 | let fiTo = event.detail.to; | ||
536 | |||
537 | if (0 == fiFrom.node.getName().indexOf('AppIcon')) { | ||
538 | var appIconSprite = cc.find("AppIcon", this.node).getComponent(cc.Sprite); // | ||
539 | cc.loader.loadRes("Texture/common/level_icon", cc.Texture2D, function (err, Texture) { | ||
540 | var spriteFrame = new cc.SpriteFrame(Texture, cc.rect(0, 0, 54, 68)); | ||
541 | appIconSprite.spriteFrame = spriteFrame; | ||
542 | }); | ||
543 | } | ||
544 | if (0 == fiFrom.node.getName().indexOf('OrderIcon')) { | ||
545 | var orderIconSprite = cc.find("OrderIcon", this.node).getComponent(cc.Sprite); // | ||
546 | cc.loader.loadRes("Texture/common/order_icon", cc.Texture2D, function (err, Texture) { | ||
547 | var spriteFrame = new cc.SpriteFrame(Texture, cc.rect(0, 0, 54, 68)); | ||
548 | // spriteFrame.setTexture(null, cc.rect(0, 50, 130, 50)); | ||
549 | orderIconSprite.spriteFrame = spriteFrame; | ||
550 | }); | ||
551 | } | ||
552 | |||
553 | if (0 == fiFrom.node.getName().indexOf('BtnBackTop')) { //TODO: | ||
554 | // fiFrom.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height)); | ||
555 | cc.loader.loadRes("texture/button/back_btn", cc.Texture2D, function (err, Texture) { | ||
556 | var spriteFrame = new cc.SpriteFrame(Texture, cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height)); | ||
557 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = spriteFrame; | ||
558 | }); | ||
559 | } | ||
560 | |||
561 | if (0 == fiFrom.node.getName().indexOf('BtnBackLeft') || 0 == fiFrom.node.getName().indexOf('BtnBackRight')) { | ||
562 | cc.loader.loadRes("texture/button/back_promotion_btn", cc.Texture2D, function (err, Texture) { | ||
563 | var spriteFrame = new cc.SpriteFrame(Texture, cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height)); | ||
564 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = spriteFrame; | ||
565 | }); | ||
566 | } | ||
567 | |||
568 | }, | ||
569 | |||
570 | onAfterFocusChange: function (event) { | ||
571 | let fiFrom = event.detail.from; | ||
572 | let fiTo = event.detail.to; | ||
573 | if (0 == fiTo.node.getName().indexOf('AppIcon')) { | ||
574 | var appIconSprite = cc.find("AppIcon", this.node).getComponent(cc.Sprite); // | ||
575 | cc.loader.loadRes("Texture/common/level_icon", cc.Texture2D, function (err, Texture) { | ||
576 | var spriteFrame = new cc.SpriteFrame(Texture, cc.rect(0, 68, 54, 68)); | ||
577 | appIconSprite.spriteFrame = spriteFrame; | ||
578 | }); | ||
579 | } | ||
580 | if (0 == fiTo.node.getName().indexOf('OrderIcon')) { | ||
581 | var orderIconSprite = cc.find("OrderIcon", this.node).getComponent(cc.Sprite); // | ||
582 | cc.loader.loadRes("Texture/common/order_icon", cc.Texture2D, function (err, Texture) { | ||
583 | var spriteFrame = new cc.SpriteFrame(Texture, cc.rect(0, 68, 54, 68)); | ||
584 | orderIconSprite.spriteFrame = spriteFrame; | ||
585 | }); | ||
586 | } | ||
587 | |||
588 | if (0 == fiTo.node.getName().indexOf('BtnBackTop')) { //TODO: | ||
589 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); | ||
590 | cc.loader.loadRes("texture/button/back_btn", cc.Texture2D, function (err, Texture) { | ||
591 | var spriteFrame = new cc.SpriteFrame(Texture, cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); | ||
592 | fiTo.node.getComponent(cc.Sprite).spriteFrame = spriteFrame; | ||
593 | }); | ||
594 | } | ||
595 | |||
596 | if (0 == fiTo.node.getName().indexOf('BtnBackLeft') || 0 == fiTo.node.getName().indexOf('BtnBackRight')) { | ||
597 | cc.loader.loadRes("texture/button/back_promotion_btn", cc.Texture2D, function (err, Texture) { | ||
598 | var spriteFrame = new cc.SpriteFrame(Texture, cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); | ||
599 | fiTo.node.getComponent(cc.Sprite).spriteFrame = spriteFrame; | ||
600 | }); | ||
601 | } | ||
602 | |||
603 | }, | ||
604 | }); |
assets/Script/common/TVCanvas.js.meta
0 → 100644
assets/Script/common/TVFocus.js
0 → 100644
1 | var Common = require('Common'); | ||
2 | var FocusInfo = require('FocusInfo'); | ||
3 | //var AbstractTVFocus=require('AbstractTVFocus'); | ||
4 | |||
5 | cc.Class({ | ||
6 | //name:"TVFocus", | ||
7 | extends: cc.Component, | ||
8 | //extends: cc.Node, 引擎团队的人不推荐这么做 | ||
9 | |||
10 | properties: { | ||
11 | _cornerOuterRadius: 18, | ||
12 | _cornerInnerRadius: 12, | ||
13 | _screenWidth: Common.SCREEN_WIDTH, | ||
14 | _screenHeight: Common.SCREEN_HEIGHT, | ||
15 | _oScene: null, | ||
16 | //_tvlink:null, | ||
17 | //sprites:[], | ||
18 | //nodes:[], | ||
19 | //isShow:false | ||
20 | /* | ||
21 | { | ||
22 | breath:[], | ||
23 | cellTransform:[], //move+scale | ||
24 | containerTansfer[] | ||
25 | } | ||
26 | */ | ||
27 | }, | ||
28 | //由于addComponent时会新建Focus调用默认构造函数,其不支持参数输入,所以这个函数基本没用 | ||
29 | ctor: function (/*strName,oScene,fLeft,fTop,fObjectWidth,fObjectHeight,fScreenWidth,fScreenHeight,fCornerOuterRadius,fCornerInnerRadius*/) { | ||
30 | //cc.log(this instanceof Sprite); // true | ||
31 | //参数处理 | ||
32 | let strName = arguments[0]; | ||
33 | let oScene = arguments[1]; | ||
34 | let fLeft = arguments[2]; | ||
35 | let fTop = arguments[3]; | ||
36 | let fObjectWidth = arguments[4]; | ||
37 | let fObjectHeight = arguments[5]; | ||
38 | let fScreenWidth = arguments[6]; | ||
39 | let fScreenHeight = arguments[7]; | ||
40 | let fCornerOuterRadius = arguments[8]; | ||
41 | let fCornerInnerRadius = arguments[9]; | ||
42 | this.name = (strName ? strName : "focusContainer"); | ||
43 | this._oScene = oScene; | ||
44 | //this.width=fObjectWidth; | ||
45 | //this.height=fObjectHeight; | ||
46 | fLeft = (fLeft ? fLeft : 10); | ||
47 | fTop = (fTop ? fTop : 10); | ||
48 | fObjectWidth = (fObjectWidth ? fObjectWidth : 30); | ||
49 | fObjectHeight = (fObjectHeight ? fObjectHeight : 30); | ||
50 | this._screenWidth = (fScreenWidth ? fScreenWidth : Common.SCREEN_WIDTH); | ||
51 | this._screenHeight = (fScreenHeight ? fScreenHeight : Common.SCREEN_HEIGHT); | ||
52 | this._cornerOuterRadius = (fCornerOuterRadius ? fCornerOuterRadius : 18); | ||
53 | this._cornerInnerRadius = (fCornerInnerRadius ? fCornerInnerRadius : 12); | ||
54 | /* | ||
55 | var oTransformedPosition=this.transformCoordinatesWeb2Cocos(fLeft,fTop,fObjectWidth,fObjectHeight); | ||
56 | this.node.x=oTransformedPosition.x; | ||
57 | this.node.y=oTransformedPosition.y; | ||
58 | |||
59 | var urlFocus=null; | ||
60 | var textureFocus = null; | ||
61 | //1 2 3 | ||
62 | //4 6 | ||
63 | //7 8 9 | ||
64 | for (var i=1;i<=9;i++){ | ||
65 | this.node.children[i-1] = new cc.Node('focus_'+i); | ||
66 | |||
67 | if (5==i){ | ||
68 | continue; | ||
69 | } | ||
70 | urlFocus = cc.url.raw('Texture/Focus/'+i+'.png'); | ||
71 | textureFocus = cc.textureCache.addImage(urlFocus); | ||
72 | var spriteTemp = this.node.children[i-1].addComponent(cc.Sprite); | ||
73 | spriteTemp.spriteFrame = new cc.SpriteFrame(textureFocus); | ||
74 | //this.node.child[i-1].parent=this.node; | ||
75 | this.node.children[i-1].x=i*20; | ||
76 | |||
77 | if (2==i || 8==i){ | ||
78 | spriteTemp.fillType = cc.Sprite.FillType.HORIZONTAL; | ||
79 | }else if (4==i || 6==i){ | ||
80 | spriteTemp.fillType = cc.Sprite.FillType.VERTICAL; | ||
81 | } | ||
82 | } | ||
83 | //this.fly(fLeft,fTop,fObjectWidth,fObjectHeight,10,1.0); | ||
84 | */ | ||
85 | }, | ||
86 | |||
87 | init: function (strName, oScene, fiCurrentFocus,//Left,fTop,fObjectWidth,fObjectHeight, | ||
88 | fScreenWidth, fScreenHeight, fCornerOuterRadius, fCornerInnerRadius, fScaleFactor) { | ||
89 | //TODO:这个函数里面是否要做onbeforeFocus和onAfterFocus的操作 --question from eva | ||
90 | //cc.log(this instanceof Sprite); // true | ||
91 | if (strName) { | ||
92 | this.name = strName; | ||
93 | } else { | ||
94 | cc.log('No Focus Name Specified'); | ||
95 | return; | ||
96 | } | ||
97 | if (oScene) { | ||
98 | this._oScene = oScene; | ||
99 | } else { | ||
100 | cc.log('No Scene Specified for Focus'); | ||
101 | } | ||
102 | fScaleFactor = fScaleFactor || fiCurrentFocus.getScaleFactor(); | ||
103 | //this.width=fObjectWidth; | ||
104 | //this.height=fObjectHeight; | ||
105 | var fLeft = fiCurrentFocus.getLeft(); | ||
106 | var fTop = fiCurrentFocus.getTop(); | ||
107 | var fObjectWidth = fiCurrentFocus.getWidth(); | ||
108 | var fObjectHeight = fiCurrentFocus.getHeight(); | ||
109 | if (fScreenWidth) { | ||
110 | this._screenWidth = fScreenWidth; | ||
111 | } | ||
112 | if (fScreenHeight) { | ||
113 | this._screenHeight = fScreenHeight; | ||
114 | } | ||
115 | if (fCornerOuterRadius) { | ||
116 | this._cornerOuterRadius = fCornerOuterRadius; | ||
117 | } | ||
118 | if (fCornerInnerRadius) { | ||
119 | this._cornerInnerRadius = fCornerInnerRadius; | ||
120 | } | ||
121 | var oTransformedPosition = this.transformCoordinatesWeb2Cocos(fLeft, fTop, fObjectWidth, fObjectHeight); | ||
122 | this.node.x = oTransformedPosition.x; | ||
123 | this.node.y = oTransformedPosition.y; | ||
124 | var urlFocus = null; | ||
125 | var textureFocus = null; | ||
126 | //1 2 3 | ||
127 | //4 6 | ||
128 | //7 8 9 | ||
129 | for (var i = 1; i <= 9; i++) { | ||
130 | //this.node.children[i-1] = new cc.Node('focus_'+i); | ||
131 | this.node.addChild(new cc.Node('focus_' + i), 10); | ||
132 | if (5 == i) { | ||
133 | continue; | ||
134 | } | ||
135 | // urlFocus = cc.url.raw('resources/Texture/Focus/'+i+'.png'); | ||
136 | // textureFocus = cc.textureCache.addImage(urlFocus); | ||
137 | var spriteTemp = this.node.getChildByName('focus_' + i).addComponent(cc.Sprite); | ||
138 | // spriteTemp.spriteFrame = new cc.SpriteFrame(textureFocus); | ||
139 | var ftaScaleTo = null | ||
140 | if (2 == i || 8 == i) { | ||
141 | //spriteTemp.sizeMode = cc.Sprite.SizeMode.CUSTOM; | ||
142 | //spriteTemp.type= cc.Sprite.Type.FILLED; | ||
143 | //spriteTemp.fillType = cc.Sprite.FillType.HORIZONTAL; | ||
144 | //spriteTemp.width=fObjectWidth-2*fCornerInnerRadius; | ||
145 | //this.node.children[i-1].width=fObjectWidth-2*fCornerInnerRadius; | ||
146 | //this.node.children[i-1].height=fCornerOuterRadius; | ||
147 | ftaScaleTo = cc.scaleTo(0, fScaleFactor * (fObjectWidth - 2 * fCornerInnerRadius), fScaleFactor * 1.0); | ||
148 | } else if (4 == i || 6 == i) { | ||
149 | //spriteTemp.sizeMode = cc.Sprite.SizeMode.CUSTOM; | ||
150 | //spriteTemp.type= cc.Sprite.Type.FILLED; | ||
151 | //spriteTemp.fillType = cc.Sprite.FillType.VERTICAL; | ||
152 | //spriteTemp.height=fObjectHeight-2*fCornerInnerRadius; | ||
153 | //this.node.children[i-1].setContentSize(); | ||
154 | //this.node.children[i-1].width=fCornerOuterRadius; | ||
155 | //this.node.children[i-1].height=fObjectHeight-2*fCornerInnerRadius; | ||
156 | ftaScaleTo = cc.scaleTo(0, fScaleFactor * 1.0, fScaleFactor * (fObjectHeight - 2 * fCornerInnerRadius)); | ||
157 | } else { | ||
158 | ftaScaleTo = cc.scaleTo(0, fScaleFactor, fScaleFactor); | ||
159 | } | ||
160 | ftaScaleTo.setTag(Common.FOCUS_CELL_TRANSFER); | ||
161 | this.node.children[i - 1].stopAllActions(); | ||
162 | this.node.children[i - 1].runAction(ftaScaleTo); | ||
163 | } | ||
164 | //TODO:2.0版本采用异步加载本地图片,在焦点初始完成后在批量处理图片 | ||
165 | //TODO:循环中焦点框不是连续的,而批量加载的图地址是连续的需特殊处理下 | ||
166 | var self = this; | ||
167 | cc.loader.loadResDir("focus", cc.Texture2D, function (err, textures) { | ||
168 | for (let i = 1; i < 10; i++) { | ||
169 | if (i == 2 || i == 4 || i == 6 || i == 8) continue; //暂时将焦点框一部分隐藏 | ||
170 | if (i >= 5) { | ||
171 | if (i == 5) continue; | ||
172 | self.node.getChildByName('focus_' + i).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(textures[i - 2]); | ||
173 | } else { | ||
174 | self.node.getChildByName('focus_' + i).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(textures[i - 1]); | ||
175 | } | ||
176 | } | ||
177 | }); | ||
178 | |||
179 | this.node.children[0].x = fScaleFactor * (-fObjectWidth / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
180 | this.node.children[0].y = fScaleFactor * (fObjectHeight / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
181 | this.node.children[1].x = 0; | ||
182 | this.node.children[1].y = fScaleFactor * (fObjectHeight / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
183 | this.node.children[2].x = fScaleFactor * (fObjectWidth / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
184 | this.node.children[2].y = fScaleFactor * (fObjectHeight / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
185 | |||
186 | this.node.children[3].x = fScaleFactor * (-fObjectWidth / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
187 | this.node.children[3].y = 0; | ||
188 | //this.node.children[4].x=0; | ||
189 | //this.node.children[4].y=0; | ||
190 | this.node.children[5].x = fScaleFactor * (fObjectWidth / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
191 | this.node.children[5].y = 0; | ||
192 | |||
193 | this.node.children[6].x = fScaleFactor * (-fObjectWidth / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
194 | this.node.children[6].y = fScaleFactor * (-fObjectHeight / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
195 | this.node.children[7].x = 0; | ||
196 | this.node.children[7].y = fScaleFactor * (-fObjectHeight / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
197 | this.node.children[8].x = fScaleFactor * (fObjectWidth / 2 + (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
198 | this.node.children[8].y = fScaleFactor * (-fObjectHeight / 2 - (fCornerOuterRadius / 2 - fCornerInnerRadius)); | ||
199 | |||
200 | //放大 当前选中的Node | ||
201 | var ftaScaleCurrentFocus = cc.scaleTo(0, fScaleFactor, fScaleFactor); | ||
202 | ftaScaleCurrentFocus.setTag(Common.FEATURE_NODE_TRANSFER); | ||
203 | |||
204 | //fiCurrentFocus.node.setLocalZOrder(40); | ||
205 | |||
206 | //fiCurrentFocus.node.stopAllActions(); | ||
207 | //fiCurrentFocus.node.runAction(ftaScaleCurrentFocus); | ||
208 | |||
209 | // fiCurrentFocus.node.setLocalZOrder(40); | ||
210 | fiCurrentFocus.node.zIndex = 40; | ||
211 | |||
212 | fiCurrentFocus.node.stopAllActions(); | ||
213 | fiCurrentFocus.node.runAction(ftaScaleCurrentFocus); | ||
214 | |||
215 | //开始呼吸动画 | ||
216 | var aiFocusBreath = cc.repeatForever(cc.sequence(cc.fadeTo(1, 100), cc.fadeTo(1, 255), cc.fadeTo(2, 255))); | ||
217 | aiFocusBreath.setTag(Common.FOCUS_CONTAINER_BREATH); | ||
218 | this.node.stopAllActions(); | ||
219 | this.node.runAction(aiFocusBreath); | ||
220 | |||
221 | this._oScene.setCurrentFocus(fiCurrentFocus); | ||
222 | }, | ||
223 | |||
224 | // use this for initialization | ||
225 | onLoad: function () { | ||
226 | cc.log("Focus onLoad..."); | ||
227 | }, | ||
228 | /* | ||
229 | test: function(){ | ||
230 | var imgUrl1 = cc.url.raw('Texture/Focus/1.png'); | ||
231 | var texture1 = cc.textureCache.addImage(imgUrl1); | ||
232 | this.node.getChildByName('focus_'+i).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture1); | ||
233 | },*/ | ||
234 | |||
235 | hide: function () { | ||
236 | //this.node.opacity=0; | ||
237 | this.node.children[0].opacity = 0; | ||
238 | this.node.children[1].opacity = 0; | ||
239 | this.node.children[2].opacity = 0; | ||
240 | this.node.children[3].opacity = 0; | ||
241 | this.node.children[4].opacity = 0; | ||
242 | this.node.children[5].opacity = 0; | ||
243 | this.node.children[6].opacity = 0; | ||
244 | this.node.children[7].opacity = 0; | ||
245 | this.node.children[8].opacity = 0; | ||
246 | }, | ||
247 | show: function () { | ||
248 | |||
249 | //this.node.opacity=255; | ||
250 | this.node.children[0].opacity = 255; | ||
251 | this.node.children[1].opacity = 255; | ||
252 | this.node.children[2].opacity = 255; | ||
253 | this.node.children[3].opacity = 255; | ||
254 | this.node.children[4].opacity = 255; | ||
255 | this.node.children[5].opacity = 255; | ||
256 | this.node.children[6].opacity = 255; | ||
257 | this.node.children[7].opacity = 255; | ||
258 | this.node.children[8].opacity = 255; | ||
259 | }, | ||
260 | |||
261 | //分别处理9块区域 输入坐标为左上角所需 | ||
262 | fly: function (fLeft, fTop, fObjectWidth, fObjectHeight, fDuration, fScaleFactor) { | ||
263 | //1 2 3 | ||
264 | //4 6 | ||
265 | //7 8 9 | ||
266 | var oTransformedPosition = this.transformCoordinatesWeb2Cocos(fLeft, fTop, fObjectWidth, fObjectHeight); | ||
267 | var ftaContainerMoveTo = cc.moveTo(fDuration, oTransformedPosition.x, oTransformedPosition.y); | ||
268 | |||
269 | ftaContainerMoveTo.setTag(Common.FOCUS_CONTAINER_TRANSFER); | ||
270 | |||
271 | //var blink=cc.blink(5.0,5); | ||
272 | //this.node.runAction(blink); | ||
273 | //this.node.x=oTransformedPosition.x; | ||
274 | //this.node.y=oTransformedPosition.y; | ||
275 | |||
276 | var ftaMoveTo = []; | ||
277 | var ftaScaleTo = null; | ||
278 | |||
279 | var ftaCombined = []; | ||
280 | |||
281 | ftaMoveTo[0] = cc.moveTo(fDuration, | ||
282 | fScaleFactor * (-fObjectWidth / 2 - (this._cornerOuterRadius / 2 - this._cornerInnerRadius)), | ||
283 | fScaleFactor * (fObjectHeight / 2 + (this._cornerOuterRadius / 2 - this._cornerInnerRadius)) | ||
284 | ); | ||
285 | |||
286 | ftaMoveTo[1] = cc.moveTo(fDuration, | ||
287 | 0, | ||
288 | fScaleFactor * (fObjectHeight / 2 + (this._cornerOuterRadius / 2 - this._cornerInnerRadius)) | ||
289 | ); | ||
290 | |||
291 | ftaMoveTo[2] = cc.moveTo(fDuration, | ||
292 | fScaleFactor * (fObjectWidth / 2 + (this._cornerOuterRadius / 2 - this._cornerInnerRadius)), | ||
293 | fScaleFactor * (fObjectHeight / 2 + (this._cornerOuterRadius / 2 - this._cornerInnerRadius)) | ||
294 | ); | ||
295 | |||
296 | ftaMoveTo[3] = cc.moveTo(fDuration, | ||
297 | fScaleFactor * (-fObjectWidth / 2 - (this._cornerOuterRadius / 2 - this._cornerInnerRadius)), | ||
298 | 0 | ||
299 | ); | ||
300 | |||
301 | //Nothing should be done for 4 | ||
302 | |||
303 | ftaMoveTo[5] = cc.moveTo(fDuration, | ||
304 | fScaleFactor * (fObjectWidth / 2 + (this._cornerOuterRadius / 2 - this._cornerInnerRadius)), | ||
305 | 0 | ||
306 | ); | ||
307 | |||
308 | ftaMoveTo[6] = cc.moveTo(fDuration, | ||
309 | fScaleFactor * (-fObjectWidth / 2 - (this._cornerOuterRadius / 2 - this._cornerInnerRadius)), | ||
310 | fScaleFactor * (-fObjectHeight / 2 - (this._cornerOuterRadius / 2 - this._cornerInnerRadius)) | ||
311 | ); | ||
312 | ftaMoveTo[7] = cc.moveTo(fDuration, | ||
313 | 0, | ||
314 | fScaleFactor * (-fObjectHeight / 2 - (this._cornerOuterRadius / 2 - this._cornerInnerRadius)) | ||
315 | ); | ||
316 | ftaMoveTo[8] = cc.moveTo(fDuration, | ||
317 | fScaleFactor * (fObjectWidth / 2 + (this._cornerOuterRadius / 2 - this._cornerInnerRadius)), | ||
318 | fScaleFactor * (-fObjectHeight / 2 - (this._cornerOuterRadius / 2 - this._cornerInnerRadius)) | ||
319 | ); | ||
320 | |||
321 | //if (null!=this.node.getActionByTag(Common.FOCUS_CONTAINER_TRANSFER)){ | ||
322 | // this.node.stopAction(Common.FOCUS_CONTAINER_TRANSFER); | ||
323 | //} | ||
324 | //this.node.stopAllActions(); | ||
325 | |||
326 | this.node.stopAction(this.node.getActionByTag(Common.FOCUS_CONTAINER_TRANSFER)); | ||
327 | this.node.runAction(ftaContainerMoveTo); | ||
328 | |||
329 | for (var i = 1; i <= 9; i++) { | ||
330 | if (5 == i) { | ||
331 | continue; | ||
332 | } | ||
333 | if (2 == i || 8 == i) { | ||
334 | ftaScaleTo = cc.scaleTo(fDuration, fScaleFactor * (fObjectWidth - 2 * this._cornerInnerRadius), fScaleFactor * 1.0); | ||
335 | } else if (4 == i || 6 == i) { | ||
336 | ftaScaleTo = cc.scaleTo(fDuration, fScaleFactor * 1.0, fScaleFactor * (fObjectHeight - 2 * this._cornerInnerRadius)); | ||
337 | } else { | ||
338 | ftaScaleTo = cc.scaleTo(fDuration, fScaleFactor, fScaleFactor); | ||
339 | } | ||
340 | ftaCombined[i - 1] = cc.spawn(ftaMoveTo[i - 1], ftaScaleTo); | ||
341 | ftaCombined[i - 1].setTag(Common.FOCUS_CELL_TRANSFER); | ||
342 | /* | ||
343 | if (null!=this.node.children[i-1].getActionByTag(Common.FOCUS_CELL_TRANSFER)){ | ||
344 | this.node.children[i-1].stopAction(Common.FOCUS_CELL_TRANSFER); | ||
345 | }*/ | ||
346 | //this.node.stopAllActions(); | ||
347 | this.node.children[i - 1].stopAction(this.node.children[i - 1].getActionByTag(Common.FOCUS_CELL_TRANSFER)); | ||
348 | this.node.children[i - 1].runAction(ftaCombined[i - 1]); | ||
349 | } | ||
350 | }, | ||
351 | |||
352 | findTarget: function (oCurrentFocusInfo, aInFocusTargets, iStatus, iDirection) { | ||
353 | |||
354 | if (null == oCurrentFocusInfo) { | ||
355 | oCurrentFocusInfo = this._oScene.getCurrentFocusInfo(); | ||
356 | } | ||
357 | if (null == aInFocusTargets) { | ||
358 | aInFocusTargets = this._oScene.getFocusTargets() | ||
359 | } | ||
360 | var aFocusTargets = aInFocusTargets[iStatus]; | ||
361 | //var elFocusNow=document.getElementById(g_strFocusElementId); | ||
362 | var fCurrentLeft = oCurrentFocusInfo.getLeft(); | ||
363 | var fCurrentTop = oCurrentFocusInfo.getTop(); | ||
364 | var fCurrentWidth = oCurrentFocusInfo.getWidth(); | ||
365 | var fCurrentHeight = oCurrentFocusInfo.getHeight(); | ||
366 | |||
367 | var oFocusTarget = null; //node? | ||
368 | var fDirectionWeight = 5.0; | ||
369 | var fEvaluationRecord = 99999; | ||
370 | |||
371 | //决定要搞哪一个 | ||
372 | var j = 0; | ||
373 | if (Common.MOVE_DIRECTION_UP <= iDirection && iDirection <= Common.MOVE_DIRECTION_LEFT) { | ||
374 | for (var key in aFocusTargets) { //for (var i=0;i<aFocusTargets.length;i++){ | ||
375 | // cc.log("循环次数:"+j+++"/////"+key); | ||
376 | //if (aFocusTargets[i].id == g_strFocusElementId || !doesElementDisplay(aFocusTargets[i])) continue; | ||
377 | // cc.log(key + "=============" + aFocusTargets[key].name); | ||
378 | |||
379 | if (!cc.isValid(aFocusTargets[key])) continue; //TODO-jinwawa:注意有些节点已经destroy,但是实际销毁操作会延迟到当前帧渲染前执行,从下一帧开始,该对象将不再可用 | ||
380 | // 故使用cc.isValid(obj)来检查对象是否已被销毁 | ||
381 | |||
382 | let fiByKey = aFocusTargets[key].getComponent(FocusInfo); | ||
383 | |||
384 | if (!fiByKey.getEnable()) {//不显示的不参与寻找 | ||
385 | continue; | ||
386 | } | ||
387 | |||
388 | var fTargetLeft = fiByKey.getLeft(); | ||
389 | var fTargetTop = fiByKey.getTop(); | ||
390 | var fTargetWidth = fiByKey.getWidth(); | ||
391 | var fTargetHeight = fiByKey.getHeight(); | ||
392 | // cc.log("循环中目标左边距:"+fTargetLeft); | ||
393 | // cc.log("循环中目标上边距:"+fTargetTop); | ||
394 | |||
395 | //权重计算 移动方向上距离*3+和移动方向垂直的方向中心距离差 的和最小为最近控件 | ||
396 | var fDistanceOfEdge = 0.0; //移动方向边缘的距离 | ||
397 | var fOffsetOfCenter = 0.0; //垂直移动方向两块区域中心的距离 | ||
398 | var fOverlapWidth = 0.0; //在移动方向上重叠的距离 复数为不重叠 | ||
399 | var fSmallEdgeWidth = 0.0; //短的那个边缘的宽度 | ||
400 | |||
401 | if (true) { //如果目标在限制区域内 | ||
402 | switch (iDirection) { | ||
403 | case Common.MOVE_DIRECTION_UP: | ||
404 | // cc.log("参数:"+fCurrentTop+"///"+fTargetTop+"///"+fTargetHeight); | ||
405 | fDistanceOfEdge = fCurrentTop - fTargetTop - fTargetHeight; | ||
406 | fOffsetOfCenter = Math.abs(fTargetLeft + fTargetWidth / 2 - fCurrentLeft - fCurrentWidth / 2); | ||
407 | fOverlapWidth = ((fCurrentLeft + fCurrentWidth - fTargetLeft - fTargetWidth >= 0) ? fTargetLeft + fTargetWidth : fCurrentLeft + fCurrentWidth) | ||
408 | - ((fCurrentLeft - fTargetLeft >= 0) ? fCurrentLeft : fTargetLeft); | ||
409 | fSmallEdgeWidth = (fCurrentWidth < fTargetWidth) ? fCurrentWidth : fTargetWidth; | ||
410 | break; | ||
411 | case Common.MOVE_DIRECTION_DOWN: | ||
412 | fDistanceOfEdge = fTargetTop - fCurrentTop - fCurrentHeight; | ||
413 | fOffsetOfCenter = Math.abs(fTargetLeft + fTargetWidth / 2 - fCurrentLeft - fCurrentWidth / 2); | ||
414 | fOverlapWidth = ((fCurrentLeft + fCurrentWidth - fTargetLeft - fTargetWidth >= 0) ? fTargetLeft + fTargetWidth : fCurrentLeft + fCurrentWidth) | ||
415 | - ((fCurrentLeft - fTargetLeft >= 0) ? fCurrentLeft : fTargetLeft); | ||
416 | fSmallEdgeWidth = (fCurrentWidth < fTargetWidth) ? fCurrentWidth : fTargetWidth; | ||
417 | break; | ||
418 | case Common.MOVE_DIRECTION_LEFT: | ||
419 | fDistanceOfEdge = fCurrentLeft - fTargetLeft - fTargetWidth; | ||
420 | fOffsetOfCenter = Math.abs(fTargetTop + fTargetHeight / 2 - fCurrentTop - fCurrentHeight / 2); | ||
421 | fOverlapWidth = ((fCurrentTop + fCurrentHeight - fTargetTop - fTargetHeight >= 0) ? fTargetTop + fTargetHeight : fCurrentTop + fCurrentHeight) | ||
422 | - ((fCurrentTop - fTargetTop >= 0) ? fCurrentTop : fTargetTop); | ||
423 | fSmallEdgeWidth = (fCurrentHeight < fTargetHeight) ? fCurrentHeight : fTargetHeight; | ||
424 | break; | ||
425 | case Common.MOVE_DIRECTION_RIGHT: | ||
426 | fDistanceOfEdge = fTargetLeft - fCurrentLeft - fCurrentWidth; | ||
427 | fOffsetOfCenter = Math.abs(fTargetTop + fTargetHeight / 2 - fCurrentTop - fCurrentHeight / 2); | ||
428 | fOverlapWidth = ((fCurrentTop + fCurrentHeight - fTargetTop - fTargetHeight >= 0) ? fTargetTop + fTargetHeight : fCurrentTop + fCurrentHeight) | ||
429 | - ((fCurrentTop - fTargetTop >= 0) ? fCurrentTop : fTargetTop); | ||
430 | fSmallEdgeWidth = (fCurrentHeight < fTargetHeight) ? fCurrentHeight : fTargetHeight; | ||
431 | break; | ||
432 | } | ||
433 | |||
434 | // cc.log(fiByKey.node.name + "///////////////////估值" + fTargetLeft + "::" + fCurrentLeft + "::" + fCurrentWidth); | ||
435 | if (fDistanceOfEdge >= 0 /*&& fOffsetOfCenter<g_iBlockWidth*/) { //目标位置要在我前进的一侧(移动方向不能重叠),并且不能太偏离中心 | ||
436 | // cc.log("fDistanceOfEdge>=0"); | ||
437 | //估值=距离目标的邻边垂直距离*方向权重+重心所在轴偏移量 | ||
438 | var fEvaluation = -100 * (fOverlapWidth / fSmallEdgeWidth) + fDistanceOfEdge; | ||
439 | //cc.log(aFocusTargets[i].id+"==> "+fEvaluation+" =-20*("+fSmallEdgeWidth+"/"+fOverlapWidth+")"+"+"+fDistanceOfEdge); | ||
440 | //+fOffsetOfCenter*fDirectionWeight; | ||
441 | if (fEvaluationRecord > fEvaluation) { | ||
442 | // cc.log(fEvaluationRecord+"/////"+fEvaluation); | ||
443 | fEvaluationRecord = fEvaluation; | ||
444 | //elFormerTarget=elFocusTarget; | ||
445 | //oFocusTarget=aFocusTargets[key]; | ||
446 | oFocusTarget = fiByKey; | ||
447 | } | ||
448 | } | ||
449 | } | ||
450 | //elFocusTarget=FindNearestFocusTarget(strDirection,fFocusLeft,fFocusTop,fFocusWidth,fFocusHeight,fLeft,fTop,fWidth,fHeight); | ||
451 | } | ||
452 | |||
453 | //Log.warning("["+(elFormerTarget?elFormerTarget.id:"null")+","+(elFocusTarget?elFocusTarget.id:"null")+"]"); | ||
454 | |||
455 | if (null == oFocusTarget) { //找不到目标 不移动,一般到了边界 | ||
456 | cc.log("No Target Found: oFocusTarget = null..."); | ||
457 | return null; | ||
458 | } | ||
459 | } else { | ||
460 | cc.log("No Target Found: unavailable direction"); | ||
461 | return null | ||
462 | } | ||
463 | return oFocusTarget; | ||
464 | |||
465 | }, | ||
466 | |||
467 | transformCoordinatesWeb2Cocos: function (fLeft, fTop, fObjectWidth, fObjectHeight) { | ||
468 | var oCocosCoordinates = {}; | ||
469 | |||
470 | oCocosCoordinates.x = fLeft + fObjectWidth / 2 - this._screenWidth / 2; | ||
471 | oCocosCoordinates.y = this._screenHeight / 2 - fObjectHeight / 2 - fTop; | ||
472 | return oCocosCoordinates; | ||
473 | }, | ||
474 | |||
475 | flyFocus: function (fiCurrentFocus, fiFocusTarget, iDirection, fScaleFactor, oScrollParameter, iDuration) { | ||
476 | if (null == fiFocusTarget) {//todo:先判断这个是否更划得来 | ||
477 | //找不到目标的动画小交互 | ||
478 | //var blink1=cc.blink(0.6,20); | ||
479 | //this.node.runAction(blink1); | ||
480 | |||
481 | let aiJoggle = cc.repeat( | ||
482 | cc.sequence( | ||
483 | cc.rotateTo(0.02, -2), | ||
484 | cc.rotateTo(0.02, 0), | ||
485 | cc.rotateTo(0.02, 2), | ||
486 | cc.rotateTo(0.02, 0) | ||
487 | ), | ||
488 | 4 | ||
489 | ); | ||
490 | aiJoggle.setTag(Common.FOCUS_CONTAINER_JOGGLE); | ||
491 | //if (null!=this.node.getActionByTag(Common.FOCUS_CONTAINER_JOGGLE)){ | ||
492 | // this.node.stopAction(Common.FOCUS_CONTAINER_JOGGLE); | ||
493 | //} | ||
494 | this.node.stopAction(this.node.getActionByTag(Common.FOCUS_CONTAINER_JOGGLE)); | ||
495 | this.node.runAction(aiJoggle); | ||
496 | return 0; | ||
497 | } | ||
498 | |||
499 | if (null == fiCurrentFocus) { | ||
500 | fiCurrentFocus = this._oScene.getCurrentFocusInfo(); | ||
501 | } | ||
502 | |||
503 | fScaleFactor = fScaleFactor || fiFocusTarget.getScaleFactor(); | ||
504 | if (null == fScaleFactor) { | ||
505 | fScaleFactor = 1.0; | ||
506 | } | ||
507 | |||
508 | if (null == iDuration) { | ||
509 | iDuration = Common.FOCUS_FLY_DURATION; | ||
510 | } | ||
511 | |||
512 | //是否是有效方向 | ||
513 | if (Common.MOVE_DIRECTION_UP <= iDirection && iDirection <= Common.MOVE_DIRECTION_LEFT) { | ||
514 | //滚屏相关参数 elScroll,iScrollStep 如果都有效开始处理滚屏 | ||
515 | //oScrollParameter.element 需要滚动的元素 Object[Element] | ||
516 | //oScrollParameter.step 滚动的距离 Integer | ||
517 | //oScrollParameter.relation 滚动是否和焦点元素有关? Integer [0|1] | ||
518 | //oScrollParameter.direction 滚动方向 ['left'|'right'|'up'|'down'] | ||
519 | |||
520 | //旧的时间通知 | ||
521 | //this.node.dispachEvent('before_focus_change', { from: fiCurrentFocus, to: fiFocusTarget}); | ||
522 | let eventBeforeFocus = new cc.Event.EventCustom('before_focus_change', true); | ||
523 | eventBeforeFocus.setUserData({ from: fiCurrentFocus, to: fiFocusTarget }); | ||
524 | this.node.dispatchEvent(eventBeforeFocus); | ||
525 | |||
526 | let eventOnBlur = new cc.Event.EventCustom('blur', true); | ||
527 | eventOnBlur.setUserData({ from: fiCurrentFocus, to: fiFocusTarget }); | ||
528 | this.node.dispatchEvent(eventOnBlur); | ||
529 | //let eventOnFocus=new cc.Event. | ||
530 | let nodeCurrent = fiCurrentFocus.node;//node; | ||
531 | let nodeTarget = fiFocusTarget.node;//node; | ||
532 | //if (fiCurrentFocus && fiCurrentFocus.onBlur && typeof fiCurrentFocus.onBlur =='function' ){ | ||
533 | // fiCurrentFocus.onBlur(); | ||
534 | //} | ||
535 | //处理因焦点移动导致的部分界面滑动 | ||
536 | let fXScrollStep = 0; | ||
537 | let fYScrollStep = 0; | ||
538 | let fXScrollTarget = 0; //新方法 | ||
539 | let fYScrollTarget = 0; //新方法 | ||
540 | if (null != oScrollParameter && null != oScrollParameter.node | ||
541 | && null != oScrollParameter.getStep() && null != oScrollParameter.getHasRelation()) { //满足此条件才考虑界面滚动 | ||
542 | //MOVE_DIRECTION_UP:0, | ||
543 | //MOVE_DIRECTION_RIGHT:1, | ||
544 | //MOVE_DIRECTION_DOWN:2, | ||
545 | //MOVE_DIRECTION_LEFT:3, | ||
546 | //默认反向 | ||
547 | if (null == oScrollParameter.getDirection()) { | ||
548 | switch (iDirection) { | ||
549 | case Common.MOVE_DIRECTION_UP: oScrollParameter.setDirection(Common.MOVE_DIRECTION_DOWN); break; | ||
550 | case Common.MOVE_DIRECTION_RIGHT: oScrollParameter.setDirection(Common.MOVE_DIRECTION_LEFT); break; | ||
551 | case Common.MOVE_DIRECTION_DOWN: oScrollParameter.setDirection(Common.MOVE_DIRECTION_UP); break; | ||
552 | case Common.MOVE_DIRECTION_LEFT: oScrollParameter.setDirection(Common.MOVE_DIRECTION_RIGHT); break; | ||
553 | } | ||
554 | } | ||
555 | //Deprecated Start | ||
556 | switch (oScrollParameter.getDirection()) { | ||
557 | case Common.MOVE_DIRECTION_UP: | ||
558 | fYScrollStep = oScrollParameter.getStep(); | ||
559 | break; | ||
560 | case Common.MOVE_DIRECTION_DOWN: | ||
561 | fYScrollStep = -oScrollParameter.getStep(); | ||
562 | break; | ||
563 | case Common.MOVE_DIRECTION_LEFT: | ||
564 | fXScrollStep = -oScrollParameter.getStep(); | ||
565 | break; | ||
566 | case Common.MOVE_DIRECTION_RIGHT: | ||
567 | fXScrollStep = oScrollParameter.getStep(); | ||
568 | break; | ||
569 | |||
570 | } | ||
571 | //let ftaMoveToScrollParameter = cc.moveTo(iDuration, | ||
572 | // oScrollParameter.node.x+fXScrollStep, | ||
573 | // oScrollParameter.node.y-fYScrollStep | ||
574 | // ); | ||
575 | //Deprecated End | ||
576 | switch (oScrollParameter.getDirection()) { //正负在外面算好了 | ||
577 | case Common.MOVE_DIRECTION_UP: | ||
578 | fYScrollTarget = oScrollParameter.getTargetPosition(); | ||
579 | break; | ||
580 | case Common.MOVE_DIRECTION_DOWN: | ||
581 | fYScrollTarget = oScrollParameter.getTargetPosition(); | ||
582 | break; | ||
583 | case Common.MOVE_DIRECTION_LEFT: | ||
584 | fXScrollTarget = oScrollParameter.getTargetPosition(); | ||
585 | break; | ||
586 | case Common.MOVE_DIRECTION_RIGHT: | ||
587 | fXScrollTarget = oScrollParameter.getTargetPosition(); | ||
588 | break; | ||
589 | |||
590 | } | ||
591 | let finished = cc.callFunc((oScrollParameter.callback ? oScrollParameter.callback : function () { | ||
592 | cc.log("do something"); | ||
593 | }), this, oScrollParameter.scope);//todo:这里是否考虑要个回调 | ||
594 | let ftaMoveToScrollParameter = cc.sequence(cc.moveTo(iDuration, fXScrollTarget, fYScrollTarget), finished); | ||
595 | |||
596 | ftaMoveToScrollParameter.setTag(Common.SCROLL_BY_FOCUS_CHANGE); | ||
597 | oScrollParameter.node.stopAction(oScrollParameter.node.getActionByTag(Common.SCROLL_BY_FOCUS_CHANGE)); | ||
598 | //oScrollParameter.node.stopAllActions(); | ||
599 | oScrollParameter.node.runAction(ftaMoveToScrollParameter); | ||
600 | oScrollParameter.setDirection(null); | ||
601 | //oScrollParameter.node.x+=fXScrollStep; | ||
602 | //oScrollParameter.node.y-=fYScrollStep; | ||
603 | } | ||
604 | |||
605 | //由于浮点数变成坐标必须取整所以不可避免会形成误差,其中的+1 -1为了保证边框不留空隙 | ||
606 | //Target会比边框稍大 | ||
607 | |||
608 | //let fDestFocusLeft = iScaledTargetLeft - g_iFocusFrameWidth + iXScrollStep + "px"; | ||
609 | //let fDestFocusTop = iScaledTargetTop - g_iFocusFrameHeight + iYScrollStep + "px"; | ||
610 | //let fDestFocusWidth = iScaledTargetWidth + 2 * g_iFocusFrameWidth + "px"; | ||
611 | //let fDestFocusHeight = iScaledTargetHeight + 2 * g_iFocusFrameHeight + "px"; | ||
612 | |||
613 | //只要改掉相对Left Top 就可 | ||
614 | //此处需很小心处理和上下代码的关系 | ||
615 | /* | ||
616 | if (null != oScrollParameter && null != oScrollParameter.node | ||
617 | && null != oScrollParameter.getStep() && null != oScrollParameter.getHasRelation()) { //满足此条件才考虑界面滚动 | ||
618 | let sizeVisible = cc.Director.getVisibleSize(); | ||
619 | let fDestScrollElementLeft = oScrollParameter.node.x + fXScrollStep; | ||
620 | let fDestScrollElementTop = sizeVisible.height - oScrollParameter.node.y + fYScrollStep; | ||
621 | |||
622 | //这里还缺少动画 必须一起开始动 | ||
623 | oScrollParameter.node.x=fDestScrollElementLeft; | ||
624 | oScrollParameter.node.y=oScrollParameter.node.y - fYScrollStep; | ||
625 | }*/ | ||
626 | |||
627 | //准备好了所有数据 这里开始一起行动 | ||
628 | //if (g_fnOnBeforeFocusChange) { | ||
629 | // g_fnOnBeforeFocusChange(elFocusNow, elFocusTarget, strDirection); | ||
630 | //} | ||
631 | |||
632 | //按比例将焦点目标的区域进行缩放 得注意浮点数的问题 | ||
633 | |||
634 | let ftaScaleCurrentFocus = cc.scaleTo(iDuration, 1.0, 1.0); | ||
635 | let ftaScaleFocusTarget = cc.scaleTo(iDuration, fScaleFactor, fScaleFactor); | ||
636 | |||
637 | /* | ||
638 | log("ArchorPoint:%f,%f,%f,%f", pfiCurrentFocus->node->getAnchorPoint().x, | ||
639 | pfiCurrentFocus->node->getAnchorPoint().y, | ||
640 | pfiCurrentFocus->node->getAnchorPointInPoints().x, | ||
641 | pfiCurrentFocus->node->getAnchorPointInPoints().y ); | ||
642 | */ | ||
643 | /* | ||
644 | //红点测试 | ||
645 | auto sprite1 = cocos2d::Sprite::create("image/red_point.png"); | ||
646 | sprite1->setPosition(0,0 | ||
647 | // pfiCurrentFocus->node->getAnchorPointInPoints().x | ||
648 | //, pfiCurrentFocus->node->getAnchorPointInPoints().y); | ||
649 | |||
650 | pfiCurrentFocus->node->addChild(sprite1, 20, "PointFlag"); | ||
651 | */ | ||
652 | |||
653 | // nodeCurrent.setLocalZOrder(10); | ||
654 | // nodeTarget.setLocalZOrder(40); | ||
655 | nodeCurrent.zIndex = 10; | ||
656 | nodeTarget.zIndex = 40; | ||
657 | |||
658 | ftaScaleCurrentFocus.setTag(Common.FEATURE_NODE_TRANSFER); | ||
659 | ftaScaleFocusTarget.setTag(Common.FEATURE_NODE_TRANSFER); | ||
660 | //if (null!=nodeCurrent.getActionByTag(Common.FEATURE_NODE_TRANSFER)){ | ||
661 | // nodeCurrent.stopAction(Common.FEATURE_NODE_TRANSFER); | ||
662 | //} | ||
663 | //if (null!=nodeTarget.getActionByTag(Common.FEATURE_NODE_TRANSFER)){ | ||
664 | // nodeTarget.stopAction(Common.FEATURE_NODE_TRANSFER); | ||
665 | //} | ||
666 | nodeCurrent.stopAction(nodeCurrent.getActionByTag(Common.FEATURE_NODE_TRANSFER)); | ||
667 | nodeTarget.stopAction(nodeTarget.getActionByTag(Common.FEATURE_NODE_TRANSFER)); | ||
668 | nodeCurrent.runAction(ftaScaleCurrentFocus); | ||
669 | nodeTarget.runAction(ftaScaleFocusTarget); | ||
670 | cc.log(fiFocusTarget.getLeft()); | ||
671 | cc.log(fiFocusTarget.getTop()); | ||
672 | this.fly(fiFocusTarget.getLeft() + fXScrollStep, fiFocusTarget.getTop() + fYScrollStep, | ||
673 | fiFocusTarget.getWidth(), fiFocusTarget.getHeight(), | ||
674 | iDuration, fScaleFactor); | ||
675 | //if (fiTarget.onFocus && typeof fiTarget.onFocus =='function' ){ | ||
676 | // fiTarget.onFocus(); | ||
677 | //} | ||
678 | let eventOnFocus = new cc.Event.EventCustom('focus', true); | ||
679 | eventOnFocus.setUserData({ from: fiCurrentFocus, to: fiFocusTarget }); | ||
680 | this.node.dispatchEvent(eventOnFocus); | ||
681 | //旧的事件通知 | ||
682 | //this.node.emit('after_focus_change', { from: fiCurrentFocus, to: fiFocusTarget}); | ||
683 | let eventAfterFocus = new cc.Event.EventCustom('after_focus_change', true); | ||
684 | eventAfterFocus.setUserData({ from: fiCurrentFocus, to: fiFocusTarget }); | ||
685 | this.node.dispatchEvent(eventAfterFocus); | ||
686 | //新的事件通知方式 是否科学有待检验 | ||
687 | //let eventFocusLeave=new cc.Event.EventCustom('focus_leave',true); | ||
688 | //eventFocusLeave.setUserData({from:fiCurrentFocus,to:fiFocusTarget}); | ||
689 | //nodeCurrent.dispatchEvent(eventFocusLeave); | ||
690 | |||
691 | //let eventFocusHover=new cc.Event.EventCustom('focus_hover',true); | ||
692 | //eventFocusHover.setUserData({from:fiCurrentFocus,to:fiFocusTarget}); | ||
693 | //nodeTarget.dispatchEvent(eventFocusHover); | ||
694 | this._oScene.setCurrentFocus(fiFocusTarget); | ||
695 | //计算完成以下开始完成所有动作 | ||
696 | //elFocusNow.style.zIndex = 0; | ||
697 | //elFocusTarget.style.zIndex = 20; | ||
698 | /* | ||
699 | var elFocusContainer = document.getElementById("focus_container"); | ||
700 | //document.getElementById('view_port').style.left = destViewPortLeft; | ||
701 | elFocusContainer.style.left = destFocusLeft; | ||
702 | elFocusContainer.style.top = destFocusTop; | ||
703 | //document.getElementById("focus5").style.width = destFocusWidth; | ||
704 | //document.getElementById("focus5").style.height = destFocusHeight; | ||
705 | elFocusContainer.style.width = destFocusWidth; | ||
706 | elFocusContainer.style.height = destFocusHeight; | ||
707 | */ | ||
708 | //if (g_fnOnAfterFocusChange) { | ||
709 | // g_fnOnAfterFocusChange(elFocusNow, elFocusTarget, strDirection); | ||
710 | //} | ||
711 | //总要先将前面那个复原 | ||
712 | //scaleElement(g_strFocusElementId, 1, 1); | ||
713 | //g_strFocusElementId = elFocusTarget.id; | ||
714 | return 1; | ||
715 | } else { | ||
716 | cc.log("No Target Found to Fly: Unavailable Direction"); | ||
717 | return 0; | ||
718 | } | ||
719 | }, | ||
720 | |||
721 | |||
722 | jumpFocus: function (fiCurrentFocus, fiFocusTarget, iDirection, fScaleFactor, oScrollParameter) { | ||
723 | if (null == fiFocusTarget) { | ||
724 | //找不到目标的动画小交互 | ||
725 | //var blink1=cc.blink(0.6,20); | ||
726 | //this.node.runAction(blink1); | ||
727 | let aiJoggle = cc.repeat( | ||
728 | cc.sequence( | ||
729 | cc.rotateTo(0.02, -2), | ||
730 | cc.rotateTo(0.02, 0), | ||
731 | cc.rotateTo(0.02, 2), | ||
732 | cc.rotateTo(0.02, 0) | ||
733 | ), | ||
734 | 4 | ||
735 | ); | ||
736 | aiJoggle.setTag(Common.FOCUS_CONTAINER_JOGGLE); | ||
737 | this.node.stopAction(this.node.getActionByTag(Common.FOCUS_CONTAINER_JOGGLE)); | ||
738 | this.node.runAction(aiJoggle); | ||
739 | return 0; | ||
740 | } | ||
741 | fScaleFactor = fScaleFactor || fiFocusTarget.getScaleFactor(); | ||
742 | //是否是有效方向 | ||
743 | if (Common.MOVE_DIRECTION_UP <= iDirection && iDirection <= Common.MOVE_DIRECTION_LEFT) { | ||
744 | //let eventBeforeFocus=new cc.Event.EventCustom('before_focus_change', true); | ||
745 | //eventBeforeFocus.setUserData({ from: fiCurrentFocus, to: fiFocusTarget}); | ||
746 | //this.node.dispatchEvent(eventBeforeFocus); | ||
747 | //处理因焦点移动导致的部分界面滑动 | ||
748 | let fXScrollStep = 0; | ||
749 | let fYScrollStep = 0; | ||
750 | |||
751 | var ftaScaleCurrentFocus = cc.scaleTo(Common.FOCUS_FLY_DURATION, 1.0, 1.0); | ||
752 | var ftaScaleFocusTarget = cc.scaleTo(Common.FOCUS_FLY_DURATION, fScaleFactor, fScaleFactor); | ||
753 | |||
754 | var nodeCurrent = fiCurrentFocus.node;//node; | ||
755 | var nodeTarget = fiFocusTarget.node;//node; | ||
756 | |||
757 | nodeCurrent.setLocalZOrder(10); | ||
758 | nodeTarget.setLocalZOrder(40); | ||
759 | |||
760 | ftaScaleCurrentFocus.setTag(Common.FEATURE_NODE_TRANSFER); | ||
761 | ftaScaleFocusTarget.setTag(Common.FEATURE_NODE_TRANSFER); | ||
762 | |||
763 | nodeCurrent.stopAction(nodeCurrent.getActionByTag(Common.FEATURE_NODE_TRANSFER)); | ||
764 | nodeTarget.stopAction(nodeTarget.getActionByTag(Common.FEATURE_NODE_TRANSFER)); | ||
765 | |||
766 | nodeCurrent.runAction(ftaScaleCurrentFocus); | ||
767 | nodeTarget.runAction(ftaScaleFocusTarget); | ||
768 | |||
769 | this.fly(fiFocusTarget.getLeft(), fiFocusTarget.getTop(), | ||
770 | fiFocusTarget.getWidth(), fiFocusTarget.getHeight(), | ||
771 | 0, fScaleFactor | ||
772 | ); | ||
773 | //旧的事件通知 | ||
774 | //this.node.emit('after_focus_change', { from: fiCurrentFocus, to: fiFocusTarget}); | ||
775 | let eventAfterFocus = new cc.Event.EventCustom('after_focus_change', true); | ||
776 | eventAfterFocus.setUserData({ from: fiCurrentFocus, to: fiFocusTarget }); | ||
777 | this.node.dispatchEvent(eventAfterFocus); | ||
778 | |||
779 | //新的事件通知方式 是否科学有待检验 | ||
780 | //let eventFocusLeave=new cc.Event.EventCustom('focus_leave',true); | ||
781 | //eventFocusLeave.setUserData({from:fiCurrentFocus,to:fiFocusTarget}); | ||
782 | //nodeCurrent.dispatchEvent(eventFocusLeave); | ||
783 | |||
784 | //let eventFocusHover=new cc.Event.EventCustom('focus_hover',true); | ||
785 | //eventFocusHover.setUserData({from:fiCurrentFocus,to:fiFocusTarget}); | ||
786 | //nodeTarget.dispatchEvent(eventFocusHover); | ||
787 | |||
788 | this._oScene.setCurrentFocus(fiFocusTarget); | ||
789 | |||
790 | return 1; | ||
791 | |||
792 | } else { | ||
793 | cc.log("No Target Found to Fly: Unavailable Direction"); | ||
794 | return 0; | ||
795 | } | ||
796 | }, | ||
797 | |||
798 | //跳向一个未来某一刻才会出现的Focus | ||
799 | flyFocus2Fantasy: function (fiCurrentFocus, fiFocusTarget, iDirection, fScaleFactor, oScrollParameter) { | ||
800 | |||
801 | }, | ||
802 | |||
803 | getCornerOuterRadius: function () { | ||
804 | return this._cornerOuterRadius; | ||
805 | }, | ||
806 | setCornerOuterRadius: function (cornerOuterRadius) { | ||
807 | this._cornerOuterRadius = cornerOuterRadius; | ||
808 | }, | ||
809 | getCornerInnerRadius: function () { | ||
810 | return this._cornerInnerRadius; | ||
811 | }, | ||
812 | setCornerInnerRadius: function (cornerInnerRadius) { | ||
813 | this._cornerInnerRadius = cornerInnerRadius; | ||
814 | }, | ||
815 | |||
816 | // called every frame, uncomment this function to activate update callback | ||
817 | // update: function (dt) { | ||
818 | |||
819 | // }, | ||
820 | }); |
assets/Script/common/TVFocus.js.meta
0 → 100644
assets/Script/common/TVScrollParameter.js
0 → 100644
1 | cc.Class({ | ||
2 | extends: cc.Component, | ||
3 | |||
4 | properties: { | ||
5 | _fStep:1, | ||
6 | _bHasRelation:true, | ||
7 | _oNode:null, //deprecated | ||
8 | _iDirection:0, | ||
9 | _fTargetPosition:0, | ||
10 | }, | ||
11 | |||
12 | //ctor: function (fStep,bHasRelation,iDirection) { | ||
13 | ctor: function () { | ||
14 | this._fStep=arguments[0]; | ||
15 | this._bHasRelation=arguments[1]; | ||
16 | //this._oNode=arguments[2]; | ||
17 | this._iDirection=arguments[2]; | ||
18 | |||
19 | //this._fStep=fStep; | ||
20 | //this._bHasRelation=bHasRelation; | ||
21 | //this._oNode=oNode; | ||
22 | //this._iDirection=iDirection; | ||
23 | }, | ||
24 | init: function (fStep,bHasRelation,iDirection) { | ||
25 | this._fStep=fStep; | ||
26 | this._bHasRelation=bHasRelation; | ||
27 | //this._oNode=oNode; | ||
28 | this._iDirection=iDirection; | ||
29 | |||
30 | }, | ||
31 | getStep:function(){ | ||
32 | return this._fStep; | ||
33 | }, | ||
34 | setStep:function(fStep){ | ||
35 | this._fStep=fStep; | ||
36 | }, | ||
37 | getHasRelation:function(){ | ||
38 | return this._bHasRelation; | ||
39 | }, | ||
40 | setHasRelation:function(bHasRelation){ | ||
41 | this._bHasRelation=bHasRelation; | ||
42 | }, | ||
43 | /* | ||
44 | getNode:function(){ | ||
45 | return this._oNode; | ||
46 | }, | ||
47 | setNode:function(oNode){ | ||
48 | this._oNode=oNode; | ||
49 | },*/ | ||
50 | getDirection:function(){ | ||
51 | return this._iDirection; | ||
52 | }, | ||
53 | setDirection:function(iDirection){ | ||
54 | this._iDirection=iDirection; | ||
55 | }, | ||
56 | getTargetNode:function(){ | ||
57 | return this._oTargetNode; | ||
58 | }, | ||
59 | setTargetNode:function(oTargetNode){ | ||
60 | this._oTargetNode=oTargetNode; | ||
61 | }, | ||
62 | //明确目标位置 比设置Step更为有效 | ||
63 | getTargetPosition:function(){ | ||
64 | return this._fTargetPosition; | ||
65 | }, | ||
66 | setTargetPosition:function(fTargetPosition){ | ||
67 | this._fTargetPosition=fTargetPosition; | ||
68 | } | ||
69 | }); |
assets/Script/common/Test.js
0 → 100644
1 | //测试界面 | ||
2 | var TVCanvas = require('TVCanvas'); | ||
3 | cc.Class({ | ||
4 | extends: cc.Component, | ||
5 | |||
6 | properties: { | ||
7 | testSprite:cc.Sprite, | ||
8 | test:cc.Label, | ||
9 | }, | ||
10 | |||
11 | onLoad: function () { | ||
12 | //获取页面背景 | ||
13 | // this.getPageBg(this, "background"); | ||
14 | }, | ||
15 | |||
16 | // TestLog:function(){ | ||
17 | // cc.log("测试js中Test->TestLog发送方法。。。。"); | ||
18 | // }, | ||
19 | }); |
assets/Script/common/Test.js.meta
0 → 100644
assets/Script/common/Utils.js
0 → 100644
1 | //工具 | ||
2 | |||
3 | //导出变量给PersoanlListView使用 | ||
4 | // module.exports.foo = function (strResponse) { //require 实际上获取的是目标脚本内的 module.exports 变量 | ||
5 | //注意:一旦使用exports导出则static内函数全部获取不到 | ||
6 | // var utils = new Utils(); | ||
7 | // utils.setTest(strResponse); | ||
8 | // }; | ||
9 | |||
10 | cc.Class({ | ||
11 | extends: cc.Component, | ||
12 | |||
13 | properties: { | ||
14 | |||
15 | }, | ||
16 | |||
17 | onLoad: function () { | ||
18 | // this._aCategoryMediaId.join(","); //将数组转化为','相隔的字符串 | ||
19 | // if (typeof (oResult[i].images) != 'undefined' && oResult[i].images.map.normal != null) {//typeOf获取一个变量是否存在,即使oResult[i].images不存在(未声明)也不会出错 | ||
20 | // var index = oResult[i].images.map.normal[0]; | ||
21 | // fileURL = oResult[i].images.list[index].fileUrl; | ||
22 | // } | ||
23 | // cc.log("时间测试:" + this.formatDate(1522031521000)); | ||
24 | // this._graphicsLine = cc.find('ScrollContent/GraphicsLine', this.node).getComponent(cc.Graphics); | ||
25 | // this._graphicsLine.roundRect(borderX, borderY, oResult[i].width, oResult[i].height, 20);//圆角矩形路径 | ||
26 | // this._graphicsLine.stroke(); //绘制路径 | ||
27 | // if (oJSONResult.resultSet[0].score) { | ||
28 | // cc.find("LeftGroup/Score", this.node).getComponent(cc.Label).string = parseInt(oJSONResult.resultSet[0].score * 10) / 10 + "分"; | ||
29 | // } | ||
30 | |||
31 | //Label下一帧才刷新大小 | ||
32 | //目前用户可以自行在设置 label 所有属性后在执行一次 label._updateRenderData(true); 就能带当帧获取大小 | ||
33 | }, | ||
34 | |||
35 | statics: { | ||
36 | /** | ||
37 | * 移除元素 | ||
38 | */ | ||
39 | indexOfArr: function (arr, val) { | ||
40 | for (var i = 0; i < arr.length; i++) { | ||
41 | if (arr[i] == val) { return i; } | ||
42 | } | ||
43 | return -1; | ||
44 | }, | ||
45 | |||
46 | remove: function (arr, val) { | ||
47 | var index = this.indexOfArr(arr, val); | ||
48 | // cc.log("index:"+index); | ||
49 | if (index > -1) { arr.splice(index, 1); } | ||
50 | }, | ||
51 | |||
52 | /** | ||
53 | * 将时间字符串转成年月日 | ||
54 | * @param {*} date | ||
55 | */ | ||
56 | formatDate: function (date) { | ||
57 | date = new Date(date); | ||
58 | var y = date.getFullYear(); | ||
59 | var m = date.getMonth() + 1; | ||
60 | var d = date.getDate(); | ||
61 | var h = date.getHours(); | ||
62 | var m1 = date.getMinutes(); | ||
63 | var s = date.getSeconds(); | ||
64 | m = m < 10 ? ("0" + m) : m; | ||
65 | d = d < 10 ? ("0" + d) : d; | ||
66 | // return y+"-"+m+"-"+d+" "+h+":"+m1+":"+s; | ||
67 | return y + "-" + m + "-" + d; | ||
68 | }, | ||
69 | |||
70 | // 提取url中的解析字符串 | ||
71 | //使用 var params = UrlParamHash(url); | ||
72 | // var fr= params['fr']; //fr = iks | ||
73 | UrlParamHash: function (url) { | ||
74 | if(typeof(url)=='undefined') return; | ||
75 | var params = [], h; | ||
76 | var hash = url.slice(url.indexOf("?") + 1).split(/[&,']/); //以'或&分割,将变量放在数组里面,形如[fr=iks,word=slice,ie=gbk] | ||
77 | for (var i = 0; i < hash.length; i++) { | ||
78 | h = hash[i].split("="); //形如[fr,iks] | ||
79 | params[h[0]] = h[1]; | ||
80 | } | ||
81 | return params; | ||
82 | }, | ||
83 | |||
84 | //秒数转分钟 200.617083--03:21 | ||
85 | formatSecond2Minute: function (second) { | ||
86 | var mm = Math.floor(second / 60); | ||
87 | if (mm < 10) mm = "0" + mm; | ||
88 | var ss = (second % 60).toFixed(0); | ||
89 | if (ss < 10) ss = "0" + ss; | ||
90 | return mm + ":" + ss; | ||
91 | }, | ||
92 | |||
93 | //加载资源并且设置资源可以自动释放 | ||
94 | loadRes: function (url, type, completeCallback) { | ||
95 | return cc.loader.loadRes(url, type, function (err, res) { | ||
96 | if (completeCallback) { | ||
97 | completeCallback(err, res); | ||
98 | } | ||
99 | if (!err) { | ||
100 | cc.loader.setAutoReleaseRecursively(res, true); | ||
101 | } | ||
102 | |||
103 | }); | ||
104 | }, | ||
105 | |||
106 | //判断是不是移动端 | ||
107 | isMobile:function(){ | ||
108 | if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { //Web端不支持JSB | ||
109 | return true; | ||
110 | } else { | ||
111 | return false; | ||
112 | } | ||
113 | }, | ||
114 | |||
115 | //筛选得到图片 | ||
116 | getImageByTag: function (oData, strTag, index) { | ||
117 | var val = oData.images; | ||
118 | strTag = strTag || "normal"; | ||
119 | index = index || 0; | ||
120 | var strUrl = null; | ||
121 | if (val && val != '' && val != 'null') { | ||
122 | if (val.list && val.list instanceof Array && val.list.length > 0 | ||
123 | && val.map[strTag] && val.map[strTag] instanceof Array && val.map[strTag].length > 0 | ||
124 | ) { | ||
125 | if (val.list[val.map[strTag][index]].fileUrl) { | ||
126 | strUrl = Common.TOPDRAW_IMAGE_SERVER + val.list[val.map[strTag][index]].fileUrl; | ||
127 | } | ||
128 | } | ||
129 | } | ||
130 | return strUrl; | ||
131 | }, | ||
132 | |||
133 | }, | ||
134 | |||
135 | }); |
assets/Script/common/Utils.js.meta
0 → 100644
assets/Script/pfbRecommendCell.js
0 → 100644
1 | //推荐页 | ||
2 | var Common = require('Common'); | ||
3 | var Network = require('Network'); | ||
4 | |||
5 | cc.Class({ | ||
6 | extends: cc.Component, | ||
7 | |||
8 | properties: { | ||
9 | id: 0, | ||
10 | pic: cc.Sprite, | ||
11 | activeName1: cc.Label, | ||
12 | activeName2: cc.Label, | ||
13 | normalName: cc.Label, | ||
14 | }, | ||
15 | |||
16 | // data: {id,iconSF,itemName,itemPrice} | ||
17 | init: function (data, funCallback) { | ||
18 | // cc.log("pfbRecommend->init: "+data.tvlink); | ||
19 | // this.id = data.id; | ||
20 | // this.node.width = data.width; | ||
21 | // this.node.height = data.height; | ||
22 | // this.node.getChildByName('Pic').width = data.width; | ||
23 | // this.node.getChildByName('Pic').height = data.height; | ||
24 | if (data.imageURL) { | ||
25 | var self = this; | ||
26 | Network.loadImageInNativeRuntime( | ||
27 | Common.TOPDRAW_IMAGE_SERVER_EDU + data.imageURL, | ||
28 | function (texture) { | ||
29 | self.pic.spriteFrame = new cc.SpriteFrame(texture,cc.rect(0,0,self.node.width,self.node.height)); | ||
30 | |||
31 | if (null != funCallback && typeof funCallback == 'function') { | ||
32 | funCallback.call(); | ||
33 | } | ||
34 | }, null, this | ||
35 | ); | ||
36 | } | ||
37 | // this.node.getComponent(cc.Widget).top = data.top; | ||
38 | // this.node.getComponent(cc.Widget).left = data.left; | ||
39 | |||
40 | if (data.title_visible == 1) { //前三个不需要显示文字 | ||
41 | cc.find('Name', this.node).active = true; | ||
42 | cc.find('Name', this.node).width = data.width - 10; | ||
43 | cc.find('Name/TextBg', this.node).width = data.width; | ||
44 | cc.find('Name/NormalName', this.node).width = data.width - 10; | ||
45 | cc.find('Name/ActiveName', this.node).width = data.width - 10; | ||
46 | cc.find('Name/ActiveName/NameContainer', this.node).width = data.width - 10; | ||
47 | cc.find('Name/ActiveName/NameContainer/NameText', this.node).width = data.width - 10; | ||
48 | this.normalName.node.width = data.width - 10; | ||
49 | this.activeName1.string = data.title; | ||
50 | this.activeName2.string = data.title; | ||
51 | this.normalName.string = data.title; | ||
52 | this.activeName1._updateRenderData(true); | ||
53 | this.activeName2._updateRenderData(true); | ||
54 | this.normalName._updateRenderData(true); | ||
55 | |||
56 | //调整文字位置 | ||
57 | let nodeCellName = this.node.getChildByName('Name'); | ||
58 | let nodeScreenTitleText = cc.find('ActiveName/NameContainer/NameText', nodeCellName); | ||
59 | let nodeScreenTitleText1 = nodeScreenTitleText.getChildByName('NameText1'); | ||
60 | if (nodeScreenTitleText1.width > nodeScreenTitleText.width) { | ||
61 | this.normalName.overflow = cc.Label.Overflow.CLAMP; | ||
62 | this.normalName.enableWrapText = false; | ||
63 | this.normalName.horizontalAlign = cc.Label.HorizontalAlign.LEFT; | ||
64 | } | ||
65 | } | ||
66 | }, | ||
67 | |||
68 | setUIWithFocus: function () { | ||
69 | let nodeCellName = this.node.getChildByName('Name'); | ||
70 | cc.find("NormalName", nodeCellName).opacity = 255; | ||
71 | //超出滚动 | ||
72 | let nodeScreenTitleText = cc.find('ActiveName/NameContainer/NameText', nodeCellName); | ||
73 | |||
74 | let fOriginalX = nodeScreenTitleText.x; | ||
75 | let fOriginalY = nodeScreenTitleText.y; | ||
76 | |||
77 | let nodeScreenTitleText1 = nodeScreenTitleText.getChildByName('NameText1'); | ||
78 | let nodeScreenTitleText2 = nodeScreenTitleText.getChildByName('NameText2'); | ||
79 | nodeScreenTitleText2.x = nodeScreenTitleText1.x + nodeScreenTitleText1.width + 10;//TODO:补丁,解决滚动重叠 | ||
80 | cc.log(nodeScreenTitleText1.width + "------------" + nodeScreenTitleText.width); | ||
81 | if (nodeScreenTitleText1.width > nodeScreenTitleText.width) { | ||
82 | cc.find("ActiveName/NameContainer", nodeCellName).opacity = 255; | ||
83 | cc.find("NormalName", nodeCellName).opacity = 0; | ||
84 | let fEndPositionDelta = (nodeScreenTitleText1.width + 30); | ||
85 | //下方时长和字有关系,才能速度一样 | ||
86 | var ftaScreenTitleMoveToTarget = cc.moveTo(10 * (nodeScreenTitleText1.width / nodeScreenTitleText.width), fOriginalX - fEndPositionDelta, fOriginalY); | ||
87 | var ftaScreenTitleMoveToBack = cc.moveTo(0, fOriginalX, fOriginalY); | ||
88 | var sequenceMediaTitle = cc.sequence(ftaScreenTitleMoveToTarget, ftaScreenTitleMoveToBack); | ||
89 | var repeatScreenTitle = cc.repeat(sequenceMediaTitle, 10); | ||
90 | repeatScreenTitle.setTag(Common.OVERLENGTH_MOVING); | ||
91 | nodeScreenTitleText.runAction(repeatScreenTitle); | ||
92 | nodeScreenTitleText2.active = true; | ||
93 | } | ||
94 | }, | ||
95 | |||
96 | setUIWithoutFocus: function () { | ||
97 | let nodeCellName = this.node.getChildByName('Name'); | ||
98 | cc.find("NormalName", nodeCellName).opacity = 255; | ||
99 | //如有滚动停止滚动 | ||
100 | let nodeScreenTitleText = cc.find('ActiveName/NameContainer/NameText', nodeCellName); | ||
101 | if (null != nodeScreenTitleText.getActionByTag(Common.OVERLENGTH_MOVING)) { | ||
102 | nodeScreenTitleText.stopActionByTag(Common.OVERLENGTH_MOVING); | ||
103 | nodeScreenTitleText.getChildByName('NameText2').active = false; | ||
104 | cc.find("ActiveName/NameContainer", nodeCellName).opacity = 0; | ||
105 | } | ||
106 | nodeScreenTitleText.x = 0; | ||
107 | }, | ||
108 | }); |
assets/Script/pfbRecommendCell.js.meta
0 → 100644
assets/Script/pfbRecommendRightCell.js
0 → 100644
1 | //推荐页 | ||
2 | var Common = require('Common'); | ||
3 | var Network = require('Network'); | ||
4 | |||
5 | cc.Class({ | ||
6 | extends: cc.Component, | ||
7 | |||
8 | properties: { | ||
9 | id: 0, | ||
10 | pic: cc.Sprite, | ||
11 | activeName1: cc.Label, | ||
12 | activeName2: cc.Label, | ||
13 | normalName: cc.Label, | ||
14 | }, | ||
15 | |||
16 | // data: {id,iconSF,itemName,itemPrice} | ||
17 | init: function (data, funCallback) { | ||
18 | // cc.log("pfbRecommend->init: "+data.tvlink); | ||
19 | // this.id = data.id; | ||
20 | // this.node.width = data.width; | ||
21 | // this.node.height = data.height; | ||
22 | // this.node.getChildByName('Pic').width = data.width; | ||
23 | // this.node.getChildByName('Pic').height = data.height; | ||
24 | if (data.image[0].fileUrl) { | ||
25 | var self = this; | ||
26 | Network.loadImageInNativeRuntime( | ||
27 | Common.TOPDRAW_IMAGE_SERVER_EDU_RIGHT + data.image[0].fileUrl, | ||
28 | function (texture) { | ||
29 | self.pic.spriteFrame = new cc.SpriteFrame(texture); | ||
30 | |||
31 | if (null != funCallback && typeof funCallback == 'function') { | ||
32 | funCallback.call(); | ||
33 | } | ||
34 | }, null, this | ||
35 | ); | ||
36 | } | ||
37 | // this.node.getComponent(cc.Widget).top = data.top; | ||
38 | // this.node.getComponent(cc.Widget).left = data.left; | ||
39 | |||
40 | // if (data.title_visible == 1) { //前三个不需要显示文字 | ||
41 | // cc.find('Name', this.node).active = true; | ||
42 | // cc.find('Name', this.node).width = data.width - 10; | ||
43 | // cc.find('Name/TextBg', this.node).width = data.width; | ||
44 | // cc.find('Name/NormalName', this.node).width = data.width - 10; | ||
45 | // cc.find('Name/ActiveName', this.node).width = data.width - 10; | ||
46 | // cc.find('Name/ActiveName/NameContainer', this.node).width = data.width - 10; | ||
47 | // cc.find('Name/ActiveName/NameContainer/NameText', this.node).width = data.width - 10; | ||
48 | // this.normalName.node.width = data.width - 10; | ||
49 | // this.activeName1.string = data.title; | ||
50 | // this.activeName2.string = data.title; | ||
51 | // this.normalName.string = data.title; | ||
52 | // this.activeName1._updateRenderData(true); | ||
53 | // this.activeName2._updateRenderData(true); | ||
54 | // this.normalName._updateRenderData(true); | ||
55 | |||
56 | // //调整文字位置 | ||
57 | // let nodeCellName = this.node.getChildByName('Name'); | ||
58 | // let nodeScreenTitleText = cc.find('ActiveName/NameContainer/NameText', nodeCellName); | ||
59 | // let nodeScreenTitleText1 = nodeScreenTitleText.getChildByName('NameText1'); | ||
60 | // if (nodeScreenTitleText1.width > nodeScreenTitleText.width) { | ||
61 | // this.normalName.overflow = cc.Label.Overflow.CLAMP; | ||
62 | // this.normalName.enableWrapText = false; | ||
63 | // this.normalName.horizontalAlign = cc.Label.HorizontalAlign.LEFT; | ||
64 | // } | ||
65 | // } | ||
66 | }, | ||
67 | |||
68 | setUIWithFocus: function () { | ||
69 | let nodeCellName = this.node.getChildByName('Name'); | ||
70 | cc.find("NormalName", nodeCellName).opacity = 255; | ||
71 | //超出滚动 | ||
72 | let nodeScreenTitleText = cc.find('ActiveName/NameContainer/NameText', nodeCellName); | ||
73 | |||
74 | let fOriginalX = nodeScreenTitleText.x; | ||
75 | let fOriginalY = nodeScreenTitleText.y; | ||
76 | |||
77 | let nodeScreenTitleText1 = nodeScreenTitleText.getChildByName('NameText1'); | ||
78 | let nodeScreenTitleText2 = nodeScreenTitleText.getChildByName('NameText2'); | ||
79 | nodeScreenTitleText2.x = nodeScreenTitleText1.x + nodeScreenTitleText1.width + 10;//TODO:补丁,解决滚动重叠 | ||
80 | cc.log(nodeScreenTitleText1.width + "------------" + nodeScreenTitleText.width); | ||
81 | if (nodeScreenTitleText1.width > nodeScreenTitleText.width) { | ||
82 | cc.find("ActiveName/NameContainer", nodeCellName).opacity = 255; | ||
83 | cc.find("NormalName", nodeCellName).opacity = 0; | ||
84 | let fEndPositionDelta = (nodeScreenTitleText1.width + 30); | ||
85 | //下方时长和字有关系,才能速度一样 | ||
86 | var ftaScreenTitleMoveToTarget = cc.moveTo(10 * (nodeScreenTitleText1.width / nodeScreenTitleText.width), fOriginalX - fEndPositionDelta, fOriginalY); | ||
87 | var ftaScreenTitleMoveToBack = cc.moveTo(0, fOriginalX, fOriginalY); | ||
88 | var sequenceMediaTitle = cc.sequence(ftaScreenTitleMoveToTarget, ftaScreenTitleMoveToBack); | ||
89 | var repeatScreenTitle = cc.repeat(sequenceMediaTitle, 10); | ||
90 | repeatScreenTitle.setTag(Common.OVERLENGTH_MOVING); | ||
91 | nodeScreenTitleText.runAction(repeatScreenTitle); | ||
92 | nodeScreenTitleText2.active = true; | ||
93 | } | ||
94 | }, | ||
95 | |||
96 | setUIWithoutFocus: function () { | ||
97 | let nodeCellName = this.node.getChildByName('Name'); | ||
98 | cc.find("NormalName", nodeCellName).opacity = 255; | ||
99 | //如有滚动停止滚动 | ||
100 | let nodeScreenTitleText = cc.find('ActiveName/NameContainer/NameText', nodeCellName); | ||
101 | if (null != nodeScreenTitleText.getActionByTag(Common.OVERLENGTH_MOVING)) { | ||
102 | nodeScreenTitleText.stopActionByTag(Common.OVERLENGTH_MOVING); | ||
103 | nodeScreenTitleText.getChildByName('NameText2').active = false; | ||
104 | cc.find("ActiveName/NameContainer", nodeCellName).opacity = 0; | ||
105 | } | ||
106 | nodeScreenTitleText.x = 0; | ||
107 | }, | ||
108 | }); |
assets/Script/pfbRecommendRightCell.js.meta
0 → 100644
assets/Script/waterfall_course.js
0 → 100644
1 | |||
2 | cc.Class({ | ||
3 | extends: cc.Component, | ||
4 | |||
5 | statics: { | ||
6 | waterfall: { | ||
7 | "name": "Recommend", | ||
8 | "resultSet": [ | ||
9 | |||
10 | { | ||
11 | "name": "block3", | ||
12 | "height": 427, | ||
13 | "hasChildFrame": true, | ||
14 | "data": { | ||
15 | "name": "frame3", | ||
16 | "resultSet": [ | ||
17 | { | ||
18 | "name": "Title", | ||
19 | "code": "promotionItem_ca662698-17fe-436b-8bee-9b5e0a255bdb", | ||
20 | "left": 0, | ||
21 | "top": 0, | ||
22 | "width": 220, | ||
23 | "height": 36, | ||
24 | "disable": true | ||
25 | }, | ||
26 | { | ||
27 | "name": "SingerList", | ||
28 | "code": "promotionItem_0a911d4c-9223-4d49-bf63-6e4ed2a49668", | ||
29 | "left": 0, | ||
30 | "top": 60, | ||
31 | "width": 493, | ||
32 | "height": 316 | ||
33 | |||
34 | }, | ||
35 | { | ||
36 | "name": "SingerList", | ||
37 | "code": "promotionItem_c388af5a-0351-43c4-89f5-8c8bfbf5a443", | ||
38 | "left": 517, | ||
39 | "top": 60, | ||
40 | "width": 493, | ||
41 | "height": 316 | ||
42 | |||
43 | } | ||
44 | ] | ||
45 | } | ||
46 | }, | ||
47 | { | ||
48 | "name": "block1", | ||
49 | "height": 526, | ||
50 | "hasChildFrame": true, | ||
51 | "data": { | ||
52 | "name": "frame1", | ||
53 | "resultSet": [ | ||
54 | { | ||
55 | "name": "Carousel0", | ||
56 | "code": "promotionItem_fd456495-2e32-44e1-9d92-450227d4afa3", | ||
57 | "left": 0, | ||
58 | "top": 0, | ||
59 | "width": 235, | ||
60 | "height": 287 | ||
61 | }, | ||
62 | { | ||
63 | "name": "dailyRecommend", | ||
64 | "code": "promotionItem_4ca66642-33d0-41c9-9913-df131a79a375", | ||
65 | "left": 252, | ||
66 | "top": 0, | ||
67 | "width": 504, | ||
68 | "height": 287 | ||
69 | }, | ||
70 | { | ||
71 | "name": "dailyRecommend", | ||
72 | "code": "promotionItem_c5f58c16-48a5-4796-ab52-41679fc88a6d", | ||
73 | "left": 773, | ||
74 | "top": 0, | ||
75 | "width": 235, | ||
76 | "height": 287 | ||
77 | }, | ||
78 | { | ||
79 | "name": "dailyRecommend", | ||
80 | "code": "promotionItem_9fd6d854-2a72-42d5-a2c0-1ce824cf406c", | ||
81 | "left": 0, | ||
82 | "top": 308, | ||
83 | "width": 427, | ||
84 | "height": 169 | ||
85 | }, | ||
86 | { | ||
87 | "name": "dailyRecommend", | ||
88 | "code": "promotionItem_5b998526-fb2a-48f9-8977-1fc20ac91ae6", | ||
89 | "left": 445, | ||
90 | "top": 308, | ||
91 | "width": 274, | ||
92 | "height": 168 | ||
93 | }, | ||
94 | { | ||
95 | "name": "dailyRecommend", | ||
96 | "code": "promotionItem_2ff129e8-12aa-4384-a0b8-736b8ff029f1", | ||
97 | "left": 736, | ||
98 | "top": 308, | ||
99 | "width": 274, | ||
100 | "height": 168 | ||
101 | } | ||
102 | ] | ||
103 | } | ||
104 | }, | ||
105 | { | ||
106 | "name": "block2", | ||
107 | "height": 224, | ||
108 | "hasChildFrame": true, | ||
109 | "data": { | ||
110 | "name": "frame2", | ||
111 | "resultSet": [ | ||
112 | { | ||
113 | "name": "Title", | ||
114 | "code": "promotionItem_8a4a1762-22e8-4a1e-8ce3-1fe81412855a", | ||
115 | "left": 0, | ||
116 | "top": 0, | ||
117 | "width": 220, | ||
118 | "height": 33, | ||
119 | "disable": true | ||
120 | }, | ||
121 | { | ||
122 | "name": "SubjectList", | ||
123 | "layout": "horizontal", | ||
124 | "position": [0, 59], | ||
125 | "width": 1100, | ||
126 | "disable": true, | ||
127 | "childrenSize": [105, 123], | ||
128 | "childrenMargin": [0, 24, 0, 0], | ||
129 | "hasChildFrame": true, | ||
130 | "data": { | ||
131 | "name": "subjectList", | ||
132 | "resultSet": [ | ||
133 | { | ||
134 | "name": "Subject1", | ||
135 | "code": "promotionItem_e432ac2d-c1f3-4d44-a42b-7000971affa1" | ||
136 | }, | ||
137 | { | ||
138 | "name": "Subject2", | ||
139 | "code": "promotionItem_f90b7ff3-1f36-4019-9e77-cef871902343" | ||
140 | }, | ||
141 | { | ||
142 | "name": "Subject3", | ||
143 | "code": "promotionItem_e29b33e4-8954-4ef9-a6fc-0d844c909c67" | ||
144 | }, | ||
145 | { | ||
146 | "name": "Subject4", | ||
147 | "code": "promotionItem_57aea4b3-7716-4224-bc77-43272c35ee32" | ||
148 | }, | ||
149 | { | ||
150 | "name": "Subject4", | ||
151 | "code": "promotionItem_55c68c1c-451a-4197-84a1-6a39a1668a90" | ||
152 | }, | ||
153 | { | ||
154 | "name": "Subject4", | ||
155 | "code": "promotionItem_2ac9afea-aa83-4fc1-a651-4f465b3cb1c3" | ||
156 | }, | ||
157 | { | ||
158 | "name": "Subject4", | ||
159 | "code": "promotionItem_8ab81a46-b81e-4acf-bbcd-13315747eab3" | ||
160 | }, | ||
161 | { | ||
162 | "name": "Subject4", | ||
163 | "code": "promotionItem_3e6642ab-517c-49ea-8788-cdc9130716d7" | ||
164 | } | ||
165 | ] | ||
166 | }, | ||
167 | "dataTmpl": "tmplPromotionGroupCell2", | ||
168 | "childClass": "subject_list_cell" | ||
169 | |||
170 | } | ||
171 | ] | ||
172 | } | ||
173 | }, | ||
174 | { | ||
175 | "name": "block4", | ||
176 | "height": 286, | ||
177 | "hasChildFrame": true, | ||
178 | "data": { | ||
179 | "name": "frame4", | ||
180 | "resultSet": [ | ||
181 | { | ||
182 | "name": "Title", | ||
183 | "code": "promotionItem_f4c1169d-1778-48af-a449-3d195f8ca146", | ||
184 | "left": 0, | ||
185 | "top": 0, | ||
186 | "width": 220, | ||
187 | "height": 33, | ||
188 | "disable": true | ||
189 | }, | ||
190 | { | ||
191 | "name": "SubjectList", | ||
192 | "layout": "horizontal", | ||
193 | "position": [0, 57], | ||
194 | "width": 1100, | ||
195 | "disable": true, | ||
196 | "childrenSize": [159, 175], | ||
197 | "childrenMargin": [0, 11, 0, 0], | ||
198 | "hasChildFrame": true, | ||
199 | "data": { | ||
200 | "name": "subjectList", | ||
201 | "resultSet": [ | ||
202 | { | ||
203 | "name": "Subject1", | ||
204 | "code": "promotionItem_df4a26f1-bfd9-4781-9495-ba74f53bf285" | ||
205 | }, | ||
206 | { | ||
207 | "name": "Subject2", | ||
208 | "code": "promotionItem_4727bb73-6d27-455d-b573-d2bb18074b07" | ||
209 | }, | ||
210 | { | ||
211 | "name": "Subject3", | ||
212 | "code": "promotionItem_d2be83c4-78da-466b-b16d-e433bbaa4cac" | ||
213 | }, | ||
214 | { | ||
215 | "name": "Subject4", | ||
216 | "code": "promotionItem_d8bfc7e3-0df3-488a-8655-795ad48e9b74" | ||
217 | }, | ||
218 | { | ||
219 | "name": "Subject4", | ||
220 | "code": "promotionItem_9c4e1710-e9cb-4698-83eb-91cd2e85ba2e" | ||
221 | }, | ||
222 | { | ||
223 | "name": "Subject4", | ||
224 | "code": "promotionItem_edfd1449-ea73-4a19-b605-e09af698e615" | ||
225 | } | ||
226 | ] | ||
227 | }, | ||
228 | "dataTmpl": "tmplPromotionGroupCell2", | ||
229 | "childClass": "subject_list_cell" | ||
230 | |||
231 | } | ||
232 | ] | ||
233 | } | ||
234 | }, | ||
235 | { | ||
236 | "name": "block5", | ||
237 | "height": 274, | ||
238 | "hasChildFrame": true, | ||
239 | "data": { | ||
240 | "name": "frame5", | ||
241 | "resultSet": [ | ||
242 | { | ||
243 | "name": "Title", | ||
244 | "code": "promotionItem_e6bf3f27-97a7-4990-85bb-b07f75d90ef6", | ||
245 | "left": 0, | ||
246 | "top": 0, | ||
247 | "width": 220, | ||
248 | "height": 33, | ||
249 | "disable": true | ||
250 | }, | ||
251 | { | ||
252 | "name": "Title", | ||
253 | "code": "promotionItem_c39cdbc6-aa7b-4bf0-a700-0d396bc7bd47", | ||
254 | "left": 0, | ||
255 | "top": 58, | ||
256 | "width": 369, | ||
257 | "height": 155 | ||
258 | |||
259 | }, | ||
260 | { | ||
261 | "name": "Title", | ||
262 | "code": "promotionItem_0b3263db-d600-4ad3-b2ba-4787315ca51c", | ||
263 | "left": 379, | ||
264 | "top": 58, | ||
265 | "width": 254, | ||
266 | "height": 155 | ||
267 | |||
268 | }, | ||
269 | { | ||
270 | "name": "Title", | ||
271 | "code": "promotionItem_cf020301-6346-4b61-9bd8-325a976ce4b4", | ||
272 | "left": 641, | ||
273 | "top": 58, | ||
274 | "width": 369, | ||
275 | "height": 155 | ||
276 | |||
277 | } | ||
278 | ] | ||
279 | } | ||
280 | }, | ||
281 | { | ||
282 | "name": "block6", | ||
283 | "height": 382, | ||
284 | "hasChildFrame": true, | ||
285 | "data": { | ||
286 | "name": "frame6", | ||
287 | "resultSet": [ | ||
288 | { | ||
289 | "name": "Title", | ||
290 | "code": "promotionItem_f26f6b36-de3f-4f2d-8f9a-4509764b7289", | ||
291 | "left": 0, | ||
292 | "top": 0, | ||
293 | "width": 220, | ||
294 | "height": 34, | ||
295 | "disable": true | ||
296 | }, | ||
297 | { | ||
298 | "name": "Title", | ||
299 | "code": "promotionItem_502e5100-223b-4088-85e6-bcbf637e2ea3", | ||
300 | "left": 0, | ||
301 | "top": 58, | ||
302 | "width": 221, | ||
303 | "height": 135 | ||
304 | |||
305 | }, | ||
306 | { | ||
307 | "name": "Title", | ||
308 | "code": "promotionItem_05dd1dca-53e6-4fc6-b621-6c32b5ffe2f7", | ||
309 | "left": 237, | ||
310 | "top": 11, | ||
311 | "width": 521, | ||
312 | "height": 333 | ||
313 | |||
314 | }, | ||
315 | { | ||
316 | "name": "Title", | ||
317 | "code": "promotionItem_f2445926-7065-48e2-aefd-a766512be5a6", | ||
318 | "left": 774, | ||
319 | "top": 58, | ||
320 | "width": 236, | ||
321 | "height": 286 | ||
322 | |||
323 | }, | ||
324 | { | ||
325 | "name": "Title", | ||
326 | "code": "promotionItem_ffbf27dd-0c0a-4332-a39e-3234f83de867", | ||
327 | "left": 0, | ||
328 | "top": 209, | ||
329 | "width": 221, | ||
330 | "height": 135 | ||
331 | |||
332 | } | ||
333 | ] | ||
334 | } | ||
335 | }, | ||
336 | { | ||
337 | "name": "block7", | ||
338 | "height": 120, | ||
339 | "hasChildFrame": true, | ||
340 | "data": { | ||
341 | "name": "frame7", | ||
342 | "resultSet": [ | ||
343 | { | ||
344 | "name": "back2Top", | ||
345 | "code": "promotionItem_f3975526-213a-4292-95ea-ab39897e1560", | ||
346 | "left": 337, | ||
347 | "top": 0, | ||
348 | "width": 322, | ||
349 | "height": 86, | ||
350 | "containerId": "back2Top" | ||
351 | } | ||
352 | ] | ||
353 | } | ||
354 | } | ||
355 | ] | ||
356 | } | ||
357 | } | ||
358 | }); |
assets/Script/waterfall_course.js.meta
0 → 100644
assets/Script/waterfall_parent.js
0 → 100644
1 | |||
2 | cc.Class({ | ||
3 | extends: cc.Component, | ||
4 | |||
5 | statics: { | ||
6 | waterfall: { | ||
7 | "name": "Recommend", | ||
8 | "resultSet": [ | ||
9 | { | ||
10 | "name": "block6", | ||
11 | "height": 382, | ||
12 | "hasChildFrame": true, | ||
13 | "data": { | ||
14 | "name": "frame6", | ||
15 | "resultSet": [ | ||
16 | { | ||
17 | "name": "Title", | ||
18 | "code": "promotionItem_f26f6b36-de3f-4f2d-8f9a-4509764b7289", | ||
19 | "left": 0, | ||
20 | "top": 0, | ||
21 | "width": 220, | ||
22 | "height": 34, | ||
23 | "disable": true | ||
24 | }, | ||
25 | { | ||
26 | "name": "Title", | ||
27 | "code": "promotionItem_502e5100-223b-4088-85e6-bcbf637e2ea3", | ||
28 | "left": 0, | ||
29 | "top": 58, | ||
30 | "width": 221, | ||
31 | "height": 135 | ||
32 | |||
33 | }, | ||
34 | { | ||
35 | "name": "Title", | ||
36 | "code": "promotionItem_05dd1dca-53e6-4fc6-b621-6c32b5ffe2f7", | ||
37 | "left": 237, | ||
38 | "top": 11, | ||
39 | "width": 521, | ||
40 | "height": 333 | ||
41 | |||
42 | }, | ||
43 | { | ||
44 | "name": "Title", | ||
45 | "code": "promotionItem_f2445926-7065-48e2-aefd-a766512be5a6", | ||
46 | "left": 774, | ||
47 | "top": 58, | ||
48 | "width": 236, | ||
49 | "height": 286 | ||
50 | |||
51 | }, | ||
52 | { | ||
53 | "name": "Title", | ||
54 | "code": "promotionItem_ffbf27dd-0c0a-4332-a39e-3234f83de867", | ||
55 | "left": 0, | ||
56 | "top": 209, | ||
57 | "width": 221, | ||
58 | "height": 135 | ||
59 | |||
60 | } | ||
61 | ] | ||
62 | } | ||
63 | }, | ||
64 | { | ||
65 | "name": "block1", | ||
66 | "height": 526, | ||
67 | "hasChildFrame": true, | ||
68 | "data": { | ||
69 | "name": "frame1", | ||
70 | "resultSet": [ | ||
71 | |||
72 | { | ||
73 | "name": "Carousel0", | ||
74 | "code": "promotionItem_fd456495-2e32-44e1-9d92-450227d4afa3", | ||
75 | "left": 0, | ||
76 | "top": 0, | ||
77 | "width": 235, | ||
78 | "height": 287 | ||
79 | }, | ||
80 | { | ||
81 | "name": "dailyRecommend", | ||
82 | "code": "promotionItem_4ca66642-33d0-41c9-9913-df131a79a375", | ||
83 | "left": 252, | ||
84 | "top": 0, | ||
85 | "width": 504, | ||
86 | "height": 287 | ||
87 | }, | ||
88 | { | ||
89 | "name": "dailyRecommend", | ||
90 | "code": "promotionItem_c5f58c16-48a5-4796-ab52-41679fc88a6d", | ||
91 | "left": 773, | ||
92 | "top": 0, | ||
93 | "width": 235, | ||
94 | "height": 287 | ||
95 | }, | ||
96 | { | ||
97 | "name": "dailyRecommend", | ||
98 | "code": "promotionItem_9fd6d854-2a72-42d5-a2c0-1ce824cf406c", | ||
99 | "left": 0, | ||
100 | "top": 308, | ||
101 | "width": 427, | ||
102 | "height": 169 | ||
103 | }, | ||
104 | { | ||
105 | "name": "dailyRecommend", | ||
106 | "code": "promotionItem_5b998526-fb2a-48f9-8977-1fc20ac91ae6", | ||
107 | "left": 445, | ||
108 | "top": 308, | ||
109 | "width": 274, | ||
110 | "height": 168 | ||
111 | }, | ||
112 | { | ||
113 | "name": "dailyRecommend", | ||
114 | "code": "promotionItem_2ff129e8-12aa-4384-a0b8-736b8ff029f1", | ||
115 | "left": 736, | ||
116 | "top": 308, | ||
117 | "width": 274, | ||
118 | "height": 168 | ||
119 | } | ||
120 | ] | ||
121 | } | ||
122 | }, | ||
123 | { | ||
124 | "name": "block2", | ||
125 | "height": 224, | ||
126 | "hasChildFrame": true, | ||
127 | "data": { | ||
128 | "name": "frame2", | ||
129 | "resultSet": [ | ||
130 | { | ||
131 | "name": "Title", | ||
132 | "code": "promotionItem_8a4a1762-22e8-4a1e-8ce3-1fe81412855a", | ||
133 | "left": 0, | ||
134 | "top": 0, | ||
135 | "width": 220, | ||
136 | "height": 33, | ||
137 | "disable": true | ||
138 | }, | ||
139 | { | ||
140 | "name": "SubjectList", | ||
141 | "layout": "horizontal", | ||
142 | "position": [0, 59], | ||
143 | "width": 1100, | ||
144 | "disable": true, | ||
145 | "childrenSize": [105, 123], | ||
146 | "childrenMargin": [0, 24, 0, 0], | ||
147 | "hasChildFrame": true, | ||
148 | "data": { | ||
149 | "name": "subjectList", | ||
150 | "resultSet": [ | ||
151 | { | ||
152 | "name": "Subject1", | ||
153 | "code": "promotionItem_e432ac2d-c1f3-4d44-a42b-7000971affa1" | ||
154 | }, | ||
155 | { | ||
156 | "name": "Subject2", | ||
157 | "code": "promotionItem_f90b7ff3-1f36-4019-9e77-cef871902343" | ||
158 | }, | ||
159 | { | ||
160 | "name": "Subject3", | ||
161 | "code": "promotionItem_e29b33e4-8954-4ef9-a6fc-0d844c909c67" | ||
162 | }, | ||
163 | { | ||
164 | "name": "Subject4", | ||
165 | "code": "promotionItem_57aea4b3-7716-4224-bc77-43272c35ee32" | ||
166 | }, | ||
167 | { | ||
168 | "name": "Subject4", | ||
169 | "code": "promotionItem_55c68c1c-451a-4197-84a1-6a39a1668a90" | ||
170 | }, | ||
171 | { | ||
172 | "name": "Subject4", | ||
173 | "code": "promotionItem_2ac9afea-aa83-4fc1-a651-4f465b3cb1c3" | ||
174 | }, | ||
175 | { | ||
176 | "name": "Subject4", | ||
177 | "code": "promotionItem_8ab81a46-b81e-4acf-bbcd-13315747eab3" | ||
178 | }, | ||
179 | { | ||
180 | "name": "Subject4", | ||
181 | "code": "promotionItem_3e6642ab-517c-49ea-8788-cdc9130716d7" | ||
182 | } | ||
183 | ] | ||
184 | }, | ||
185 | "dataTmpl": "tmplPromotionGroupCell2", | ||
186 | "childClass": "subject_list_cell" | ||
187 | |||
188 | } | ||
189 | ] | ||
190 | } | ||
191 | }, | ||
192 | { | ||
193 | "name": "block3", | ||
194 | "height": 427, | ||
195 | "hasChildFrame": true, | ||
196 | "data": { | ||
197 | "name": "frame3", | ||
198 | "resultSet": [ | ||
199 | { | ||
200 | "name": "Title", | ||
201 | "code": "promotionItem_ca662698-17fe-436b-8bee-9b5e0a255bdb", | ||
202 | "left": 0, | ||
203 | "top": 0, | ||
204 | "width": 220, | ||
205 | "height": 36, | ||
206 | "disable": true | ||
207 | }, | ||
208 | { | ||
209 | "name": "SingerList", | ||
210 | "code": "promotionItem_0a911d4c-9223-4d49-bf63-6e4ed2a49668", | ||
211 | "left": 0, | ||
212 | "top": 60, | ||
213 | "width": 493, | ||
214 | "height": 316 | ||
215 | |||
216 | }, | ||
217 | { | ||
218 | "name": "SingerList", | ||
219 | "code": "promotionItem_c388af5a-0351-43c4-89f5-8c8bfbf5a443", | ||
220 | "left": 517, | ||
221 | "top": 60, | ||
222 | "width": 493, | ||
223 | "height": 316 | ||
224 | |||
225 | } | ||
226 | ] | ||
227 | } | ||
228 | }, | ||
229 | { | ||
230 | "name": "block4", | ||
231 | "height": 286, | ||
232 | "hasChildFrame": true, | ||
233 | "data": { | ||
234 | "name": "frame4", | ||
235 | "resultSet": [ | ||
236 | { | ||
237 | "name": "Title", | ||
238 | "code": "promotionItem_f4c1169d-1778-48af-a449-3d195f8ca146", | ||
239 | "left": 0, | ||
240 | "top": 0, | ||
241 | "width": 220, | ||
242 | "height": 33, | ||
243 | "disable": true | ||
244 | }, | ||
245 | { | ||
246 | "name": "SubjectList", | ||
247 | "layout": "horizontal", | ||
248 | "position": [0, 57], | ||
249 | "width": 1100, | ||
250 | "disable": true, | ||
251 | "childrenSize": [159, 175], | ||
252 | "childrenMargin": [0, 11, 0, 0], | ||
253 | "hasChildFrame": true, | ||
254 | "data": { | ||
255 | "name": "subjectList", | ||
256 | "resultSet": [ | ||
257 | { | ||
258 | "name": "Subject1", | ||
259 | "code": "promotionItem_df4a26f1-bfd9-4781-9495-ba74f53bf285" | ||
260 | }, | ||
261 | { | ||
262 | "name": "Subject2", | ||
263 | "code": "promotionItem_4727bb73-6d27-455d-b573-d2bb18074b07" | ||
264 | }, | ||
265 | { | ||
266 | "name": "Subject3", | ||
267 | "code": "promotionItem_d2be83c4-78da-466b-b16d-e433bbaa4cac" | ||
268 | }, | ||
269 | { | ||
270 | "name": "Subject4", | ||
271 | "code": "promotionItem_d8bfc7e3-0df3-488a-8655-795ad48e9b74" | ||
272 | }, | ||
273 | { | ||
274 | "name": "Subject4", | ||
275 | "code": "promotionItem_9c4e1710-e9cb-4698-83eb-91cd2e85ba2e" | ||
276 | }, | ||
277 | { | ||
278 | "name": "Subject4", | ||
279 | "code": "promotionItem_edfd1449-ea73-4a19-b605-e09af698e615" | ||
280 | } | ||
281 | ] | ||
282 | }, | ||
283 | "dataTmpl": "tmplPromotionGroupCell2", | ||
284 | "childClass": "subject_list_cell" | ||
285 | |||
286 | } | ||
287 | ] | ||
288 | } | ||
289 | }, | ||
290 | { | ||
291 | "name": "block5", | ||
292 | "height": 274, | ||
293 | "hasChildFrame": true, | ||
294 | "data": { | ||
295 | "name": "frame5", | ||
296 | "resultSet": [ | ||
297 | { | ||
298 | "name": "Title", | ||
299 | "code": "promotionItem_e6bf3f27-97a7-4990-85bb-b07f75d90ef6", | ||
300 | "left": 0, | ||
301 | "top": 0, | ||
302 | "width": 220, | ||
303 | "height": 33, | ||
304 | "disable": true | ||
305 | }, | ||
306 | { | ||
307 | "name": "Title", | ||
308 | "code": "promotionItem_c39cdbc6-aa7b-4bf0-a700-0d396bc7bd47", | ||
309 | "left": 0, | ||
310 | "top": 58, | ||
311 | "width": 369, | ||
312 | "height": 155 | ||
313 | |||
314 | }, | ||
315 | { | ||
316 | "name": "Title", | ||
317 | "code": "promotionItem_0b3263db-d600-4ad3-b2ba-4787315ca51c", | ||
318 | "left": 379, | ||
319 | "top": 58, | ||
320 | "width": 254, | ||
321 | "height": 155 | ||
322 | |||
323 | }, | ||
324 | { | ||
325 | "name": "Title", | ||
326 | "code": "promotionItem_cf020301-6346-4b61-9bd8-325a976ce4b4", | ||
327 | "left": 641, | ||
328 | "top": 58, | ||
329 | "width": 369, | ||
330 | "height": 155 | ||
331 | |||
332 | } | ||
333 | ] | ||
334 | } | ||
335 | }, | ||
336 | |||
337 | { | ||
338 | "name": "block7", | ||
339 | "height": 120, | ||
340 | "hasChildFrame": true, | ||
341 | "data": { | ||
342 | "name": "frame7", | ||
343 | "resultSet": [ | ||
344 | { | ||
345 | "name": "back2Top", | ||
346 | "code": "promotionItem_f3975526-213a-4292-95ea-ab39897e1560", | ||
347 | "left": 337, | ||
348 | "top": 0, | ||
349 | "width": 322, | ||
350 | "height": 86, | ||
351 | "containerId": "back2Top" | ||
352 | } | ||
353 | ] | ||
354 | } | ||
355 | } | ||
356 | ] | ||
357 | } | ||
358 | } | ||
359 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Script/waterfall_parent.js.meta
0 → 100644
assets/Script/waterfall_primarySchool.js
0 → 100644
1 | |||
2 | cc.Class({ | ||
3 | extends: cc.Component, | ||
4 | |||
5 | statics: { | ||
6 | waterfall: { | ||
7 | "name": "Recommend", | ||
8 | "resultSet": [ | ||
9 | { | ||
10 | "name": "block5", | ||
11 | "height": 274, | ||
12 | "hasChildFrame": true, | ||
13 | "data": { | ||
14 | "name": "frame5", | ||
15 | "resultSet": [ | ||
16 | { | ||
17 | "name": "Title", | ||
18 | "code": "promotionItem_e6bf3f27-97a7-4990-85bb-b07f75d90ef6", | ||
19 | "left": 0, | ||
20 | "top": 0, | ||
21 | "width": 220, | ||
22 | "height": 33, | ||
23 | "disable": true | ||
24 | }, | ||
25 | { | ||
26 | "name": "Title", | ||
27 | "code": "promotionItem_c39cdbc6-aa7b-4bf0-a700-0d396bc7bd47", | ||
28 | "left": 0, | ||
29 | "top": 58, | ||
30 | "width": 369, | ||
31 | "height": 155 | ||
32 | |||
33 | }, | ||
34 | { | ||
35 | "name": "Title", | ||
36 | "code": "promotionItem_0b3263db-d600-4ad3-b2ba-4787315ca51c", | ||
37 | "left": 379, | ||
38 | "top": 58, | ||
39 | "width": 254, | ||
40 | "height": 155 | ||
41 | |||
42 | }, | ||
43 | { | ||
44 | "name": "Title", | ||
45 | "code": "promotionItem_cf020301-6346-4b61-9bd8-325a976ce4b4", | ||
46 | "left": 641, | ||
47 | "top": 58, | ||
48 | "width": 369, | ||
49 | "height": 155 | ||
50 | |||
51 | } | ||
52 | ] | ||
53 | } | ||
54 | }, | ||
55 | { | ||
56 | "name": "block1", | ||
57 | "height": 526, | ||
58 | "hasChildFrame": true, | ||
59 | "data": { | ||
60 | "name": "frame1", | ||
61 | "resultSet": [ | ||
62 | { | ||
63 | "name": "Carousel0", | ||
64 | "code": "promotionItem_fd456495-2e32-44e1-9d92-450227d4afa3", | ||
65 | "left": 0, | ||
66 | "top": 0, | ||
67 | "width": 235, | ||
68 | "height": 287 | ||
69 | }, | ||
70 | { | ||
71 | "name": "dailyRecommend", | ||
72 | "code": "promotionItem_4ca66642-33d0-41c9-9913-df131a79a375", | ||
73 | "left": 252, | ||
74 | "top": 0, | ||
75 | "width": 504, | ||
76 | "height": 287 | ||
77 | }, | ||
78 | { | ||
79 | "name": "dailyRecommend", | ||
80 | "code": "promotionItem_c5f58c16-48a5-4796-ab52-41679fc88a6d", | ||
81 | "left": 773, | ||
82 | "top": 0, | ||
83 | "width": 235, | ||
84 | "height": 287 | ||
85 | }, | ||
86 | { | ||
87 | "name": "dailyRecommend", | ||
88 | "code": "promotionItem_9fd6d854-2a72-42d5-a2c0-1ce824cf406c", | ||
89 | "left": 0, | ||
90 | "top": 308, | ||
91 | "width": 427, | ||
92 | "height": 169 | ||
93 | }, | ||
94 | { | ||
95 | "name": "dailyRecommend", | ||
96 | "code": "promotionItem_5b998526-fb2a-48f9-8977-1fc20ac91ae6", | ||
97 | "left": 445, | ||
98 | "top": 308, | ||
99 | "width": 274, | ||
100 | "height": 168 | ||
101 | }, | ||
102 | { | ||
103 | "name": "dailyRecommend", | ||
104 | "code": "promotionItem_2ff129e8-12aa-4384-a0b8-736b8ff029f1", | ||
105 | "left": 736, | ||
106 | "top": 308, | ||
107 | "width": 274, | ||
108 | "height": 168 | ||
109 | } | ||
110 | ] | ||
111 | } | ||
112 | }, | ||
113 | { | ||
114 | "name": "block2", | ||
115 | "height": 224, | ||
116 | "hasChildFrame": true, | ||
117 | "data": { | ||
118 | "name": "frame2", | ||
119 | "resultSet": [ | ||
120 | { | ||
121 | "name": "Title", | ||
122 | "code": "promotionItem_8a4a1762-22e8-4a1e-8ce3-1fe81412855a", | ||
123 | "left": 0, | ||
124 | "top": 0, | ||
125 | "width": 220, | ||
126 | "height": 33, | ||
127 | "disable": true | ||
128 | }, | ||
129 | { | ||
130 | "name": "SubjectList", | ||
131 | "layout": "horizontal", | ||
132 | "position": [0, 59], | ||
133 | "width": 1100, | ||
134 | "disable": true, | ||
135 | "childrenSize": [105, 123], | ||
136 | "childrenMargin": [0, 24, 0, 0], | ||
137 | "hasChildFrame": true, | ||
138 | "data": { | ||
139 | "name": "subjectList", | ||
140 | "resultSet": [ | ||
141 | { | ||
142 | "name": "Subject1", | ||
143 | "code": "promotionItem_e432ac2d-c1f3-4d44-a42b-7000971affa1" | ||
144 | }, | ||
145 | { | ||
146 | "name": "Subject2", | ||
147 | "code": "promotionItem_f90b7ff3-1f36-4019-9e77-cef871902343" | ||
148 | }, | ||
149 | { | ||
150 | "name": "Subject3", | ||
151 | "code": "promotionItem_e29b33e4-8954-4ef9-a6fc-0d844c909c67" | ||
152 | }, | ||
153 | { | ||
154 | "name": "Subject4", | ||
155 | "code": "promotionItem_57aea4b3-7716-4224-bc77-43272c35ee32" | ||
156 | }, | ||
157 | { | ||
158 | "name": "Subject4", | ||
159 | "code": "promotionItem_55c68c1c-451a-4197-84a1-6a39a1668a90" | ||
160 | }, | ||
161 | { | ||
162 | "name": "Subject4", | ||
163 | "code": "promotionItem_2ac9afea-aa83-4fc1-a651-4f465b3cb1c3" | ||
164 | }, | ||
165 | { | ||
166 | "name": "Subject4", | ||
167 | "code": "promotionItem_8ab81a46-b81e-4acf-bbcd-13315747eab3" | ||
168 | }, | ||
169 | { | ||
170 | "name": "Subject4", | ||
171 | "code": "promotionItem_3e6642ab-517c-49ea-8788-cdc9130716d7" | ||
172 | } | ||
173 | ] | ||
174 | }, | ||
175 | "dataTmpl": "tmplPromotionGroupCell2", | ||
176 | "childClass": "subject_list_cell" | ||
177 | |||
178 | } | ||
179 | ] | ||
180 | } | ||
181 | }, | ||
182 | { | ||
183 | "name": "block3", | ||
184 | "height": 427, | ||
185 | "hasChildFrame": true, | ||
186 | "data": { | ||
187 | "name": "frame3", | ||
188 | "resultSet": [ | ||
189 | { | ||
190 | "name": "Title", | ||
191 | "code": "promotionItem_ca662698-17fe-436b-8bee-9b5e0a255bdb", | ||
192 | "left": 0, | ||
193 | "top": 0, | ||
194 | "width": 220, | ||
195 | "height": 36, | ||
196 | "disable": true | ||
197 | }, | ||
198 | { | ||
199 | "name": "SingerList", | ||
200 | "code": "promotionItem_0a911d4c-9223-4d49-bf63-6e4ed2a49668", | ||
201 | "left": 0, | ||
202 | "top": 60, | ||
203 | "width": 493, | ||
204 | "height": 316 | ||
205 | |||
206 | }, | ||
207 | { | ||
208 | "name": "SingerList", | ||
209 | "code": "promotionItem_c388af5a-0351-43c4-89f5-8c8bfbf5a443", | ||
210 | "left": 517, | ||
211 | "top": 60, | ||
212 | "width": 493, | ||
213 | "height": 316 | ||
214 | |||
215 | } | ||
216 | ] | ||
217 | } | ||
218 | }, | ||
219 | { | ||
220 | "name": "block4", | ||
221 | "height": 286, | ||
222 | "hasChildFrame": true, | ||
223 | "data": { | ||
224 | "name": "frame4", | ||
225 | "resultSet": [ | ||
226 | { | ||
227 | "name": "Title", | ||
228 | "code": "promotionItem_f4c1169d-1778-48af-a449-3d195f8ca146", | ||
229 | "left": 0, | ||
230 | "top": 0, | ||
231 | "width": 220, | ||
232 | "height": 33, | ||
233 | "disable": true | ||
234 | }, | ||
235 | { | ||
236 | "name": "SubjectList", | ||
237 | "layout": "horizontal", | ||
238 | "position": [0, 57], | ||
239 | "width": 1100, | ||
240 | "disable": true, | ||
241 | "childrenSize": [159, 175], | ||
242 | "childrenMargin": [0, 11, 0, 0], | ||
243 | "hasChildFrame": true, | ||
244 | "data": { | ||
245 | "name": "subjectList", | ||
246 | "resultSet": [ | ||
247 | { | ||
248 | "name": "Subject1", | ||
249 | "code": "promotionItem_df4a26f1-bfd9-4781-9495-ba74f53bf285" | ||
250 | }, | ||
251 | { | ||
252 | "name": "Subject2", | ||
253 | "code": "promotionItem_4727bb73-6d27-455d-b573-d2bb18074b07" | ||
254 | }, | ||
255 | { | ||
256 | "name": "Subject3", | ||
257 | "code": "promotionItem_d2be83c4-78da-466b-b16d-e433bbaa4cac" | ||
258 | }, | ||
259 | { | ||
260 | "name": "Subject4", | ||
261 | "code": "promotionItem_d8bfc7e3-0df3-488a-8655-795ad48e9b74" | ||
262 | }, | ||
263 | { | ||
264 | "name": "Subject4", | ||
265 | "code": "promotionItem_9c4e1710-e9cb-4698-83eb-91cd2e85ba2e" | ||
266 | }, | ||
267 | { | ||
268 | "name": "Subject4", | ||
269 | "code": "promotionItem_edfd1449-ea73-4a19-b605-e09af698e615" | ||
270 | } | ||
271 | ] | ||
272 | }, | ||
273 | "dataTmpl": "tmplPromotionGroupCell2", | ||
274 | "childClass": "subject_list_cell" | ||
275 | |||
276 | } | ||
277 | ] | ||
278 | } | ||
279 | }, | ||
280 | |||
281 | { | ||
282 | "name": "block6", | ||
283 | "height": 382, | ||
284 | "hasChildFrame": true, | ||
285 | "data": { | ||
286 | "name": "frame6", | ||
287 | "resultSet": [ | ||
288 | { | ||
289 | "name": "Title", | ||
290 | "code": "promotionItem_f26f6b36-de3f-4f2d-8f9a-4509764b7289", | ||
291 | "left": 0, | ||
292 | "top": 0, | ||
293 | "width": 220, | ||
294 | "height": 34, | ||
295 | "disable": true | ||
296 | }, | ||
297 | { | ||
298 | "name": "Title", | ||
299 | "code": "promotionItem_502e5100-223b-4088-85e6-bcbf637e2ea3", | ||
300 | "left": 0, | ||
301 | "top": 58, | ||
302 | "width": 221, | ||
303 | "height": 135 | ||
304 | |||
305 | }, | ||
306 | { | ||
307 | "name": "Title", | ||
308 | "code": "promotionItem_05dd1dca-53e6-4fc6-b621-6c32b5ffe2f7", | ||
309 | "left": 237, | ||
310 | "top": 11, | ||
311 | "width": 521, | ||
312 | "height": 333 | ||
313 | |||
314 | }, | ||
315 | { | ||
316 | "name": "Title", | ||
317 | "code": "promotionItem_f2445926-7065-48e2-aefd-a766512be5a6", | ||
318 | "left": 774, | ||
319 | "top": 58, | ||
320 | "width": 236, | ||
321 | "height": 286 | ||
322 | |||
323 | }, | ||
324 | { | ||
325 | "name": "Title", | ||
326 | "code": "promotionItem_ffbf27dd-0c0a-4332-a39e-3234f83de867", | ||
327 | "left": 0, | ||
328 | "top": 209, | ||
329 | "width": 221, | ||
330 | "height": 135 | ||
331 | |||
332 | } | ||
333 | ] | ||
334 | } | ||
335 | }, | ||
336 | { | ||
337 | "name": "block7", | ||
338 | "height": 120, | ||
339 | "hasChildFrame": true, | ||
340 | "data": { | ||
341 | "name": "frame7", | ||
342 | "resultSet": [ | ||
343 | { | ||
344 | "name": "back2Top", | ||
345 | "code": "promotionItem_f3975526-213a-4292-95ea-ab39897e1560", | ||
346 | "left": 337, | ||
347 | "top": 0, | ||
348 | "width": 322, | ||
349 | "height": 86, | ||
350 | "containerId": "back2Top" | ||
351 | } | ||
352 | ] | ||
353 | } | ||
354 | } | ||
355 | ] | ||
356 | } | ||
357 | } | ||
358 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Script/waterfall_recommend.js
0 → 100644
1 | //推荐瀑布流 | ||
2 | |||
3 | cc.Class({ | ||
4 | extends: cc.Component, | ||
5 | |||
6 | statics: { | ||
7 | waterfall: | ||
8 | { | ||
9 | "name": "Recommend", | ||
10 | "resultSet": [ | ||
11 | { | ||
12 | "name": "block1", | ||
13 | "height": 526, | ||
14 | "hasChildFrame": true, | ||
15 | "data": { | ||
16 | "name": "frame1", | ||
17 | "resultSet": [ | ||
18 | { | ||
19 | "name": "Carousel0", | ||
20 | "code": "promotionItem_fd456495-2e32-44e1-9d92-450227d4afa3", | ||
21 | "left": 0, | ||
22 | "top": 0, | ||
23 | "width": 235, | ||
24 | "height": 287 | ||
25 | }, | ||
26 | { | ||
27 | "name": "dailyRecommend", | ||
28 | "code": "promotionItem_4ca66642-33d0-41c9-9913-df131a79a375", | ||
29 | "left": 252, | ||
30 | "top": 0, | ||
31 | "width": 504, | ||
32 | "height": 287 | ||
33 | }, | ||
34 | { | ||
35 | "name": "dailyRecommend", | ||
36 | "code": "promotionItem_c5f58c16-48a5-4796-ab52-41679fc88a6d", | ||
37 | "left": 773, | ||
38 | "top": 0, | ||
39 | "width": 235, | ||
40 | "height": 287 | ||
41 | }, | ||
42 | { | ||
43 | "name": "dailyRecommend", | ||
44 | "code": "promotionItem_9fd6d854-2a72-42d5-a2c0-1ce824cf406c", | ||
45 | "left": 0, | ||
46 | "top": 308, | ||
47 | "width": 427, | ||
48 | "height": 169 | ||
49 | }, | ||
50 | { | ||
51 | "name": "dailyRecommend", | ||
52 | "code": "promotionItem_5b998526-fb2a-48f9-8977-1fc20ac91ae6", | ||
53 | "left": 445, | ||
54 | "top": 308, | ||
55 | "width": 274, | ||
56 | "height": 168 | ||
57 | }, | ||
58 | { | ||
59 | "name": "dailyRecommend", | ||
60 | "code": "promotionItem_2ff129e8-12aa-4384-a0b8-736b8ff029f1", | ||
61 | "left": 736, | ||
62 | "top": 308, | ||
63 | "width": 274, | ||
64 | "height": 168 | ||
65 | } | ||
66 | ] | ||
67 | } | ||
68 | }, | ||
69 | { | ||
70 | "name": "block2", | ||
71 | "height": 224, | ||
72 | "hasChildFrame": true, | ||
73 | "data": { | ||
74 | "name": "frame2", | ||
75 | "resultSet": [ | ||
76 | { | ||
77 | "name": "Title", | ||
78 | "code": "promotionItem_8a4a1762-22e8-4a1e-8ce3-1fe81412855a", | ||
79 | "left": 0, | ||
80 | "top": 0, | ||
81 | "width": 220, | ||
82 | "height": 33, | ||
83 | "disable": true | ||
84 | }, | ||
85 | { | ||
86 | "name": "SubjectList", | ||
87 | "layout": "horizontal", | ||
88 | "position": [0, 59], | ||
89 | "width": 1100, | ||
90 | "disable": true, | ||
91 | "childrenSize": [105, 123], | ||
92 | "childrenMargin": [0, 24, 0, 0], | ||
93 | "hasChildFrame": true, | ||
94 | "data": { | ||
95 | "name": "subjectList", | ||
96 | "resultSet": [ | ||
97 | { | ||
98 | "name": "Subject1", | ||
99 | "code": "promotionItem_e432ac2d-c1f3-4d44-a42b-7000971affa1" | ||
100 | }, | ||
101 | { | ||
102 | "name": "Subject2", | ||
103 | "code": "promotionItem_f90b7ff3-1f36-4019-9e77-cef871902343" | ||
104 | }, | ||
105 | { | ||
106 | "name": "Subject3", | ||
107 | "code": "promotionItem_e29b33e4-8954-4ef9-a6fc-0d844c909c67" | ||
108 | }, | ||
109 | { | ||
110 | "name": "Subject4", | ||
111 | "code": "promotionItem_57aea4b3-7716-4224-bc77-43272c35ee32" | ||
112 | }, | ||
113 | { | ||
114 | "name": "Subject4", | ||
115 | "code": "promotionItem_55c68c1c-451a-4197-84a1-6a39a1668a90" | ||
116 | }, | ||
117 | { | ||
118 | "name": "Subject4", | ||
119 | "code": "promotionItem_2ac9afea-aa83-4fc1-a651-4f465b3cb1c3" | ||
120 | }, | ||
121 | { | ||
122 | "name": "Subject4", | ||
123 | "code": "promotionItem_8ab81a46-b81e-4acf-bbcd-13315747eab3" | ||
124 | }, | ||
125 | { | ||
126 | "name": "Subject4", | ||
127 | "code": "promotionItem_3e6642ab-517c-49ea-8788-cdc9130716d7" | ||
128 | } | ||
129 | ] | ||
130 | }, | ||
131 | "dataTmpl": "tmplPromotionGroupCell2", | ||
132 | "childClass": "subject_list_cell" | ||
133 | |||
134 | } | ||
135 | ] | ||
136 | } | ||
137 | }, | ||
138 | { | ||
139 | "name": "block3", | ||
140 | "height": 427, | ||
141 | "hasChildFrame": true, | ||
142 | "data": { | ||
143 | "name": "frame3", | ||
144 | "resultSet": [ | ||
145 | { | ||
146 | "name": "Title", | ||
147 | "code": "promotionItem_ca662698-17fe-436b-8bee-9b5e0a255bdb", | ||
148 | "left": 0, | ||
149 | "top": 0, | ||
150 | "width": 220, | ||
151 | "height": 36, | ||
152 | "disable": true | ||
153 | }, | ||
154 | { | ||
155 | "name": "SingerList", | ||
156 | "code": "promotionItem_0a911d4c-9223-4d49-bf63-6e4ed2a49668", | ||
157 | "left": 0, | ||
158 | "top": 60, | ||
159 | "width": 493, | ||
160 | "height": 316 | ||
161 | |||
162 | }, | ||
163 | { | ||
164 | "name": "SingerList", | ||
165 | "code": "promotionItem_c388af5a-0351-43c4-89f5-8c8bfbf5a443", | ||
166 | "left": 517, | ||
167 | "top": 60, | ||
168 | "width": 493, | ||
169 | "height": 316 | ||
170 | |||
171 | } | ||
172 | ] | ||
173 | } | ||
174 | }, | ||
175 | { | ||
176 | "name": "block4", | ||
177 | "height": 286, | ||
178 | "hasChildFrame": true, | ||
179 | "data": { | ||
180 | "name": "frame4", | ||
181 | "resultSet": [ | ||
182 | { | ||
183 | "name": "Title", | ||
184 | "code": "promotionItem_f4c1169d-1778-48af-a449-3d195f8ca146", | ||
185 | "left": 0, | ||
186 | "top": 0, | ||
187 | "width": 220, | ||
188 | "height": 33, | ||
189 | "disable": true | ||
190 | }, | ||
191 | { | ||
192 | "name": "SubjectList", | ||
193 | "layout": "horizontal", | ||
194 | "position": [0, 57], | ||
195 | "width": 1100, | ||
196 | "disable": true, | ||
197 | "childrenSize": [159, 175], | ||
198 | "childrenMargin": [0, 11, 0, 0], | ||
199 | "hasChildFrame": true, | ||
200 | "data": { | ||
201 | "name": "subjectList", | ||
202 | "resultSet": [ | ||
203 | { | ||
204 | "name": "Subject1", | ||
205 | "code": "promotionItem_df4a26f1-bfd9-4781-9495-ba74f53bf285" | ||
206 | }, | ||
207 | { | ||
208 | "name": "Subject2", | ||
209 | "code": "promotionItem_4727bb73-6d27-455d-b573-d2bb18074b07" | ||
210 | }, | ||
211 | { | ||
212 | "name": "Subject3", | ||
213 | "code": "promotionItem_d2be83c4-78da-466b-b16d-e433bbaa4cac" | ||
214 | }, | ||
215 | { | ||
216 | "name": "Subject4", | ||
217 | "code": "promotionItem_d8bfc7e3-0df3-488a-8655-795ad48e9b74" | ||
218 | }, | ||
219 | { | ||
220 | "name": "Subject4", | ||
221 | "code": "promotionItem_9c4e1710-e9cb-4698-83eb-91cd2e85ba2e" | ||
222 | }, | ||
223 | { | ||
224 | "name": "Subject4", | ||
225 | "code": "promotionItem_edfd1449-ea73-4a19-b605-e09af698e615" | ||
226 | } | ||
227 | ] | ||
228 | }, | ||
229 | "dataTmpl": "tmplPromotionGroupCell2", | ||
230 | "childClass": "subject_list_cell" | ||
231 | |||
232 | } | ||
233 | ] | ||
234 | } | ||
235 | }, | ||
236 | { | ||
237 | "name": "block5", | ||
238 | "height": 274, | ||
239 | "hasChildFrame": true, | ||
240 | "data": { | ||
241 | "name": "frame5", | ||
242 | "resultSet": [ | ||
243 | { | ||
244 | "name": "Title", | ||
245 | "code": "promotionItem_e6bf3f27-97a7-4990-85bb-b07f75d90ef6", | ||
246 | "left": 0, | ||
247 | "top": 0, | ||
248 | "width": 220, | ||
249 | "height": 33, | ||
250 | "disable": true | ||
251 | }, | ||
252 | { | ||
253 | "name": "Title", | ||
254 | "code": "promotionItem_c39cdbc6-aa7b-4bf0-a700-0d396bc7bd47", | ||
255 | "left": 0, | ||
256 | "top": 58, | ||
257 | "width": 369, | ||
258 | "height": 155 | ||
259 | |||
260 | }, | ||
261 | { | ||
262 | "name": "Title", | ||
263 | "code": "promotionItem_0b3263db-d600-4ad3-b2ba-4787315ca51c", | ||
264 | "left": 379, | ||
265 | "top": 58, | ||
266 | "width": 254, | ||
267 | "height": 155 | ||
268 | |||
269 | }, | ||
270 | { | ||
271 | "name": "Title", | ||
272 | "code": "promotionItem_cf020301-6346-4b61-9bd8-325a976ce4b4", | ||
273 | "left": 641, | ||
274 | "top": 58, | ||
275 | "width": 369, | ||
276 | "height": 155 | ||
277 | |||
278 | } | ||
279 | ] | ||
280 | } | ||
281 | }, | ||
282 | { | ||
283 | "name": "block6", | ||
284 | "height": 382, | ||
285 | "hasChildFrame": true, | ||
286 | "data": { | ||
287 | "name": "frame6", | ||
288 | "resultSet": [ | ||
289 | { | ||
290 | "name": "Title", | ||
291 | "code": "promotionItem_f26f6b36-de3f-4f2d-8f9a-4509764b7289", | ||
292 | "left": 0, | ||
293 | "top": 0, | ||
294 | "width": 220, | ||
295 | "height": 34, | ||
296 | "disable": true | ||
297 | }, | ||
298 | { | ||
299 | "name": "Title", | ||
300 | "code": "promotionItem_502e5100-223b-4088-85e6-bcbf637e2ea3", | ||
301 | "left": 0, | ||
302 | "top": 58, | ||
303 | "width": 221, | ||
304 | "height": 135 | ||
305 | |||
306 | }, | ||
307 | { | ||
308 | "name": "Title", | ||
309 | "code": "promotionItem_05dd1dca-53e6-4fc6-b621-6c32b5ffe2f7", | ||
310 | "left": 237, | ||
311 | "top": 11, | ||
312 | "width": 521, | ||
313 | "height": 333 | ||
314 | |||
315 | }, | ||
316 | { | ||
317 | "name": "Title", | ||
318 | "code": "promotionItem_f2445926-7065-48e2-aefd-a766512be5a6", | ||
319 | "left": 774, | ||
320 | "top": 58, | ||
321 | "width": 236, | ||
322 | "height": 286 | ||
323 | |||
324 | }, | ||
325 | { | ||
326 | "name": "Title", | ||
327 | "code": "promotionItem_ffbf27dd-0c0a-4332-a39e-3234f83de867", | ||
328 | "left": 0, | ||
329 | "top": 209, | ||
330 | "width": 221, | ||
331 | "height": 135 | ||
332 | |||
333 | } | ||
334 | ] | ||
335 | } | ||
336 | }, | ||
337 | { | ||
338 | "name": "block7", | ||
339 | "height": 120, | ||
340 | "hasChildFrame": true, | ||
341 | "data": { | ||
342 | "name": "frame7", | ||
343 | "resultSet": [ | ||
344 | { | ||
345 | "name": "back2Top", | ||
346 | "code": "promotionItem_f3975526-213a-4292-95ea-ab39897e1560", | ||
347 | "left": 337, | ||
348 | "top": 0, | ||
349 | "width": 322, | ||
350 | "height": 86, | ||
351 | "containerId": "back2Top" | ||
352 | } | ||
353 | ] | ||
354 | } | ||
355 | } | ||
356 | ] | ||
357 | } | ||
358 | } | ||
359 | }); |
assets/Script/waterfall_recommend.js.meta
0 → 100644
assets/Script/waterfall_three2six.js
0 → 100644
1 | |||
2 | cc.Class({ | ||
3 | extends: cc.Component, | ||
4 | |||
5 | statics: { | ||
6 | waterfall: { | ||
7 | "name": "Recommend", | ||
8 | "resultSet": [ | ||
9 | |||
10 | { | ||
11 | "name": "block2", | ||
12 | "height": 224, | ||
13 | "hasChildFrame": true, | ||
14 | "data": { | ||
15 | "name": "frame2", | ||
16 | "resultSet": [ | ||
17 | { | ||
18 | "name": "Title", | ||
19 | "code": "promotionItem_8a4a1762-22e8-4a1e-8ce3-1fe81412855a", | ||
20 | "left": 0, | ||
21 | "top": 0, | ||
22 | "width": 220, | ||
23 | "height": 33, | ||
24 | "disable": true | ||
25 | }, | ||
26 | { | ||
27 | "name": "SubjectList", | ||
28 | "layout": "horizontal", | ||
29 | "position": [0, 59], | ||
30 | "width": 1100, | ||
31 | "disable": true, | ||
32 | "childrenSize": [105, 123], | ||
33 | "childrenMargin": [0, 24, 0, 0], | ||
34 | "hasChildFrame": true, | ||
35 | "data": { | ||
36 | "name": "subjectList", | ||
37 | "resultSet": [ | ||
38 | { | ||
39 | "name": "Subject1", | ||
40 | "code": "promotionItem_e432ac2d-c1f3-4d44-a42b-7000971affa1" | ||
41 | }, | ||
42 | { | ||
43 | "name": "Subject2", | ||
44 | "code": "promotionItem_f90b7ff3-1f36-4019-9e77-cef871902343" | ||
45 | }, | ||
46 | { | ||
47 | "name": "Subject3", | ||
48 | "code": "promotionItem_e29b33e4-8954-4ef9-a6fc-0d844c909c67" | ||
49 | }, | ||
50 | { | ||
51 | "name": "Subject4", | ||
52 | "code": "promotionItem_57aea4b3-7716-4224-bc77-43272c35ee32" | ||
53 | }, | ||
54 | { | ||
55 | "name": "Subject4", | ||
56 | "code": "promotionItem_55c68c1c-451a-4197-84a1-6a39a1668a90" | ||
57 | }, | ||
58 | { | ||
59 | "name": "Subject4", | ||
60 | "code": "promotionItem_2ac9afea-aa83-4fc1-a651-4f465b3cb1c3" | ||
61 | }, | ||
62 | { | ||
63 | "name": "Subject4", | ||
64 | "code": "promotionItem_8ab81a46-b81e-4acf-bbcd-13315747eab3" | ||
65 | }, | ||
66 | { | ||
67 | "name": "Subject4", | ||
68 | "code": "promotionItem_3e6642ab-517c-49ea-8788-cdc9130716d7" | ||
69 | } | ||
70 | ] | ||
71 | }, | ||
72 | "dataTmpl": "tmplPromotionGroupCell2", | ||
73 | "childClass": "subject_list_cell" | ||
74 | |||
75 | } | ||
76 | ] | ||
77 | } | ||
78 | }, | ||
79 | { | ||
80 | "name": "block1", | ||
81 | "height": 526, | ||
82 | "hasChildFrame": true, | ||
83 | "data": { | ||
84 | "name": "frame1", | ||
85 | "resultSet": [ | ||
86 | { | ||
87 | "name": "Carousel0", | ||
88 | "code": "promotionItem_fd456495-2e32-44e1-9d92-450227d4afa3", | ||
89 | "left": 0, | ||
90 | "top": 0, | ||
91 | "width": 235, | ||
92 | "height": 287 | ||
93 | }, | ||
94 | { | ||
95 | "name": "dailyRecommend", | ||
96 | "code": "promotionItem_4ca66642-33d0-41c9-9913-df131a79a375", | ||
97 | "left": 252, | ||
98 | "top": 0, | ||
99 | "width": 504, | ||
100 | "height": 287 | ||
101 | }, | ||
102 | { | ||
103 | "name": "dailyRecommend", | ||
104 | "code": "promotionItem_c5f58c16-48a5-4796-ab52-41679fc88a6d", | ||
105 | "left": 773, | ||
106 | "top": 0, | ||
107 | "width": 235, | ||
108 | "height": 287 | ||
109 | }, | ||
110 | { | ||
111 | "name": "dailyRecommend", | ||
112 | "code": "promotionItem_9fd6d854-2a72-42d5-a2c0-1ce824cf406c", | ||
113 | "left": 0, | ||
114 | "top": 308, | ||
115 | "width": 427, | ||
116 | "height": 169 | ||
117 | }, | ||
118 | { | ||
119 | "name": "dailyRecommend", | ||
120 | "code": "promotionItem_5b998526-fb2a-48f9-8977-1fc20ac91ae6", | ||
121 | "left": 445, | ||
122 | "top": 308, | ||
123 | "width": 274, | ||
124 | "height": 168 | ||
125 | }, | ||
126 | { | ||
127 | "name": "dailyRecommend", | ||
128 | "code": "promotionItem_2ff129e8-12aa-4384-a0b8-736b8ff029f1", | ||
129 | "left": 736, | ||
130 | "top": 308, | ||
131 | "width": 274, | ||
132 | "height": 168 | ||
133 | } | ||
134 | ] | ||
135 | } | ||
136 | }, | ||
137 | { | ||
138 | "name": "block3", | ||
139 | "height": 427, | ||
140 | "hasChildFrame": true, | ||
141 | "data": { | ||
142 | "name": "frame3", | ||
143 | "resultSet": [ | ||
144 | { | ||
145 | "name": "Title", | ||
146 | "code": "promotionItem_ca662698-17fe-436b-8bee-9b5e0a255bdb", | ||
147 | "left": 0, | ||
148 | "top": 0, | ||
149 | "width": 220, | ||
150 | "height": 36, | ||
151 | "disable": true | ||
152 | }, | ||
153 | { | ||
154 | "name": "SingerList", | ||
155 | "code": "promotionItem_0a911d4c-9223-4d49-bf63-6e4ed2a49668", | ||
156 | "left": 0, | ||
157 | "top": 60, | ||
158 | "width": 493, | ||
159 | "height": 316 | ||
160 | |||
161 | }, | ||
162 | { | ||
163 | "name": "SingerList", | ||
164 | "code": "promotionItem_c388af5a-0351-43c4-89f5-8c8bfbf5a443", | ||
165 | "left": 517, | ||
166 | "top": 60, | ||
167 | "width": 493, | ||
168 | "height": 316 | ||
169 | |||
170 | } | ||
171 | ] | ||
172 | } | ||
173 | }, | ||
174 | { | ||
175 | "name": "block4", | ||
176 | "height": 286, | ||
177 | "hasChildFrame": true, | ||
178 | "data": { | ||
179 | "name": "frame4", | ||
180 | "resultSet": [ | ||
181 | { | ||
182 | "name": "Title", | ||
183 | "code": "promotionItem_f4c1169d-1778-48af-a449-3d195f8ca146", | ||
184 | "left": 0, | ||
185 | "top": 0, | ||
186 | "width": 220, | ||
187 | "height": 33, | ||
188 | "disable": true | ||
189 | }, | ||
190 | { | ||
191 | "name": "SubjectList", | ||
192 | "layout": "horizontal", | ||
193 | "position": [0, 57], | ||
194 | "width": 1100, | ||
195 | "disable": true, | ||
196 | "childrenSize": [159, 175], | ||
197 | "childrenMargin": [0, 11, 0, 0], | ||
198 | "hasChildFrame": true, | ||
199 | "data": { | ||
200 | "name": "subjectList", | ||
201 | "resultSet": [ | ||
202 | { | ||
203 | "name": "Subject1", | ||
204 | "code": "promotionItem_df4a26f1-bfd9-4781-9495-ba74f53bf285" | ||
205 | }, | ||
206 | { | ||
207 | "name": "Subject2", | ||
208 | "code": "promotionItem_4727bb73-6d27-455d-b573-d2bb18074b07" | ||
209 | }, | ||
210 | { | ||
211 | "name": "Subject3", | ||
212 | "code": "promotionItem_d2be83c4-78da-466b-b16d-e433bbaa4cac" | ||
213 | }, | ||
214 | { | ||
215 | "name": "Subject4", | ||
216 | "code": "promotionItem_d8bfc7e3-0df3-488a-8655-795ad48e9b74" | ||
217 | }, | ||
218 | { | ||
219 | "name": "Subject4", | ||
220 | "code": "promotionItem_9c4e1710-e9cb-4698-83eb-91cd2e85ba2e" | ||
221 | }, | ||
222 | { | ||
223 | "name": "Subject4", | ||
224 | "code": "promotionItem_edfd1449-ea73-4a19-b605-e09af698e615" | ||
225 | } | ||
226 | ] | ||
227 | }, | ||
228 | "dataTmpl": "tmplPromotionGroupCell2", | ||
229 | "childClass": "subject_list_cell" | ||
230 | |||
231 | } | ||
232 | ] | ||
233 | } | ||
234 | }, | ||
235 | { | ||
236 | "name": "block5", | ||
237 | "height": 274, | ||
238 | "hasChildFrame": true, | ||
239 | "data": { | ||
240 | "name": "frame5", | ||
241 | "resultSet": [ | ||
242 | { | ||
243 | "name": "Title", | ||
244 | "code": "promotionItem_e6bf3f27-97a7-4990-85bb-b07f75d90ef6", | ||
245 | "left": 0, | ||
246 | "top": 0, | ||
247 | "width": 220, | ||
248 | "height": 33, | ||
249 | "disable": true | ||
250 | }, | ||
251 | { | ||
252 | "name": "Title", | ||
253 | "code": "promotionItem_c39cdbc6-aa7b-4bf0-a700-0d396bc7bd47", | ||
254 | "left": 0, | ||
255 | "top": 58, | ||
256 | "width": 369, | ||
257 | "height": 155 | ||
258 | |||
259 | }, | ||
260 | { | ||
261 | "name": "Title", | ||
262 | "code": "promotionItem_0b3263db-d600-4ad3-b2ba-4787315ca51c", | ||
263 | "left": 379, | ||
264 | "top": 58, | ||
265 | "width": 254, | ||
266 | "height": 155 | ||
267 | |||
268 | }, | ||
269 | { | ||
270 | "name": "Title", | ||
271 | "code": "promotionItem_cf020301-6346-4b61-9bd8-325a976ce4b4", | ||
272 | "left": 641, | ||
273 | "top": 58, | ||
274 | "width": 369, | ||
275 | "height": 155 | ||
276 | |||
277 | } | ||
278 | ] | ||
279 | } | ||
280 | }, | ||
281 | { | ||
282 | "name": "block6", | ||
283 | "height": 382, | ||
284 | "hasChildFrame": true, | ||
285 | "data": { | ||
286 | "name": "frame6", | ||
287 | "resultSet": [ | ||
288 | { | ||
289 | "name": "Title", | ||
290 | "code": "promotionItem_f26f6b36-de3f-4f2d-8f9a-4509764b7289", | ||
291 | "left": 0, | ||
292 | "top": 0, | ||
293 | "width": 220, | ||
294 | "height": 34, | ||
295 | "disable": true | ||
296 | }, | ||
297 | { | ||
298 | "name": "Title", | ||
299 | "code": "promotionItem_502e5100-223b-4088-85e6-bcbf637e2ea3", | ||
300 | "left": 0, | ||
301 | "top": 58, | ||
302 | "width": 221, | ||
303 | "height": 135 | ||
304 | |||
305 | }, | ||
306 | { | ||
307 | "name": "Title", | ||
308 | "code": "promotionItem_05dd1dca-53e6-4fc6-b621-6c32b5ffe2f7", | ||
309 | "left": 237, | ||
310 | "top": 11, | ||
311 | "width": 521, | ||
312 | "height": 333 | ||
313 | |||
314 | }, | ||
315 | { | ||
316 | "name": "Title", | ||
317 | "code": "promotionItem_f2445926-7065-48e2-aefd-a766512be5a6", | ||
318 | "left": 774, | ||
319 | "top": 58, | ||
320 | "width": 236, | ||
321 | "height": 286 | ||
322 | |||
323 | }, | ||
324 | { | ||
325 | "name": "Title", | ||
326 | "code": "promotionItem_ffbf27dd-0c0a-4332-a39e-3234f83de867", | ||
327 | "left": 0, | ||
328 | "top": 209, | ||
329 | "width": 221, | ||
330 | "height": 135 | ||
331 | |||
332 | } | ||
333 | ] | ||
334 | } | ||
335 | }, | ||
336 | { | ||
337 | "name": "block7", | ||
338 | "height": 120, | ||
339 | "hasChildFrame": true, | ||
340 | "data": { | ||
341 | "name": "frame7", | ||
342 | "resultSet": [ | ||
343 | { | ||
344 | "name": "back2Top", | ||
345 | "code": "promotionItem_f3975526-213a-4292-95ea-ab39897e1560", | ||
346 | "left": 337, | ||
347 | "top": 0, | ||
348 | "width": 322, | ||
349 | "height": 86, | ||
350 | "containerId": "back2Top" | ||
351 | } | ||
352 | ] | ||
353 | } | ||
354 | } | ||
355 | ] | ||
356 | } | ||
357 | } | ||
358 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Script/waterfall_three2six.js.meta
0 → 100644
assets/Texture.meta
0 → 100644
assets/Texture/HelloWorld.png
0 → 100644

37 KB
assets/Texture/HelloWorld.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "HelloWorld": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "31bc895a-c003-4566-a9f3-2e54ae1c17dc", | ||
13 | "rawTextureUuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 195, | ||
22 | "height": 270, | ||
23 | "rawWidth": 195, | ||
24 | "rawHeight": 270, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/bg.jpg
0 → 100644

552 KB
assets/Texture/bg.jpg.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "7b058b45-1d99-4a6f-af75-477dcbaa56dd", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "bg": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "eab92123-65ec-44fd-b9af-7b80346d5e64", | ||
13 | "rawTextureUuid": "7b058b45-1d99-4a6f-af75-477dcbaa56dd", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 1280, | ||
22 | "height": 2885, | ||
23 | "rawWidth": 1280, | ||
24 | "rawHeight": 2885, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/history.png
0 → 100644

3.28 KB
assets/Texture/history.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "90871d77-34d5-4fa5-8b14-0fc3d0acdf3d", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "history": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "8c0c790b-4b85-43a1-8b6c-a8686b700df6", | ||
13 | "rawTextureUuid": "90871d77-34d5-4fa5-8b14-0fc3d0acdf3d", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 108, | ||
22 | "height": 48, | ||
23 | "rawWidth": 108, | ||
24 | "rawHeight": 48, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/logo.png
0 → 100644

190 KB
assets/Texture/logo.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "bd1dfb5f-c75a-4fac-b539-585b0b231a4b", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "logo": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "1af31773-8501-40fe-96e5-ec700c03162c", | ||
13 | "rawTextureUuid": "bd1dfb5f-c75a-4fac-b539-585b0b231a4b", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": -17, | ||
19 | "trimX": 2, | ||
20 | "trimY": 38, | ||
21 | "width": 649, | ||
22 | "height": 466, | ||
23 | "rawWidth": 653, | ||
24 | "rawHeight": 508, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/my.png
0 → 100644

7.69 KB
assets/Texture/my.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "723c70d3-74ee-4a9e-9eb0-12e04f587bc7", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "my": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "e74a5b86-b958-43cf-a583-6ebdeb00e071", | ||
13 | "rawTextureUuid": "723c70d3-74ee-4a9e-9eb0-12e04f587bc7", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 127, | ||
22 | "height": 48, | ||
23 | "rawWidth": 127, | ||
24 | "rawHeight": 48, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/pfbCommonCell.prefab
0 → 100644
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": "pfbShowCategory", | ||
17 | "_objFlags": 0, | ||
18 | "_parent": null, | ||
19 | "_children": [ | ||
20 | { | ||
21 | "__id__": 2 | ||
22 | } | ||
23 | ], | ||
24 | "_active": true, | ||
25 | "_level": 1, | ||
26 | "_components": [ | ||
27 | { | ||
28 | "__id__": 5 | ||
29 | }, | ||
30 | { | ||
31 | "__id__": 6 | ||
32 | } | ||
33 | ], | ||
34 | "_prefab": { | ||
35 | "__id__": 7 | ||
36 | }, | ||
37 | "_opacity": 255, | ||
38 | "_color": { | ||
39 | "__type__": "cc.Color", | ||
40 | "r": 255, | ||
41 | "g": 255, | ||
42 | "b": 255, | ||
43 | "a": 255 | ||
44 | }, | ||
45 | "_contentSize": { | ||
46 | "__type__": "cc.Size", | ||
47 | "width": 40, | ||
48 | "height": 36 | ||
49 | }, | ||
50 | "_anchorPoint": { | ||
51 | "__type__": "cc.Vec2", | ||
52 | "x": 0.5, | ||
53 | "y": 0.5 | ||
54 | }, | ||
55 | "_position": { | ||
56 | "__type__": "cc.Vec3", | ||
57 | "x": 0, | ||
58 | "y": 0, | ||
59 | "z": 0 | ||
60 | }, | ||
61 | "_scale": { | ||
62 | "__type__": "cc.Vec3", | ||
63 | "x": 1, | ||
64 | "y": 1, | ||
65 | "z": 1 | ||
66 | }, | ||
67 | "_eulerAngles": { | ||
68 | "__type__": "cc.Vec3", | ||
69 | "x": 0, | ||
70 | "y": 0, | ||
71 | "z": 0 | ||
72 | }, | ||
73 | "_skewX": 0, | ||
74 | "_skewY": 0, | ||
75 | "_is3DNode": false, | ||
76 | "groupIndex": 0, | ||
77 | "_rotationX": 0, | ||
78 | "_rotationY": 0, | ||
79 | "_id": "" | ||
80 | }, | ||
81 | { | ||
82 | "__type__": "cc.Node", | ||
83 | "_name": "Pic", | ||
84 | "_objFlags": 0, | ||
85 | "_parent": { | ||
86 | "__id__": 1 | ||
87 | }, | ||
88 | "_children": [], | ||
89 | "_active": true, | ||
90 | "_level": 2, | ||
91 | "_components": [ | ||
92 | { | ||
93 | "__id__": 3 | ||
94 | } | ||
95 | ], | ||
96 | "_prefab": { | ||
97 | "__id__": 4 | ||
98 | }, | ||
99 | "_opacity": 255, | ||
100 | "_color": { | ||
101 | "__type__": "cc.Color", | ||
102 | "r": 255, | ||
103 | "g": 255, | ||
104 | "b": 255, | ||
105 | "a": 255 | ||
106 | }, | ||
107 | "_contentSize": { | ||
108 | "__type__": "cc.Size", | ||
109 | "width": 40, | ||
110 | "height": 36 | ||
111 | }, | ||
112 | "_anchorPoint": { | ||
113 | "__type__": "cc.Vec2", | ||
114 | "x": 0.5, | ||
115 | "y": 0.5 | ||
116 | }, | ||
117 | "_position": { | ||
118 | "__type__": "cc.Vec3", | ||
119 | "x": 0, | ||
120 | "y": 0, | ||
121 | "z": 0 | ||
122 | }, | ||
123 | "_scale": { | ||
124 | "__type__": "cc.Vec3", | ||
125 | "x": 1, | ||
126 | "y": 1, | ||
127 | "z": 1 | ||
128 | }, | ||
129 | "_eulerAngles": { | ||
130 | "__type__": "cc.Vec3", | ||
131 | "x": 0, | ||
132 | "y": 0, | ||
133 | "z": 0 | ||
134 | }, | ||
135 | "_skewX": 0, | ||
136 | "_skewY": 0, | ||
137 | "_is3DNode": false, | ||
138 | "groupIndex": 0, | ||
139 | "_rotationX": 0, | ||
140 | "_rotationY": 0, | ||
141 | "_id": "" | ||
142 | }, | ||
143 | { | ||
144 | "__type__": "cc.Sprite", | ||
145 | "_name": "", | ||
146 | "_objFlags": 0, | ||
147 | "node": { | ||
148 | "__id__": 2 | ||
149 | }, | ||
150 | "_enabled": true, | ||
151 | "_materials": [ | ||
152 | { | ||
153 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
154 | } | ||
155 | ], | ||
156 | "_srcBlendFactor": 770, | ||
157 | "_dstBlendFactor": 771, | ||
158 | "_spriteFrame": null, | ||
159 | "_type": 0, | ||
160 | "_sizeMode": 1, | ||
161 | "_fillType": 0, | ||
162 | "_fillCenter": { | ||
163 | "__type__": "cc.Vec2", | ||
164 | "x": 0, | ||
165 | "y": 0 | ||
166 | }, | ||
167 | "_fillStart": 0, | ||
168 | "_fillRange": 0, | ||
169 | "_isTrimmedMode": true, | ||
170 | "_atlas": null, | ||
171 | "_id": "" | ||
172 | }, | ||
173 | { | ||
174 | "__type__": "cc.PrefabInfo", | ||
175 | "root": { | ||
176 | "__id__": 1 | ||
177 | }, | ||
178 | "asset": { | ||
179 | "__uuid__": "0a9ac85b-6d8a-498b-92ce-d1b35b092920" | ||
180 | }, | ||
181 | "fileId": "cahAospA9KiZ8bJwfuwSSJ", | ||
182 | "sync": false | ||
183 | }, | ||
184 | { | ||
185 | "__type__": "cc.Widget", | ||
186 | "_name": "", | ||
187 | "_objFlags": 0, | ||
188 | "node": { | ||
189 | "__id__": 1 | ||
190 | }, | ||
191 | "_enabled": true, | ||
192 | "alignMode": 1, | ||
193 | "_target": null, | ||
194 | "_alignFlags": 9, | ||
195 | "_left": -20, | ||
196 | "_right": 0, | ||
197 | "_top": 702, | ||
198 | "_bottom": 0, | ||
199 | "_verticalCenter": 0, | ||
200 | "_horizontalCenter": 0, | ||
201 | "_isAbsLeft": true, | ||
202 | "_isAbsRight": true, | ||
203 | "_isAbsTop": true, | ||
204 | "_isAbsBottom": true, | ||
205 | "_isAbsHorizontalCenter": true, | ||
206 | "_isAbsVerticalCenter": true, | ||
207 | "_originalWidth": 0, | ||
208 | "_originalHeight": 0, | ||
209 | "_id": "" | ||
210 | }, | ||
211 | { | ||
212 | "__type__": "43a14tHFN5CvrH8W3z8wxz4", | ||
213 | "_name": "", | ||
214 | "_objFlags": 0, | ||
215 | "node": { | ||
216 | "__id__": 1 | ||
217 | }, | ||
218 | "_enabled": true, | ||
219 | "id": 0, | ||
220 | "pic": { | ||
221 | "__id__": 3 | ||
222 | }, | ||
223 | "activeName1": null, | ||
224 | "activeName2": null, | ||
225 | "normalName": null, | ||
226 | "_id": "" | ||
227 | }, | ||
228 | { | ||
229 | "__type__": "cc.PrefabInfo", | ||
230 | "root": { | ||
231 | "__id__": 1 | ||
232 | }, | ||
233 | "asset": { | ||
234 | "__uuid__": "0a9ac85b-6d8a-498b-92ce-d1b35b092920" | ||
235 | }, | ||
236 | "fileId": "f3FKYd7SJEvrs4s48MPI1G", | ||
237 | "sync": false | ||
238 | } | ||
239 | ] | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/pfbCommonCell.prefab.meta
0 → 100644
assets/Texture/pfbCommonRightCell.prefab
0 → 100644
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": "pfbShowCategory", | ||
17 | "_objFlags": 0, | ||
18 | "_parent": null, | ||
19 | "_children": [ | ||
20 | { | ||
21 | "__id__": 2 | ||
22 | } | ||
23 | ], | ||
24 | "_active": true, | ||
25 | "_level": 1, | ||
26 | "_components": [ | ||
27 | { | ||
28 | "__id__": 5 | ||
29 | }, | ||
30 | { | ||
31 | "__id__": 6 | ||
32 | } | ||
33 | ], | ||
34 | "_prefab": { | ||
35 | "__id__": 7 | ||
36 | }, | ||
37 | "_opacity": 255, | ||
38 | "_color": { | ||
39 | "__type__": "cc.Color", | ||
40 | "r": 255, | ||
41 | "g": 255, | ||
42 | "b": 255, | ||
43 | "a": 255 | ||
44 | }, | ||
45 | "_contentSize": { | ||
46 | "__type__": "cc.Size", | ||
47 | "width": 40, | ||
48 | "height": 36 | ||
49 | }, | ||
50 | "_anchorPoint": { | ||
51 | "__type__": "cc.Vec2", | ||
52 | "x": 0.5, | ||
53 | "y": 0.5 | ||
54 | }, | ||
55 | "_position": { | ||
56 | "__type__": "cc.Vec3", | ||
57 | "x": 0, | ||
58 | "y": 0, | ||
59 | "z": 0 | ||
60 | }, | ||
61 | "_scale": { | ||
62 | "__type__": "cc.Vec3", | ||
63 | "x": 1, | ||
64 | "y": 1, | ||
65 | "z": 1 | ||
66 | }, | ||
67 | "_eulerAngles": { | ||
68 | "__type__": "cc.Vec3", | ||
69 | "x": 0, | ||
70 | "y": 0, | ||
71 | "z": 0 | ||
72 | }, | ||
73 | "_skewX": 0, | ||
74 | "_skewY": 0, | ||
75 | "_is3DNode": false, | ||
76 | "groupIndex": 0, | ||
77 | "_rotationX": 0, | ||
78 | "_rotationY": 0, | ||
79 | "_id": "" | ||
80 | }, | ||
81 | { | ||
82 | "__type__": "cc.Node", | ||
83 | "_name": "Pic", | ||
84 | "_objFlags": 0, | ||
85 | "_parent": { | ||
86 | "__id__": 1 | ||
87 | }, | ||
88 | "_children": [], | ||
89 | "_active": true, | ||
90 | "_level": 2, | ||
91 | "_components": [ | ||
92 | { | ||
93 | "__id__": 3 | ||
94 | } | ||
95 | ], | ||
96 | "_prefab": { | ||
97 | "__id__": 4 | ||
98 | }, | ||
99 | "_opacity": 255, | ||
100 | "_color": { | ||
101 | "__type__": "cc.Color", | ||
102 | "r": 255, | ||
103 | "g": 255, | ||
104 | "b": 255, | ||
105 | "a": 255 | ||
106 | }, | ||
107 | "_contentSize": { | ||
108 | "__type__": "cc.Size", | ||
109 | "width": 40, | ||
110 | "height": 40 | ||
111 | }, | ||
112 | "_anchorPoint": { | ||
113 | "__type__": "cc.Vec2", | ||
114 | "x": 0.5, | ||
115 | "y": 0.5 | ||
116 | }, | ||
117 | "_position": { | ||
118 | "__type__": "cc.Vec3", | ||
119 | "x": 0, | ||
120 | "y": 0, | ||
121 | "z": 0 | ||
122 | }, | ||
123 | "_scale": { | ||
124 | "__type__": "cc.Vec3", | ||
125 | "x": 1, | ||
126 | "y": 1, | ||
127 | "z": 1 | ||
128 | }, | ||
129 | "_eulerAngles": { | ||
130 | "__type__": "cc.Vec3", | ||
131 | "x": 0, | ||
132 | "y": 0, | ||
133 | "z": 0 | ||
134 | }, | ||
135 | "_skewX": 0, | ||
136 | "_skewY": 0, | ||
137 | "_is3DNode": false, | ||
138 | "groupIndex": 0, | ||
139 | "_rotationX": 0, | ||
140 | "_rotationY": 0, | ||
141 | "_id": "" | ||
142 | }, | ||
143 | { | ||
144 | "__type__": "cc.Sprite", | ||
145 | "_name": "", | ||
146 | "_objFlags": 0, | ||
147 | "node": { | ||
148 | "__id__": 2 | ||
149 | }, | ||
150 | "_enabled": true, | ||
151 | "_materials": [ | ||
152 | { | ||
153 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
154 | } | ||
155 | ], | ||
156 | "_srcBlendFactor": 770, | ||
157 | "_dstBlendFactor": 771, | ||
158 | "_spriteFrame": { | ||
159 | "__uuid__": "410fb916-8721-4663-bab8-34397391ace7" | ||
160 | }, | ||
161 | "_type": 0, | ||
162 | "_sizeMode": 0, | ||
163 | "_fillType": 0, | ||
164 | "_fillCenter": { | ||
165 | "__type__": "cc.Vec2", | ||
166 | "x": 0, | ||
167 | "y": 0 | ||
168 | }, | ||
169 | "_fillStart": 0, | ||
170 | "_fillRange": 0, | ||
171 | "_isTrimmedMode": true, | ||
172 | "_atlas": null, | ||
173 | "_id": "" | ||
174 | }, | ||
175 | { | ||
176 | "__type__": "cc.PrefabInfo", | ||
177 | "root": { | ||
178 | "__id__": 1 | ||
179 | }, | ||
180 | "asset": { | ||
181 | "__uuid__": "9058dd42-455f-43f3-93b4-ed587f2159bd" | ||
182 | }, | ||
183 | "fileId": "cahAospA9KiZ8bJwfuwSSJ", | ||
184 | "sync": false | ||
185 | }, | ||
186 | { | ||
187 | "__type__": "cc.Widget", | ||
188 | "_name": "", | ||
189 | "_objFlags": 0, | ||
190 | "node": { | ||
191 | "__id__": 1 | ||
192 | }, | ||
193 | "_enabled": true, | ||
194 | "alignMode": 1, | ||
195 | "_target": null, | ||
196 | "_alignFlags": 9, | ||
197 | "_left": -20, | ||
198 | "_right": 0, | ||
199 | "_top": 702, | ||
200 | "_bottom": 0, | ||
201 | "_verticalCenter": 0, | ||
202 | "_horizontalCenter": 0, | ||
203 | "_isAbsLeft": true, | ||
204 | "_isAbsRight": true, | ||
205 | "_isAbsTop": true, | ||
206 | "_isAbsBottom": true, | ||
207 | "_isAbsHorizontalCenter": true, | ||
208 | "_isAbsVerticalCenter": true, | ||
209 | "_originalWidth": 0, | ||
210 | "_originalHeight": 0, | ||
211 | "_id": "" | ||
212 | }, | ||
213 | { | ||
214 | "__type__": "4e3e0tDC2RKSLb7nNPXNN5z", | ||
215 | "_name": "", | ||
216 | "_objFlags": 0, | ||
217 | "node": { | ||
218 | "__id__": 1 | ||
219 | }, | ||
220 | "_enabled": true, | ||
221 | "id": 0, | ||
222 | "pic": { | ||
223 | "__id__": 3 | ||
224 | }, | ||
225 | "activeName1": null, | ||
226 | "activeName2": null, | ||
227 | "normalName": null, | ||
228 | "_id": "" | ||
229 | }, | ||
230 | { | ||
231 | "__type__": "cc.PrefabInfo", | ||
232 | "root": { | ||
233 | "__id__": 1 | ||
234 | }, | ||
235 | "asset": { | ||
236 | "__uuid__": "9058dd42-455f-43f3-93b4-ed587f2159bd" | ||
237 | }, | ||
238 | "fileId": "f3FKYd7SJEvrs4s48MPI1G", | ||
239 | "sync": false | ||
240 | } | ||
241 | ] | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/search.png
0 → 100644

3.63 KB
assets/Texture/search.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "f35038d7-351f-431f-87db-d06c657b0216", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "search": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "2724fd4d-8592-497d-9ab1-4e33968c0e89", | ||
13 | "rawTextureUuid": "f35038d7-351f-431f-87db-d06c657b0216", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 108, | ||
22 | "height": 48, | ||
23 | "rawWidth": 108, | ||
24 | "rawHeight": 48, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/singleColor.png
0 → 100644

16.8 KB
assets/Texture/singleColor.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "singleColor": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "410fb916-8721-4663-bab8-34397391ace7", | ||
13 | "rawTextureUuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 2, | ||
22 | "height": 2, | ||
23 | "rawWidth": 2, | ||
24 | "rawHeight": 2, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/test.meta
0 → 100644
assets/Texture/test/HelloWorld.png
0 → 100644

37 KB
assets/Texture/test/HelloWorld.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "af74e7fc-dc2d-4e3b-9e98-c77ca9ee7ebe", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "HelloWorld": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "837c982b-9cd1-4e5a-a97b-7ea38b39a2ed", | ||
13 | "rawTextureUuid": "af74e7fc-dc2d-4e3b-9e98-c77ca9ee7ebe", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 195, | ||
22 | "height": 270, | ||
23 | "rawWidth": 195, | ||
24 | "rawHeight": 270, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/test/history.png
0 → 100644

3.28 KB
assets/Texture/test/history.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "9ab1d077-e501-4d49-af8d-66fa45d8d195", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "history": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "b9b775dd-436b-455f-bf36-de112de109e8", | ||
13 | "rawTextureUuid": "9ab1d077-e501-4d49-af8d-66fa45d8d195", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 108, | ||
22 | "height": 48, | ||
23 | "rawWidth": 108, | ||
24 | "rawHeight": 48, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/test/my.png
0 → 100644

7.69 KB
assets/Texture/test/my.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "ed1ff055-a16b-4f2a-9caf-e715e5273b95", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "my": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "244ccc93-62bc-4f79-81ba-2fd341419b2e", | ||
13 | "rawTextureUuid": "ed1ff055-a16b-4f2a-9caf-e715e5273b95", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 127, | ||
22 | "height": 48, | ||
23 | "rawWidth": 127, | ||
24 | "rawHeight": 48, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/Texture/test/search.png
0 → 100644

3.63 KB
assets/Texture/test/search.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "64db64a5-a07f-4743-abae-863219e4ed59", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "search": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "622d4902-61b7-4461-a5fe-bdeaa3f44ce2", | ||
13 | "rawTextureUuid": "64db64a5-a07f-4743-abae-863219e4ed59", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 108, | ||
22 | "height": 48, | ||
23 | "rawWidth": 108, | ||
24 | "rawHeight": 48, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/resources.meta
0 → 100644
assets/resources/focus.meta
0 → 100644
assets/resources/focus/1.png
0 → 100644

3.19 KB
assets/resources/focus/1.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "07c42853-44f6-44fd-b4a7-96c657273d5b", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "1": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "2f12d7cb-336d-4d50-8523-d7336a40a1b6", | ||
13 | "rawTextureUuid": "07c42853-44f6-44fd-b4a7-96c657273d5b", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 51, | ||
22 | "height": 51, | ||
23 | "rawWidth": 51, | ||
24 | "rawHeight": 51, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/resources/focus/2.png
0 → 100644

178 Bytes
assets/resources/focus/2.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "a17484ab-98b9-45a7-96c5-e2f115f20b9c", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "2": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "d0f889f0-abdf-4e0b-b995-80b7e4d958db", | ||
13 | "rawTextureUuid": "a17484ab-98b9-45a7-96c5-e2f115f20b9c", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 12, | ||
19 | "trimX": 0, | ||
20 | "trimY": 3, | ||
21 | "width": 1, | ||
22 | "height": 16, | ||
23 | "rawWidth": 1, | ||
24 | "rawHeight": 46, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/resources/focus/3.png
0 → 100644

3.38 KB
assets/resources/focus/3.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "9009b50c-a6e9-4eea-b016-3b716af19308", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "3": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "57330949-d587-439b-b54a-d4a951b04b3f", | ||
13 | "rawTextureUuid": "9009b50c-a6e9-4eea-b016-3b716af19308", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 51, | ||
22 | "height": 51, | ||
23 | "rawWidth": 51, | ||
24 | "rawHeight": 51, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/resources/focus/4.png
0 → 100644

180 Bytes
assets/resources/focus/4.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "56f3cca9-2ea8-4982-a749-08244c283d8e", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "4": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "d9cd3cd3-7f7c-4094-9580-346e8b03a3b4", | ||
13 | "rawTextureUuid": "56f3cca9-2ea8-4982-a749-08244c283d8e", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": -14, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 1, | ||
20 | "trimY": 0, | ||
21 | "width": 16, | ||
22 | "height": 1, | ||
23 | "rawWidth": 46, | ||
24 | "rawHeight": 1, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/resources/focus/6.png
0 → 100644

172 Bytes
assets/resources/focus/6.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "53e675f3-1400-4b57-b9fc-6a3f6a65da90", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "6": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "f976c075-cfeb-40be-8911-9eea7ed9b7bd", | ||
13 | "rawTextureUuid": "53e675f3-1400-4b57-b9fc-6a3f6a65da90", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 14, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 29, | ||
20 | "trimY": 0, | ||
21 | "width": 16, | ||
22 | "height": 1, | ||
23 | "rawWidth": 46, | ||
24 | "rawHeight": 1, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/resources/focus/7.png
0 → 100644

3.52 KB
assets/resources/focus/7.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "3c0252ba-5da0-4511-8d70-05afc35020c0", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "7": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "cac1da50-9322-4dd7-ad51-a4494493aceb", | ||
13 | "rawTextureUuid": "3c0252ba-5da0-4511-8d70-05afc35020c0", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 51, | ||
22 | "height": 51, | ||
23 | "rawWidth": 51, | ||
24 | "rawHeight": 51, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/resources/focus/8.png
0 → 100644

168 Bytes
assets/resources/focus/8.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "8d4922f8-8db2-46a0-a7ba-3ecc252a9318", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "8": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "86da34f4-416e-4542-be45-cebb63e5e69a", | ||
13 | "rawTextureUuid": "8d4922f8-8db2-46a0-a7ba-3ecc252a9318", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": -16, | ||
19 | "trimX": 0, | ||
20 | "trimY": 32, | ||
21 | "width": 1, | ||
22 | "height": 14, | ||
23 | "rawWidth": 1, | ||
24 | "rawHeight": 46, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/resources/focus/9.png
0 → 100644

3.35 KB
assets/resources/focus/9.png.meta
0 → 100644
1 | { | ||
2 | "ver": "2.3.1", | ||
3 | "uuid": "8d6083a5-99e9-475a-939a-e23506aec3bc", | ||
4 | "type": "sprite", | ||
5 | "wrapMode": "clamp", | ||
6 | "filterMode": "bilinear", | ||
7 | "premultiplyAlpha": false, | ||
8 | "platformSettings": {}, | ||
9 | "subMetas": { | ||
10 | "9": { | ||
11 | "ver": "1.0.4", | ||
12 | "uuid": "9ab601dc-2f51-48d1-9764-b95f34930523", | ||
13 | "rawTextureUuid": "8d6083a5-99e9-475a-939a-e23506aec3bc", | ||
14 | "trimType": "auto", | ||
15 | "trimThreshold": 1, | ||
16 | "rotated": false, | ||
17 | "offsetX": 0, | ||
18 | "offsetY": 0, | ||
19 | "trimX": 0, | ||
20 | "trimY": 0, | ||
21 | "width": 51, | ||
22 | "height": 51, | ||
23 | "rawWidth": 51, | ||
24 | "rawHeight": 51, | ||
25 | "borderTop": 0, | ||
26 | "borderBottom": 0, | ||
27 | "borderLeft": 0, | ||
28 | "borderRight": 0, | ||
29 | "subMetas": {} | ||
30 | } | ||
31 | } | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assets/resources/focus/focus.zip
0 → 100644
No preview for this file type
assets/resources/focus/focus.zip.meta
0 → 100644
creator.d.ts
0 → 100644
This diff could not be displayed because it is too large.
jsconfig.json
0 → 100644
project.json
0 → 100644
settings/builder.json
0 → 100644
1 | { | ||
2 | "excludeScenes": [], | ||
3 | "orientation": { | ||
4 | "landscapeLeft": true, | ||
5 | "landscapeRight": true, | ||
6 | "portrait": false, | ||
7 | "upsideDown": false | ||
8 | }, | ||
9 | "packageName": "org.cocos2d.helloworld", | ||
10 | "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49", | ||
11 | "title": "hello_world", | ||
12 | "webOrientation": "auto" | ||
13 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
settings/builder.panel.json
0 → 100644
settings/project.json
0 → 100644
1 | { | ||
2 | "collision-matrix": [ | ||
3 | [ | ||
4 | true | ||
5 | ] | ||
6 | ], | ||
7 | "excluded-modules": [], | ||
8 | "group-list": [ | ||
9 | "default" | ||
10 | ], | ||
11 | "start-scene": "current", | ||
12 | "design-resolution-width": 960, | ||
13 | "design-resolution-height": 640, | ||
14 | "fit-width": false, | ||
15 | "fit-height": true, | ||
16 | "use-project-simulator-setting": false, | ||
17 | "simulator-orientation": false, | ||
18 | "use-customize-simulator": false, | ||
19 | "simulator-resolution": { | ||
20 | "width": 960, | ||
21 | "height": 640 | ||
22 | }, | ||
23 | "last-module-event-record-time": 0, | ||
24 | "assets-sort-type": "name", | ||
25 | "facebook": { | ||
26 | "enable": false, | ||
27 | "appID": "", | ||
28 | "live": { | ||
29 | "enable": false | ||
30 | }, | ||
31 | "audience": { | ||
32 | "enable": false | ||
33 | } | ||
34 | } | ||
35 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
settings/services.json
0 → 100644
1 | { | ||
2 | "services": [ | ||
3 | { | ||
4 | "service_id": "235", | ||
5 | "service_name": "Cocos Analytics", | ||
6 | "service_icon": "https://account.cocos.com/client/3f8f31ccf66995e183044f167c092395.png", | ||
7 | "service_desc": "提供最核心最基本的数据、标准化界面功能简洁易用、数据准确性最好", | ||
8 | "service_title": "精准了解游戏的新增、活跃、留存、付费等数据", | ||
9 | "service_guide_url": "https://n-analytics.cocos.com/docs/", | ||
10 | "service_sample_url": "https://github.com/cocos-creator/tutorial-dark-slash/tree/analytics", | ||
11 | "service_dev_url": "http://analytics.cocos.com/realtime/jump_to/<app_id>", | ||
12 | "service_type": "3", | ||
13 | "service_type_zh": "公司和个人游戏", | ||
14 | "support_platform": [ | ||
15 | "Android", | ||
16 | "iOS", | ||
17 | "HTML5" | ||
18 | ], | ||
19 | "package_download_url": "http://download.cocos.com/CocosServices/plugins/service-analytics/1.2.0_2.1.0.zip", | ||
20 | "package_version_desc": "1、优化SDK,修复H5-SDK 与多个小游戏平台适配问题,删除和优化init事件无用接口<br>2、 如有相关问题咨询或者需求, 可以联系我们技术支持邮箱 <a href=' '>support-cocos@cocos.com</a>", | ||
21 | "service_component_name": "service-analytics", | ||
22 | "package_versions": [ | ||
23 | "1.0.0_1.0.5", | ||
24 | "1.1.2_2.0.0", | ||
25 | "1.1.3_2.0.1", | ||
26 | "1.1.4_2.0.1", | ||
27 | "1.1.5_2.0.1", | ||
28 | "1.1.6_2.0.1_2.0.2", | ||
29 | "1.1.7_2.0.3", | ||
30 | "1.1.8_2.0.4", | ||
31 | "1.1.9_2.1.0", | ||
32 | "1.2.0_2.1.0" | ||
33 | ], | ||
34 | "build_platform": [ | ||
35 | "web-mobile", | ||
36 | "web-desktop", | ||
37 | "wechatgame", | ||
38 | "android", | ||
39 | "ios", | ||
40 | "fb-instant-games", | ||
41 | "android-instant", | ||
42 | "baidugame", | ||
43 | "quickgame", | ||
44 | "qgame", | ||
45 | "qqplay", | ||
46 | "huawei" | ||
47 | ], | ||
48 | "require_verify": 0, | ||
49 | "service_price": "", | ||
50 | "packpage_version_desc": "", | ||
51 | "service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='http://auth.cocos.com/CocosServiceAgreement.html'>《Cocos用户服务协议》</a>和<a href='http://auth.cocos.com/PrivacyPolicy.html'>《Cocos隐私政策》</a>" | ||
52 | }, | ||
53 | { | ||
54 | "service_id": "241", | ||
55 | "service_name": "Matchvs", | ||
56 | "service_icon": "https://account.cocos.com/client/14406719a07eb3d714d36e5edc6e06fa.png", | ||
57 | "service_desc": "通过SDK接入快速实现联网功能、帧同步、国内外多节点、服务器独立部署、gameServer自定义游戏服务端逻辑。\n技术支持群QQ群:822523258", | ||
58 | "service_title": "专业成熟的移动游戏联网与服务端解决方案", | ||
59 | "service_guide_url": "http://doc.matchvs.com/QuickStart/QuickStart-CocosCreator", | ||
60 | "service_sample_url": "http://www.matchvs.com/serviceCourse", | ||
61 | "service_dev_url": "http://www.matchvs.com/cocosLogin", | ||
62 | "service_type": "3", | ||
63 | "service_type_zh": "公司和个人游戏", | ||
64 | "support_platform": [ | ||
65 | "Android", | ||
66 | "iOS", | ||
67 | "HTML5" | ||
68 | ], | ||
69 | "package_download_url": "http://download.cocos.com/CocosServices/plugins/service-matchvs/1.0.9_3.7.9.9.zip", | ||
70 | "package_version_desc": "更新日期:2019-07-18<br>更新内容:<br>1、修复多节点登录返回值错误<br>2、修复FaceBook平台受限安全策略的问题", | ||
71 | "service_component_name": "service-matchvs", | ||
72 | "package_versions": [ | ||
73 | "1.0.3_3.7.6.4", | ||
74 | "1.0.5_3.7.7.3", | ||
75 | "1.0.6_3.7.9.2", | ||
76 | "1.0.7_3.7.9.6", | ||
77 | "1.0.9_3.7.9.9" | ||
78 | ], | ||
79 | "build_platform": [ | ||
80 | "web-mobile", | ||
81 | "web-desktop", | ||
82 | "fb-instant-games", | ||
83 | "wechatgame", | ||
84 | "wechatgame-subcontext", | ||
85 | "qqplay", | ||
86 | "android", | ||
87 | "android-instant", | ||
88 | "ios", | ||
89 | "mac", | ||
90 | "quickgame", | ||
91 | "qgame", | ||
92 | "huawei" | ||
93 | ], | ||
94 | "require_verify": 0, | ||
95 | "service_price": "该服务按使用量计费,<a href='https://www.matchvs.com/price'><font color='#dddddd'>计费规则</font></a>,所产生的费用将由第三方从您的 <a href='https://account.cocos.com/#/finance/finance_list'><font color='#dddddd'>Cocos 账户余额</font></a> 中扣除。", | ||
96 | "packpage_version_desc": "", | ||
97 | "service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='http://auth.cocos.com/CocosServiceAgreement.html'>《Cocos用户服务协议》</a>和<a href='http://auth.cocos.com/PrivacyPolicy.html'>《Cocos隐私政策》</a>" | ||
98 | }, | ||
99 | { | ||
100 | "service_id": "242", | ||
101 | "service_name": "Agora Voice", | ||
102 | "service_icon": "https://account.cocos.com/uploads/client_icon/2019-07-16/273952d155b4cdb72d2b1bc61de91ade.png", | ||
103 | "service_desc": "稳定、低耗、76ms超低延时、全球200+数据中心覆盖;变声器、超高音质、听声辩位等丰富玩法极速接入;全平台支持:Android、iOS、Web。\n技术支持群QQ群:799099183\n", | ||
104 | "service_title": "游戏内置实时语音", | ||
105 | "service_guide_url": "https://docs.agora.io/cn/Interactive Gaming/game_c?platform=Cocos Creator", | ||
106 | "service_sample_url": "https://github.com/AgoraIO/Voice-Call-for-Mobile-Gaming/tree/master/Basic-Voice-Call-for-Gaming/Hello-CocosCreator-Voice-Agora", | ||
107 | "service_dev_url": "https://sso.agora.io/api/oauth/cocos/login", | ||
108 | "service_type": "3", | ||
109 | "service_type_zh": "公司和个人游戏", | ||
110 | "support_platform": [ | ||
111 | "Android", | ||
112 | "iOS", | ||
113 | "HTML5" | ||
114 | ], | ||
115 | "package_download_url": "http://download.cocos.com/CocosServices/plugins/service-agora/1.0.2_2.2.3.20_2.5.2.zip", | ||
116 | "package_version_desc": "解决Bug:onAudioVolumeIndication 回调收不到.", | ||
117 | "service_component_name": "service-agora", | ||
118 | "package_versions": [ | ||
119 | "1.0.1_2.2.3.20_2.5.2", | ||
120 | "1.0.2_2.2.3.20_2.5.2" | ||
121 | ], | ||
122 | "build_platform": [ | ||
123 | "web-mobile", | ||
124 | "web-desktop", | ||
125 | "android", | ||
126 | "ios" | ||
127 | ], | ||
128 | "require_verify": 1, | ||
129 | "service_price": "该服务按使用量计费,<a href='https://docs.agora.io/cn/Agora Platform/billing_faq?platform=All Platforms'><font color='#dddddd'>计费规则</font></a>,所产生的费用将由第三方从您的 <a href='https://account.cocos.com/#/finance/finance_list'><font color='#dddddd'>Cocos 账户余额</font></a> 中扣除。", | ||
130 | "packpage_version_desc": "", | ||
131 | "service_protocol": "游戏首次开启该服务时,Cocos会后台通知服务方为游戏开通服务并初始化参数,服务方根据需要可能会获取您的Cocos账户信息,包括账户基本资料、游戏基本资料、账户余额等,点击确认开通按钮即视为您同意该服务访问您的账户信息,详见<a href='http://auth.cocos.com/CocosServiceAgreement.html'>《Cocos用户服务协议》</a>和<a href='http://auth.cocos.com/PrivacyPolicy.html'>《Cocos隐私政策》</a>" | ||
132 | } | ||
133 | ], | ||
134 | "game": { | ||
135 | "name": "未知游戏", | ||
136 | "appid": "UNKNOW" | ||
137 | } | ||
138 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
template-banner.png
0 → 100644

22.6 KB
-
Please register or sign in to post a comment