complete sceneHistory
Showing
16 changed files
with
1195 additions
and
1265 deletions
| ... | @@ -2887,8 +2887,8 @@ | ... | @@ -2887,8 +2887,8 @@ |
| 2887 | }, | 2887 | }, |
| 2888 | "_contentSize": { | 2888 | "_contentSize": { |
| 2889 | "__type__": "cc.Size", | 2889 | "__type__": "cc.Size", |
| 2890 | "width": 784, | 2890 | "width": 1164, |
| 2891 | "height": 448 | 2891 | "height": 523 |
| 2892 | }, | 2892 | }, |
| 2893 | "_anchorPoint": { | 2893 | "_anchorPoint": { |
| 2894 | "__type__": "cc.Vec2", | 2894 | "__type__": "cc.Vec2", |
| ... | @@ -2897,8 +2897,8 @@ | ... | @@ -2897,8 +2897,8 @@ |
| 2897 | }, | 2897 | }, |
| 2898 | "_position": { | 2898 | "_position": { |
| 2899 | "__type__": "cc.Vec3", | 2899 | "__type__": "cc.Vec3", |
| 2900 | "x": 110, | 2900 | "x": 0, |
| 2901 | "y": 0, | 2901 | "y": -42.512, |
| 2902 | "z": 0 | 2902 | "z": 0 |
| 2903 | }, | 2903 | }, |
| 2904 | "_scale": { | 2904 | "_scale": { |
| ... | @@ -2929,10 +2929,16 @@ | ... | @@ -2929,10 +2929,16 @@ |
| 2929 | "__id__": 66 | 2929 | "__id__": 66 |
| 2930 | }, | 2930 | }, |
| 2931 | "_enabled": true, | 2931 | "_enabled": true, |
| 2932 | "_materials": [], | 2932 | "_materials": [ |
| 2933 | { | ||
| 2934 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
| 2935 | } | ||
| 2936 | ], | ||
| 2933 | "_srcBlendFactor": 770, | 2937 | "_srcBlendFactor": 770, |
| 2934 | "_dstBlendFactor": 771, | 2938 | "_dstBlendFactor": 771, |
| 2935 | "_spriteFrame": null, | 2939 | "_spriteFrame": { |
| 2940 | "__uuid__": "1c7a33d8-7cec-4bbc-8e8c-90b17a6de4f9" | ||
| 2941 | }, | ||
| 2936 | "_type": 0, | 2942 | "_type": 0, |
| 2937 | "_sizeMode": 1, | 2943 | "_sizeMode": 1, |
| 2938 | "_fillType": 0, | 2944 | "_fillType": 0, | ... | ... |
| ... | @@ -80,10 +80,13 @@ | ... | @@ -80,10 +80,13 @@ |
| 80 | "__id__": 13 | 80 | "__id__": 13 |
| 81 | }, | 81 | }, |
| 82 | { | 82 | { |
| 83 | "__id__": 15 | 83 | "__id__": 16 |
| 84 | }, | 84 | }, |
| 85 | { | 85 | { |
| 86 | "__id__": 17 | 86 | "__id__": 19 |
| 87 | }, | ||
| 88 | { | ||
| 89 | "__id__": 22 | ||
| 87 | }, | 90 | }, |
| 88 | { | 91 | { |
| 89 | "__id__": 25 | 92 | "__id__": 25 |
| ... | @@ -339,7 +342,7 @@ | ... | @@ -339,7 +342,7 @@ |
| 339 | "__id__": 2 | 342 | "__id__": 2 |
| 340 | }, | 343 | }, |
| 341 | "_children": [], | 344 | "_children": [], |
| 342 | "_active": true, | 345 | "_active": false, |
| 343 | "_level": 2, | 346 | "_level": 2, |
| 344 | "_components": [ | 347 | "_components": [ |
| 345 | { | 348 | { |
| ... | @@ -360,8 +363,8 @@ | ... | @@ -360,8 +363,8 @@ |
| 360 | }, | 363 | }, |
| 361 | "_contentSize": { | 364 | "_contentSize": { |
| 362 | "__type__": "cc.Size", | 365 | "__type__": "cc.Size", |
| 363 | "width": 142, | 366 | "width": 176, |
| 364 | "height": 54 | 367 | "height": 64 |
| 365 | }, | 368 | }, |
| 366 | "_anchorPoint": { | 369 | "_anchorPoint": { |
| 367 | "__type__": "cc.Vec2", | 370 | "__type__": "cc.Vec2", |
| ... | @@ -402,10 +405,16 @@ | ... | @@ -402,10 +405,16 @@ |
| 402 | "__id__": 7 | 405 | "__id__": 7 |
| 403 | }, | 406 | }, |
| 404 | "_enabled": true, | 407 | "_enabled": true, |
| 405 | "_materials": [], | 408 | "_materials": [ |
| 409 | { | ||
| 410 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
| 411 | } | ||
| 412 | ], | ||
| 406 | "_srcBlendFactor": 770, | 413 | "_srcBlendFactor": 770, |
| 407 | "_dstBlendFactor": 771, | 414 | "_dstBlendFactor": 771, |
| 408 | "_spriteFrame": null, | 415 | "_spriteFrame": { |
| 416 | "__uuid__": "cafbb817-8e14-4f94-8071-733ee3859e0a" | ||
| 417 | }, | ||
| 409 | "_type": 0, | 418 | "_type": 0, |
| 410 | "_sizeMode": 0, | 419 | "_sizeMode": 0, |
| 411 | "_fillType": 0, | 420 | "_fillType": 0, |
| ... | @@ -431,9 +440,9 @@ | ... | @@ -431,9 +440,9 @@ |
| 431 | "alignMode": 1, | 440 | "alignMode": 1, |
| 432 | "_target": null, | 441 | "_target": null, |
| 433 | "_alignFlags": 9, | 442 | "_alignFlags": 9, |
| 434 | "_left": 40, | 443 | "_left": 23, |
| 435 | "_right": 0, | 444 | "_right": 0, |
| 436 | "_top": 30, | 445 | "_top": 25, |
| 437 | "_bottom": 0, | 446 | "_bottom": 0, |
| 438 | "_verticalCenter": 0, | 447 | "_verticalCenter": 0, |
| 439 | "_horizontalCenter": 0, | 448 | "_horizontalCenter": 0, |
| ... | @@ -486,7 +495,7 @@ | ... | @@ -486,7 +495,7 @@ |
| 486 | }, | 495 | }, |
| 487 | "_position": { | 496 | "_position": { |
| 488 | "__type__": "cc.Vec3", | 497 | "__type__": "cc.Vec3", |
| 489 | "x": -452, | 498 | "x": -529, |
| 490 | "y": 303, | 499 | "y": 303, |
| 491 | "z": 0 | 500 | "z": 0 |
| 492 | }, | 501 | }, |
| ... | @@ -553,7 +562,7 @@ | ... | @@ -553,7 +562,7 @@ |
| 553 | "alignMode": 1, | 562 | "alignMode": 1, |
| 554 | "_target": null, | 563 | "_target": null, |
| 555 | "_alignFlags": 9, | 564 | "_alignFlags": 9, |
| 556 | "_left": 100, | 565 | "_left": 23, |
| 557 | "_right": 0, | 566 | "_right": 0, |
| 558 | "_top": 25, | 567 | "_top": 25, |
| 559 | "_bottom": 0, | 568 | "_bottom": 0, |
| ... | @@ -571,7 +580,7 @@ | ... | @@ -571,7 +580,7 @@ |
| 571 | }, | 580 | }, |
| 572 | { | 581 | { |
| 573 | "__type__": "cc.Node", | 582 | "__type__": "cc.Node", |
| 574 | "_name": "EditorSprite", | 583 | "_name": "EditorIcon", |
| 575 | "_objFlags": 0, | 584 | "_objFlags": 0, |
| 576 | "_parent": { | 585 | "_parent": { |
| 577 | "__id__": 2 | 586 | "__id__": 2 |
| ... | @@ -582,6 +591,9 @@ | ... | @@ -582,6 +591,9 @@ |
| 582 | "_components": [ | 591 | "_components": [ |
| 583 | { | 592 | { |
| 584 | "__id__": 14 | 593 | "__id__": 14 |
| 594 | }, | ||
| 595 | { | ||
| 596 | "__id__": 15 | ||
| 585 | } | 597 | } |
| 586 | ], | 598 | ], |
| 587 | "_prefab": null, | 599 | "_prefab": null, |
| ... | @@ -596,7 +608,7 @@ | ... | @@ -596,7 +608,7 @@ |
| 596 | "_contentSize": { | 608 | "_contentSize": { |
| 597 | "__type__": "cc.Size", | 609 | "__type__": "cc.Size", |
| 598 | "width": 137, | 610 | "width": 137, |
| 599 | "height": 63 | 611 | "height": 65 |
| 600 | }, | 612 | }, |
| 601 | "_anchorPoint": { | 613 | "_anchorPoint": { |
| 602 | "__type__": "cc.Vec2", | 614 | "__type__": "cc.Vec2", |
| ... | @@ -605,8 +617,8 @@ | ... | @@ -605,8 +617,8 @@ |
| 605 | }, | 617 | }, |
| 606 | "_position": { | 618 | "_position": { |
| 607 | "__type__": "cc.Vec3", | 619 | "__type__": "cc.Vec3", |
| 608 | "x": 360, | 620 | "x": 321.5, |
| 609 | "y": 303, | 621 | "y": 302.5, |
| 610 | "z": 0 | 622 | "z": 0 |
| 611 | }, | 623 | }, |
| 612 | "_scale": { | 624 | "_scale": { |
| ... | @@ -627,7 +639,7 @@ | ... | @@ -627,7 +639,7 @@ |
| 627 | "groupIndex": 0, | 639 | "groupIndex": 0, |
| 628 | "_rotationX": 0, | 640 | "_rotationX": 0, |
| 629 | "_rotationY": 0, | 641 | "_rotationY": 0, |
| 630 | "_id": "6ciKFyaElLH5TQ4kXAqGrd" | 642 | "_id": "b9ARw+zj1O9JGEuuqtOg9V" |
| 631 | }, | 643 | }, |
| 632 | { | 644 | { |
| 633 | "__type__": "cc.Sprite", | 645 | "__type__": "cc.Sprite", |
| ... | @@ -659,11 +671,38 @@ | ... | @@ -659,11 +671,38 @@ |
| 659 | "_fillRange": 0, | 671 | "_fillRange": 0, |
| 660 | "_isTrimmedMode": true, | 672 | "_isTrimmedMode": true, |
| 661 | "_atlas": null, | 673 | "_atlas": null, |
| 662 | "_id": "97Q0EH1BRJGKPa98nn2+Yc" | 674 | "_id": "53VxUsvEdMPYncByNtp4jD" |
| 675 | }, | ||
| 676 | { | ||
| 677 | "__type__": "cc.Widget", | ||
| 678 | "_name": "", | ||
| 679 | "_objFlags": 0, | ||
| 680 | "node": { | ||
| 681 | "__id__": 13 | ||
| 682 | }, | ||
| 683 | "_enabled": true, | ||
| 684 | "alignMode": 1, | ||
| 685 | "_target": null, | ||
| 686 | "_alignFlags": 33, | ||
| 687 | "_left": 881.197, | ||
| 688 | "_right": 250, | ||
| 689 | "_top": 25, | ||
| 690 | "_bottom": 0, | ||
| 691 | "_verticalCenter": 0, | ||
| 692 | "_horizontalCenter": 0, | ||
| 693 | "_isAbsLeft": true, | ||
| 694 | "_isAbsRight": true, | ||
| 695 | "_isAbsTop": true, | ||
| 696 | "_isAbsBottom": true, | ||
| 697 | "_isAbsHorizontalCenter": true, | ||
| 698 | "_isAbsVerticalCenter": true, | ||
| 699 | "_originalWidth": 0, | ||
| 700 | "_originalHeight": 0, | ||
| 701 | "_id": "e7B0Xu1CdJL6KsX+RsupzF" | ||
| 663 | }, | 702 | }, |
| 664 | { | 703 | { |
| 665 | "__type__": "cc.Node", | 704 | "__type__": "cc.Node", |
| 666 | "_name": "IndexSprite", | 705 | "_name": "ClearIcon", |
| 667 | "_objFlags": 0, | 706 | "_objFlags": 0, |
| 668 | "_parent": { | 707 | "_parent": { |
| 669 | "__id__": 2 | 708 | "__id__": 2 |
| ... | @@ -673,11 +712,14 @@ | ... | @@ -673,11 +712,14 @@ |
| 673 | "_level": 2, | 712 | "_level": 2, |
| 674 | "_components": [ | 713 | "_components": [ |
| 675 | { | 714 | { |
| 676 | "__id__": 16 | 715 | "__id__": 17 |
| 716 | }, | ||
| 717 | { | ||
| 718 | "__id__": 18 | ||
| 677 | } | 719 | } |
| 678 | ], | 720 | ], |
| 679 | "_prefab": null, | 721 | "_prefab": null, |
| 680 | "_opacity": 255, | 722 | "_opacity": 0, |
| 681 | "_color": { | 723 | "_color": { |
| 682 | "__type__": "cc.Color", | 724 | "__type__": "cc.Color", |
| 683 | "r": 255, | 725 | "r": 255, |
| ... | @@ -688,7 +730,7 @@ | ... | @@ -688,7 +730,7 @@ |
| 688 | "_contentSize": { | 730 | "_contentSize": { |
| 689 | "__type__": "cc.Size", | 731 | "__type__": "cc.Size", |
| 690 | "width": 137, | 732 | "width": 137, |
| 691 | "height": 64 | 733 | "height": 65 |
| 692 | }, | 734 | }, |
| 693 | "_anchorPoint": { | 735 | "_anchorPoint": { |
| 694 | "__type__": "cc.Vec2", | 736 | "__type__": "cc.Vec2", |
| ... | @@ -697,8 +739,8 @@ | ... | @@ -697,8 +739,8 @@ |
| 697 | }, | 739 | }, |
| 698 | "_position": { | 740 | "_position": { |
| 699 | "__type__": "cc.Vec3", | 741 | "__type__": "cc.Vec3", |
| 700 | "x": 530, | 742 | "x": 491.5, |
| 701 | "y": 303, | 743 | "y": 302.5, |
| 702 | "z": 0 | 744 | "z": 0 |
| 703 | }, | 745 | }, |
| 704 | "_scale": { | 746 | "_scale": { |
| ... | @@ -719,14 +761,14 @@ | ... | @@ -719,14 +761,14 @@ |
| 719 | "groupIndex": 0, | 761 | "groupIndex": 0, |
| 720 | "_rotationX": 0, | 762 | "_rotationX": 0, |
| 721 | "_rotationY": 0, | 763 | "_rotationY": 0, |
| 722 | "_id": "0bB+Kflr1HKKY9/XCYmf3D" | 764 | "_id": "dftNHd+XFBwqjjJevsHHA1" |
| 723 | }, | 765 | }, |
| 724 | { | 766 | { |
| 725 | "__type__": "cc.Sprite", | 767 | "__type__": "cc.Sprite", |
| 726 | "_name": "", | 768 | "_name": "", |
| 727 | "_objFlags": 0, | 769 | "_objFlags": 0, |
| 728 | "node": { | 770 | "node": { |
| 729 | "__id__": 15 | 771 | "__id__": 16 |
| 730 | }, | 772 | }, |
| 731 | "_enabled": true, | 773 | "_enabled": true, |
| 732 | "_materials": [ | 774 | "_materials": [ |
| ... | @@ -737,7 +779,7 @@ | ... | @@ -737,7 +779,7 @@ |
| 737 | "_srcBlendFactor": 770, | 779 | "_srcBlendFactor": 770, |
| 738 | "_dstBlendFactor": 771, | 780 | "_dstBlendFactor": 771, |
| 739 | "_spriteFrame": { | 781 | "_spriteFrame": { |
| 740 | "__uuid__": "b8d38b8c-3423-44ac-bc70-4f95ea2a4cb8" | 782 | "__uuid__": "828266d7-375c-4ab0-b654-db585576594e" |
| 741 | }, | 783 | }, |
| 742 | "_type": 0, | 784 | "_type": 0, |
| 743 | "_sizeMode": 0, | 785 | "_sizeMode": 0, |
| ... | @@ -751,227 +793,51 @@ | ... | @@ -751,227 +793,51 @@ |
| 751 | "_fillRange": 0, | 793 | "_fillRange": 0, |
| 752 | "_isTrimmedMode": true, | 794 | "_isTrimmedMode": true, |
| 753 | "_atlas": null, | 795 | "_atlas": null, |
| 754 | "_id": "ea0H41MT9Ap67ZyyS10TEq" | 796 | "_id": "59An2/xqhBDYRlEnvv3RX4" |
| 755 | }, | ||
| 756 | { | ||
| 757 | "__type__": "cc.Node", | ||
| 758 | "_name": "TypeListArea", | ||
| 759 | "_objFlags": 0, | ||
| 760 | "_parent": { | ||
| 761 | "__id__": 2 | ||
| 762 | }, | ||
| 763 | "_children": [ | ||
| 764 | { | ||
| 765 | "__id__": 18 | ||
| 766 | }, | ||
| 767 | { | ||
| 768 | "__id__": 21 | ||
| 769 | }, | ||
| 770 | { | ||
| 771 | "__id__": 23 | ||
| 772 | } | ||
| 773 | ], | ||
| 774 | "_active": false, | ||
| 775 | "_level": 0, | ||
| 776 | "_components": [], | ||
| 777 | "_prefab": null, | ||
| 778 | "_opacity": 255, | ||
| 779 | "_color": { | ||
| 780 | "__type__": "cc.Color", | ||
| 781 | "r": 255, | ||
| 782 | "g": 255, | ||
| 783 | "b": 255, | ||
| 784 | "a": 255 | ||
| 785 | }, | ||
| 786 | "_contentSize": { | ||
| 787 | "__type__": "cc.Size", | ||
| 788 | "width": 300, | ||
| 789 | "height": 450 | ||
| 790 | }, | ||
| 791 | "_anchorPoint": { | ||
| 792 | "__type__": "cc.Vec2", | ||
| 793 | "x": 0.5, | ||
| 794 | "y": 0.5 | ||
| 795 | }, | ||
| 796 | "_position": { | ||
| 797 | "__type__": "cc.Vec3", | ||
| 798 | "x": -450, | ||
| 799 | "y": -25, | ||
| 800 | "z": 0 | ||
| 801 | }, | ||
| 802 | "_scale": { | ||
| 803 | "__type__": "cc.Vec3", | ||
| 804 | "x": 1, | ||
| 805 | "y": 1, | ||
| 806 | "z": 1 | ||
| 807 | }, | ||
| 808 | "_eulerAngles": { | ||
| 809 | "__type__": "cc.Vec3", | ||
| 810 | "x": 0, | ||
| 811 | "y": 0, | ||
| 812 | "z": 0 | ||
| 813 | }, | ||
| 814 | "_skewX": 0, | ||
| 815 | "_skewY": 0, | ||
| 816 | "_is3DNode": false, | ||
| 817 | "groupIndex": 0, | ||
| 818 | "_rotationX": 0, | ||
| 819 | "_rotationY": 0, | ||
| 820 | "_id": "8dduWtCA9Ah4sfMc1qKG8Z" | ||
| 821 | }, | ||
| 822 | { | ||
| 823 | "__type__": "cc.Node", | ||
| 824 | "_name": "TypeListWrapper", | ||
| 825 | "_objFlags": 0, | ||
| 826 | "_parent": { | ||
| 827 | "__id__": 17 | ||
| 828 | }, | ||
| 829 | "_children": [ | ||
| 830 | { | ||
| 831 | "__id__": 19 | ||
| 832 | } | ||
| 833 | ], | ||
| 834 | "_active": true, | ||
| 835 | "_level": 0, | ||
| 836 | "_components": [ | ||
| 837 | { | ||
| 838 | "__id__": 20 | ||
| 839 | } | ||
| 840 | ], | ||
| 841 | "_prefab": null, | ||
| 842 | "_opacity": 255, | ||
| 843 | "_color": { | ||
| 844 | "__type__": "cc.Color", | ||
| 845 | "r": 255, | ||
| 846 | "g": 255, | ||
| 847 | "b": 255, | ||
| 848 | "a": 255 | ||
| 849 | }, | ||
| 850 | "_contentSize": { | ||
| 851 | "__type__": "cc.Size", | ||
| 852 | "width": 300, | ||
| 853 | "height": 450 | ||
| 854 | }, | ||
| 855 | "_anchorPoint": { | ||
| 856 | "__type__": "cc.Vec2", | ||
| 857 | "x": 0.5, | ||
| 858 | "y": 1 | ||
| 859 | }, | ||
| 860 | "_position": { | ||
| 861 | "__type__": "cc.Vec3", | ||
| 862 | "x": 0, | ||
| 863 | "y": 225, | ||
| 864 | "z": 0 | ||
| 865 | }, | ||
| 866 | "_scale": { | ||
| 867 | "__type__": "cc.Vec3", | ||
| 868 | "x": 1, | ||
| 869 | "y": 1, | ||
| 870 | "z": 1 | ||
| 871 | }, | ||
| 872 | "_eulerAngles": { | ||
| 873 | "__type__": "cc.Vec3", | ||
| 874 | "x": 0, | ||
| 875 | "y": 0, | ||
| 876 | "z": 0 | ||
| 877 | }, | ||
| 878 | "_skewX": 0, | ||
| 879 | "_skewY": 0, | ||
| 880 | "_is3DNode": false, | ||
| 881 | "groupIndex": 0, | ||
| 882 | "_rotationX": 0, | ||
| 883 | "_rotationY": 0, | ||
| 884 | "_id": "6auvTXe79Jeo/f/xdUQoZr" | ||
| 885 | }, | ||
| 886 | { | ||
| 887 | "__type__": "cc.Node", | ||
| 888 | "_name": "TypeList", | ||
| 889 | "_objFlags": 0, | ||
| 890 | "_parent": { | ||
| 891 | "__id__": 18 | ||
| 892 | }, | ||
| 893 | "_children": [], | ||
| 894 | "_active": true, | ||
| 895 | "_level": 0, | ||
| 896 | "_components": [], | ||
| 897 | "_prefab": null, | ||
| 898 | "_opacity": 255, | ||
| 899 | "_color": { | ||
| 900 | "__type__": "cc.Color", | ||
| 901 | "r": 255, | ||
| 902 | "g": 255, | ||
| 903 | "b": 255, | ||
| 904 | "a": 255 | ||
| 905 | }, | ||
| 906 | "_contentSize": { | ||
| 907 | "__type__": "cc.Size", | ||
| 908 | "width": 0, | ||
| 909 | "height": 0 | ||
| 910 | }, | ||
| 911 | "_anchorPoint": { | ||
| 912 | "__type__": "cc.Vec2", | ||
| 913 | "x": 0.5, | ||
| 914 | "y": 1 | ||
| 915 | }, | ||
| 916 | "_position": { | ||
| 917 | "__type__": "cc.Vec3", | ||
| 918 | "x": 0, | ||
| 919 | "y": 0, | ||
| 920 | "z": 0 | ||
| 921 | }, | ||
| 922 | "_scale": { | ||
| 923 | "__type__": "cc.Vec3", | ||
| 924 | "x": 1, | ||
| 925 | "y": 1, | ||
| 926 | "z": 1 | ||
| 927 | }, | ||
| 928 | "_eulerAngles": { | ||
| 929 | "__type__": "cc.Vec3", | ||
| 930 | "x": 0, | ||
| 931 | "y": 0, | ||
| 932 | "z": 0 | ||
| 933 | }, | ||
| 934 | "_skewX": 0, | ||
| 935 | "_skewY": 0, | ||
| 936 | "_is3DNode": false, | ||
| 937 | "groupIndex": 0, | ||
| 938 | "_rotationX": 0, | ||
| 939 | "_rotationY": 0, | ||
| 940 | "_id": "17/+pxhHRPQqa1j9vdHdLz" | ||
| 941 | }, | 797 | }, |
| 942 | { | 798 | { |
| 943 | "__type__": "cc.Mask", | 799 | "__type__": "cc.Widget", |
| 944 | "_name": "", | 800 | "_name": "", |
| 945 | "_objFlags": 0, | 801 | "_objFlags": 0, |
| 946 | "node": { | 802 | "node": { |
| 947 | "__id__": 18 | 803 | "__id__": 16 |
| 948 | }, | 804 | }, |
| 949 | "_enabled": true, | 805 | "_enabled": true, |
| 950 | "_materials": [ | 806 | "alignMode": 1, |
| 951 | { | 807 | "_target": null, |
| 952 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | 808 | "_alignFlags": 33, |
| 953 | } | 809 | "_left": 1064.605, |
| 954 | ], | 810 | "_right": 80, |
| 955 | "_spriteFrame": null, | 811 | "_top": 25, |
| 956 | "_type": 0, | 812 | "_bottom": 0, |
| 957 | "_segments": 64, | 813 | "_verticalCenter": 0, |
| 958 | "_N$alphaThreshold": 1, | 814 | "_horizontalCenter": 0, |
| 959 | "_N$inverted": false, | 815 | "_isAbsLeft": true, |
| 960 | "_id": "7fNB2fWOlFMpqSvXNTlfer" | 816 | "_isAbsRight": true, |
| 817 | "_isAbsTop": true, | ||
| 818 | "_isAbsBottom": true, | ||
| 819 | "_isAbsHorizontalCenter": true, | ||
| 820 | "_isAbsVerticalCenter": true, | ||
| 821 | "_originalWidth": 0, | ||
| 822 | "_originalHeight": 0, | ||
| 823 | "_id": "34gyymNA1OiariEHjILP55" | ||
| 961 | }, | 824 | }, |
| 962 | { | 825 | { |
| 963 | "__type__": "cc.Node", | 826 | "__type__": "cc.Node", |
| 964 | "_name": "Up", | 827 | "_name": "BackEditorIcon", |
| 965 | "_objFlags": 0, | 828 | "_objFlags": 0, |
| 966 | "_parent": { | 829 | "_parent": { |
| 967 | "__id__": 17 | 830 | "__id__": 2 |
| 968 | }, | 831 | }, |
| 969 | "_children": [], | 832 | "_children": [], |
| 970 | "_active": true, | 833 | "_active": true, |
| 971 | "_level": 1, | 834 | "_level": 2, |
| 972 | "_components": [ | 835 | "_components": [ |
| 973 | { | 836 | { |
| 974 | "__id__": 22 | 837 | "__id__": 20 |
| 838 | }, | ||
| 839 | { | ||
| 840 | "__id__": 21 | ||
| 975 | } | 841 | } |
| 976 | ], | 842 | ], |
| 977 | "_prefab": null, | 843 | "_prefab": null, |
| ... | @@ -985,8 +851,8 @@ | ... | @@ -985,8 +851,8 @@ |
| 985 | }, | 851 | }, |
| 986 | "_contentSize": { | 852 | "_contentSize": { |
| 987 | "__type__": "cc.Size", | 853 | "__type__": "cc.Size", |
| 988 | "width": 46, | 854 | "width": 137, |
| 989 | "height": 22 | 855 | "height": 65 |
| 990 | }, | 856 | }, |
| 991 | "_anchorPoint": { | 857 | "_anchorPoint": { |
| 992 | "__type__": "cc.Vec2", | 858 | "__type__": "cc.Vec2", |
| ... | @@ -995,8 +861,8 @@ | ... | @@ -995,8 +861,8 @@ |
| 995 | }, | 861 | }, |
| 996 | "_position": { | 862 | "_position": { |
| 997 | "__type__": "cc.Vec3", | 863 | "__type__": "cc.Vec3", |
| 998 | "x": 0, | 864 | "x": 321.5, |
| 999 | "y": 261, | 865 | "y": 302.5, |
| 1000 | "z": 0 | 866 | "z": 0 |
| 1001 | }, | 867 | }, |
| 1002 | "_scale": { | 868 | "_scale": { |
| ... | @@ -1017,22 +883,28 @@ | ... | @@ -1017,22 +883,28 @@ |
| 1017 | "groupIndex": 0, | 883 | "groupIndex": 0, |
| 1018 | "_rotationX": 0, | 884 | "_rotationX": 0, |
| 1019 | "_rotationY": 0, | 885 | "_rotationY": 0, |
| 1020 | "_id": "85eNeKVr1OLb951tLUb0pj" | 886 | "_id": "3dn7XQc1dMs4Fh+RpBkHFt" |
| 1021 | }, | 887 | }, |
| 1022 | { | 888 | { |
| 1023 | "__type__": "cc.Sprite", | 889 | "__type__": "cc.Sprite", |
| 1024 | "_name": "", | 890 | "_name": "", |
| 1025 | "_objFlags": 0, | 891 | "_objFlags": 0, |
| 1026 | "node": { | 892 | "node": { |
| 1027 | "__id__": 21 | 893 | "__id__": 19 |
| 1028 | }, | 894 | }, |
| 1029 | "_enabled": true, | 895 | "_enabled": true, |
| 1030 | "_materials": [], | 896 | "_materials": [ |
| 897 | { | ||
| 898 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
| 899 | } | ||
| 900 | ], | ||
| 1031 | "_srcBlendFactor": 770, | 901 | "_srcBlendFactor": 770, |
| 1032 | "_dstBlendFactor": 771, | 902 | "_dstBlendFactor": 771, |
| 1033 | "_spriteFrame": null, | 903 | "_spriteFrame": { |
| 904 | "__uuid__": "171d3929-fbaa-475e-a350-bc4cb2cf698e" | ||
| 905 | }, | ||
| 1034 | "_type": 0, | 906 | "_type": 0, |
| 1035 | "_sizeMode": 1, | 907 | "_sizeMode": 0, |
| 1036 | "_fillType": 0, | 908 | "_fillType": 0, |
| 1037 | "_fillCenter": { | 909 | "_fillCenter": { |
| 1038 | "__type__": "cc.Vec2", | 910 | "__type__": "cc.Vec2", |
| ... | @@ -1043,25 +915,55 @@ | ... | @@ -1043,25 +915,55 @@ |
| 1043 | "_fillRange": 0, | 915 | "_fillRange": 0, |
| 1044 | "_isTrimmedMode": true, | 916 | "_isTrimmedMode": true, |
| 1045 | "_atlas": null, | 917 | "_atlas": null, |
| 1046 | "_id": "7ezxR7BQ5LnIb7twgLUgrP" | 918 | "_id": "5fDvKzzeJKOIAPeUHGXbZp" |
| 919 | }, | ||
| 920 | { | ||
| 921 | "__type__": "cc.Widget", | ||
| 922 | "_name": "", | ||
| 923 | "_objFlags": 0, | ||
| 924 | "node": { | ||
| 925 | "__id__": 19 | ||
| 926 | }, | ||
| 927 | "_enabled": true, | ||
| 928 | "alignMode": 1, | ||
| 929 | "_target": null, | ||
| 930 | "_alignFlags": 33, | ||
| 931 | "_left": 1072.5, | ||
| 932 | "_right": 250, | ||
| 933 | "_top": 25, | ||
| 934 | "_bottom": 0, | ||
| 935 | "_verticalCenter": 0, | ||
| 936 | "_horizontalCenter": 0, | ||
| 937 | "_isAbsLeft": true, | ||
| 938 | "_isAbsRight": true, | ||
| 939 | "_isAbsTop": true, | ||
| 940 | "_isAbsBottom": true, | ||
| 941 | "_isAbsHorizontalCenter": true, | ||
| 942 | "_isAbsVerticalCenter": true, | ||
| 943 | "_originalWidth": 137, | ||
| 944 | "_originalHeight": 0, | ||
| 945 | "_id": "94G/EEtixIeY3TbTZDdgy8" | ||
| 1047 | }, | 946 | }, |
| 1048 | { | 947 | { |
| 1049 | "__type__": "cc.Node", | 948 | "__type__": "cc.Node", |
| 1050 | "_name": "Down", | 949 | "_name": "IndexIcon", |
| 1051 | "_objFlags": 0, | 950 | "_objFlags": 0, |
| 1052 | "_parent": { | 951 | "_parent": { |
| 1053 | "__id__": 17 | 952 | "__id__": 2 |
| 1054 | }, | 953 | }, |
| 1055 | "_children": [], | 954 | "_children": [], |
| 1056 | "_active": true, | 955 | "_active": true, |
| 1057 | "_level": 1, | 956 | "_level": 2, |
| 1058 | "_components": [ | 957 | "_components": [ |
| 1059 | { | 958 | { |
| 959 | "__id__": 23 | ||
| 960 | }, | ||
| 961 | { | ||
| 1060 | "__id__": 24 | 962 | "__id__": 24 |
| 1061 | } | 963 | } |
| 1062 | ], | 964 | ], |
| 1063 | "_prefab": null, | 965 | "_prefab": null, |
| 1064 | "_opacity": 0, | 966 | "_opacity": 255, |
| 1065 | "_color": { | 967 | "_color": { |
| 1066 | "__type__": "cc.Color", | 968 | "__type__": "cc.Color", |
| 1067 | "r": 255, | 969 | "r": 255, |
| ... | @@ -1071,8 +973,8 @@ | ... | @@ -1071,8 +973,8 @@ |
| 1071 | }, | 973 | }, |
| 1072 | "_contentSize": { | 974 | "_contentSize": { |
| 1073 | "__type__": "cc.Size", | 975 | "__type__": "cc.Size", |
| 1074 | "width": 46, | 976 | "width": 137, |
| 1075 | "height": 28 | 977 | "height": 65 |
| 1076 | }, | 978 | }, |
| 1077 | "_anchorPoint": { | 979 | "_anchorPoint": { |
| 1078 | "__type__": "cc.Vec2", | 980 | "__type__": "cc.Vec2", |
| ... | @@ -1081,8 +983,8 @@ | ... | @@ -1081,8 +983,8 @@ |
| 1081 | }, | 983 | }, |
| 1082 | "_position": { | 984 | "_position": { |
| 1083 | "__type__": "cc.Vec3", | 985 | "__type__": "cc.Vec3", |
| 1084 | "x": 0, | 986 | "x": 491.5, |
| 1085 | "y": -265, | 987 | "y": 302.5, |
| 1086 | "z": 0 | 988 | "z": 0 |
| 1087 | }, | 989 | }, |
| 1088 | "_scale": { | 990 | "_scale": { |
| ... | @@ -1103,22 +1005,28 @@ | ... | @@ -1103,22 +1005,28 @@ |
| 1103 | "groupIndex": 0, | 1005 | "groupIndex": 0, |
| 1104 | "_rotationX": 0, | 1006 | "_rotationX": 0, |
| 1105 | "_rotationY": 0, | 1007 | "_rotationY": 0, |
| 1106 | "_id": "27uByxQM9ALJpKDHMGUgLn" | 1008 | "_id": "25HTzk30xOk5pSXwA4KVaf" |
| 1107 | }, | 1009 | }, |
| 1108 | { | 1010 | { |
| 1109 | "__type__": "cc.Sprite", | 1011 | "__type__": "cc.Sprite", |
| 1110 | "_name": "", | 1012 | "_name": "", |
| 1111 | "_objFlags": 0, | 1013 | "_objFlags": 0, |
| 1112 | "node": { | 1014 | "node": { |
| 1113 | "__id__": 23 | 1015 | "__id__": 22 |
| 1114 | }, | 1016 | }, |
| 1115 | "_enabled": true, | 1017 | "_enabled": true, |
| 1116 | "_materials": [], | 1018 | "_materials": [ |
| 1019 | { | ||
| 1020 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
| 1021 | } | ||
| 1022 | ], | ||
| 1117 | "_srcBlendFactor": 770, | 1023 | "_srcBlendFactor": 770, |
| 1118 | "_dstBlendFactor": 771, | 1024 | "_dstBlendFactor": 771, |
| 1119 | "_spriteFrame": null, | 1025 | "_spriteFrame": { |
| 1026 | "__uuid__": "b8d38b8c-3423-44ac-bc70-4f95ea2a4cb8" | ||
| 1027 | }, | ||
| 1120 | "_type": 0, | 1028 | "_type": 0, |
| 1121 | "_sizeMode": 1, | 1029 | "_sizeMode": 0, |
| 1122 | "_fillType": 0, | 1030 | "_fillType": 0, |
| 1123 | "_fillCenter": { | 1031 | "_fillCenter": { |
| 1124 | "__type__": "cc.Vec2", | 1032 | "__type__": "cc.Vec2", |
| ... | @@ -1129,7 +1037,34 @@ | ... | @@ -1129,7 +1037,34 @@ |
| 1129 | "_fillRange": 0, | 1037 | "_fillRange": 0, |
| 1130 | "_isTrimmedMode": true, | 1038 | "_isTrimmedMode": true, |
| 1131 | "_atlas": null, | 1039 | "_atlas": null, |
| 1132 | "_id": "1fly3W4qFK+oW3AmyGrosZ" | 1040 | "_id": "17Wwb6m8JD2ZW8LR1MPQ3C" |
| 1041 | }, | ||
| 1042 | { | ||
| 1043 | "__type__": "cc.Widget", | ||
| 1044 | "_name": "", | ||
| 1045 | "_objFlags": 0, | ||
| 1046 | "node": { | ||
| 1047 | "__id__": 22 | ||
| 1048 | }, | ||
| 1049 | "_enabled": true, | ||
| 1050 | "alignMode": 1, | ||
| 1051 | "_target": null, | ||
| 1052 | "_alignFlags": 33, | ||
| 1053 | "_left": 0, | ||
| 1054 | "_right": 80, | ||
| 1055 | "_top": 25, | ||
| 1056 | "_bottom": 0, | ||
| 1057 | "_verticalCenter": 0, | ||
| 1058 | "_horizontalCenter": 0, | ||
| 1059 | "_isAbsLeft": true, | ||
| 1060 | "_isAbsRight": true, | ||
| 1061 | "_isAbsTop": true, | ||
| 1062 | "_isAbsBottom": true, | ||
| 1063 | "_isAbsHorizontalCenter": true, | ||
| 1064 | "_isAbsVerticalCenter": true, | ||
| 1065 | "_originalWidth": 0, | ||
| 1066 | "_originalHeight": 0, | ||
| 1067 | "_id": "00/XRqpEdJhpCijZQ5kFay" | ||
| 1133 | }, | 1068 | }, |
| 1134 | { | 1069 | { |
| 1135 | "__type__": "cc.Node", | 1070 | "__type__": "cc.Node", |
| ... | @@ -1936,7 +1871,7 @@ | ... | @@ -1936,7 +1871,7 @@ |
| 1936 | }, | 1871 | }, |
| 1937 | "_position": { | 1872 | "_position": { |
| 1938 | "__type__": "cc.Vec3", | 1873 | "__type__": "cc.Vec3", |
| 1939 | "x": 30, | 1874 | "x": 29.999999999999996, |
| 1940 | "y": -2.3399999999999963, | 1875 | "y": -2.3399999999999963, |
| 1941 | "z": 0 | 1876 | "z": 0 |
| 1942 | }, | 1877 | }, |
| ... | @@ -2017,7 +1952,7 @@ | ... | @@ -2017,7 +1952,7 @@ |
| 2017 | "_is3DNode": false, | 1952 | "_is3DNode": false, |
| 2018 | "groupIndex": 0, | 1953 | "groupIndex": 0, |
| 2019 | "showInEditor": false, | 1954 | "showInEditor": false, |
| 2020 | "_id": "492e5MYFVJCa7zVnna9LNZ" | 1955 | "_id": "66nIzQ7pZAPJG4emKC21kQ" |
| 2021 | }, | 1956 | }, |
| 2022 | { | 1957 | { |
| 2023 | "__type__": "cc.Label", | 1958 | "__type__": "cc.Label", |
| ... | @@ -2047,7 +1982,7 @@ | ... | @@ -2047,7 +1982,7 @@ |
| 2047 | "_N$fontFamily": "Arial", | 1982 | "_N$fontFamily": "Arial", |
| 2048 | "_N$overflow": 0, | 1983 | "_N$overflow": 0, |
| 2049 | "_N$cacheMode": 0, | 1984 | "_N$cacheMode": 0, |
| 2050 | "_id": "a889jNIhNELK6S73eyqyzh" | 1985 | "_id": "39Zb8CXbtArJGk6XGyx6an" |
| 2051 | }, | 1986 | }, |
| 2052 | { | 1987 | { |
| 2053 | "__type__": "cc.PrivateNode", | 1988 | "__type__": "cc.PrivateNode", |
| ... | @@ -2106,7 +2041,7 @@ | ... | @@ -2106,7 +2041,7 @@ |
| 2106 | "_is3DNode": false, | 2041 | "_is3DNode": false, |
| 2107 | "groupIndex": 0, | 2042 | "groupIndex": 0, |
| 2108 | "showInEditor": false, | 2043 | "showInEditor": false, |
| 2109 | "_id": "44tdWup1pJCZ9DEJbHSBn4" | 2044 | "_id": "60IAushhxERqx+7eoKTbwX" |
| 2110 | }, | 2045 | }, |
| 2111 | { | 2046 | { |
| 2112 | "__type__": "cc.Label", | 2047 | "__type__": "cc.Label", |
| ... | @@ -2136,7 +2071,7 @@ | ... | @@ -2136,7 +2071,7 @@ |
| 2136 | "_N$fontFamily": "Arial", | 2071 | "_N$fontFamily": "Arial", |
| 2137 | "_N$overflow": 0, | 2072 | "_N$overflow": 0, |
| 2138 | "_N$cacheMode": 0, | 2073 | "_N$cacheMode": 0, |
| 2139 | "_id": "9edkJf6uRLJonLoSuoqvK5" | 2074 | "_id": "3348o4E+9L3JK7GZ6/9qzD" |
| 2140 | }, | 2075 | }, |
| 2141 | { | 2076 | { |
| 2142 | "__type__": "cc.PrivateNode", | 2077 | "__type__": "cc.PrivateNode", |
| ... | @@ -2195,7 +2130,7 @@ | ... | @@ -2195,7 +2130,7 @@ |
| 2195 | "_is3DNode": false, | 2130 | "_is3DNode": false, |
| 2196 | "groupIndex": 0, | 2131 | "groupIndex": 0, |
| 2197 | "showInEditor": false, | 2132 | "showInEditor": false, |
| 2198 | "_id": "afYFpDSEFJAIUEiK4MAC3Z" | 2133 | "_id": "f0ghP9ofNOBZ1i3lcJV4Lp" |
| 2199 | }, | 2134 | }, |
| 2200 | { | 2135 | { |
| 2201 | "__type__": "cc.Label", | 2136 | "__type__": "cc.Label", |
| ... | @@ -2225,7 +2160,7 @@ | ... | @@ -2225,7 +2160,7 @@ |
| 2225 | "_N$fontFamily": "Arial", | 2160 | "_N$fontFamily": "Arial", |
| 2226 | "_N$overflow": 0, | 2161 | "_N$overflow": 0, |
| 2227 | "_N$cacheMode": 0, | 2162 | "_N$cacheMode": 0, |
| 2228 | "_id": "c6t5tGLcdJBq4G+sp58xbJ" | 2163 | "_id": "3fZII17DpAcJGkyA1Bdnw5" |
| 2229 | }, | 2164 | }, |
| 2230 | { | 2165 | { |
| 2231 | "__type__": "cc.PrivateNode", | 2166 | "__type__": "cc.PrivateNode", |
| ... | @@ -2284,7 +2219,7 @@ | ... | @@ -2284,7 +2219,7 @@ |
| 2284 | "_is3DNode": false, | 2219 | "_is3DNode": false, |
| 2285 | "groupIndex": 0, | 2220 | "groupIndex": 0, |
| 2286 | "showInEditor": false, | 2221 | "showInEditor": false, |
| 2287 | "_id": "22NhEcgt9C/IKehlGFl3PF" | 2222 | "_id": "e1RXHf09ZPuanSS31+qpDf" |
| 2288 | }, | 2223 | }, |
| 2289 | { | 2224 | { |
| 2290 | "__type__": "cc.Label", | 2225 | "__type__": "cc.Label", |
| ... | @@ -2314,7 +2249,7 @@ | ... | @@ -2314,7 +2249,7 @@ |
| 2314 | "_N$fontFamily": "Arial", | 2249 | "_N$fontFamily": "Arial", |
| 2315 | "_N$overflow": 0, | 2250 | "_N$overflow": 0, |
| 2316 | "_N$cacheMode": 0, | 2251 | "_N$cacheMode": 0, |
| 2317 | "_id": "afOldmZFxEfLUMmA5Yb2Xb" | 2252 | "_id": "9b3Oj6HGlJqJ+h35GjPPi6" |
| 2318 | }, | 2253 | }, |
| 2319 | { | 2254 | { |
| 2320 | "__type__": "cc.RichText", | 2255 | "__type__": "cc.RichText", |
| ... | @@ -2347,7 +2282,7 @@ | ... | @@ -2347,7 +2282,7 @@ |
| 2347 | "alignMode": 0, | 2282 | "alignMode": 0, |
| 2348 | "_target": null, | 2283 | "_target": null, |
| 2349 | "_alignFlags": 9, | 2284 | "_alignFlags": 9, |
| 2350 | "_left": 26, | 2285 | "_left": 25.999999999999996, |
| 2351 | "_right": 0, | 2286 | "_right": 0, |
| 2352 | "_top": 20, | 2287 | "_top": 20, |
| 2353 | "_bottom": 0, | 2288 | "_bottom": 0, |
| ... | @@ -2468,7 +2403,7 @@ | ... | @@ -2468,7 +2403,7 @@ |
| 2468 | "_left": 0, | 2403 | "_left": 0, |
| 2469 | "_right": 0, | 2404 | "_right": 0, |
| 2470 | "_top": 0, | 2405 | "_top": 0, |
| 2471 | "_bottom": 510, | 2406 | "_bottom": 0, |
| 2472 | "_verticalCenter": 0, | 2407 | "_verticalCenter": 0, |
| 2473 | "_horizontalCenter": 0, | 2408 | "_horizontalCenter": 0, |
| 2474 | "_isAbsLeft": true, | 2409 | "_isAbsLeft": true, |
| ... | @@ -2479,7 +2414,7 @@ | ... | @@ -2479,7 +2414,7 @@ |
| 2479 | "_isAbsVerticalCenter": true, | 2414 | "_isAbsVerticalCenter": true, |
| 2480 | "_originalWidth": 0, | 2415 | "_originalWidth": 0, |
| 2481 | "_originalHeight": 0, | 2416 | "_originalHeight": 0, |
| 2482 | "_id": "19jqxsTD5NL7CSeBplaD1S" | 2417 | "_id": "50J8GnwD5On4qUjkKfBrfG" |
| 2483 | }, | 2418 | }, |
| 2484 | { | 2419 | { |
| 2485 | "__type__": "cc.Widget", | 2420 | "__type__": "cc.Widget", |
| ... | @@ -2577,8 +2512,8 @@ | ... | @@ -2577,8 +2512,8 @@ |
| 2577 | }, | 2512 | }, |
| 2578 | "_contentSize": { | 2513 | "_contentSize": { |
| 2579 | "__type__": "cc.Size", | 2514 | "__type__": "cc.Size", |
| 2580 | "width": 784, | 2515 | "width": 1164, |
| 2581 | "height": 448 | 2516 | "height": 523 |
| 2582 | }, | 2517 | }, |
| 2583 | "_anchorPoint": { | 2518 | "_anchorPoint": { |
| 2584 | "__type__": "cc.Vec2", | 2519 | "__type__": "cc.Vec2", |
| ... | @@ -2587,8 +2522,8 @@ | ... | @@ -2587,8 +2522,8 @@ |
| 2587 | }, | 2522 | }, |
| 2588 | "_position": { | 2523 | "_position": { |
| 2589 | "__type__": "cc.Vec3", | 2524 | "__type__": "cc.Vec3", |
| 2590 | "x": 110, | 2525 | "x": 0, |
| 2591 | "y": 0, | 2526 | "y": -37, |
| 2592 | "z": 0 | 2527 | "z": 0 |
| 2593 | }, | 2528 | }, |
| 2594 | "_scale": { | 2529 | "_scale": { |
| ... | @@ -2619,10 +2554,16 @@ | ... | @@ -2619,10 +2554,16 @@ |
| 2619 | "__id__": 58 | 2554 | "__id__": 58 |
| 2620 | }, | 2555 | }, |
| 2621 | "_enabled": true, | 2556 | "_enabled": true, |
| 2622 | "_materials": [], | 2557 | "_materials": [ |
| 2558 | { | ||
| 2559 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" | ||
| 2560 | } | ||
| 2561 | ], | ||
| 2623 | "_srcBlendFactor": 770, | 2562 | "_srcBlendFactor": 770, |
| 2624 | "_dstBlendFactor": 771, | 2563 | "_dstBlendFactor": 771, |
| 2625 | "_spriteFrame": null, | 2564 | "_spriteFrame": { |
| 2565 | "__uuid__": "1c7a33d8-7cec-4bbc-8e8c-90b17a6de4f9" | ||
| 2566 | }, | ||
| 2626 | "_type": 0, | 2567 | "_type": 0, |
| 2627 | "_sizeMode": 1, | 2568 | "_sizeMode": 1, |
| 2628 | "_fillType": 0, | 2569 | "_fillType": 0, |
| ... | @@ -2673,8 +2614,8 @@ | ... | @@ -2673,8 +2614,8 @@ |
| 2673 | }, | 2614 | }, |
| 2674 | "_position": { | 2615 | "_position": { |
| 2675 | "__type__": "cc.Vec3", | 2616 | "__type__": "cc.Vec3", |
| 2676 | "x": 569, | 2617 | "x": 572, |
| 2677 | "y": -322, | 2618 | "y": -331, |
| 2678 | "z": 0 | 2619 | "z": 0 |
| 2679 | }, | 2620 | }, |
| 2680 | "_scale": { | 2621 | "_scale": { |
| ... | @@ -2695,7 +2636,7 @@ | ... | @@ -2695,7 +2636,7 @@ |
| 2695 | "groupIndex": 0, | 2636 | "groupIndex": 0, |
| 2696 | "_rotationX": 0, | 2637 | "_rotationX": 0, |
| 2697 | "_rotationY": 0, | 2638 | "_rotationY": 0, |
| 2698 | "_id": "85SUP+vgVOOrYxm9l3a+wQ" | 2639 | "_id": "6asxTrygJEmq7PXj0IvpAO" |
| 2699 | }, | 2640 | }, |
| 2700 | { | 2641 | { |
| 2701 | "__type__": "cc.Label", | 2642 | "__type__": "cc.Label", |
| ... | @@ -2725,7 +2666,7 @@ | ... | @@ -2725,7 +2666,7 @@ |
| 2725 | "_N$fontFamily": "Arial", | 2666 | "_N$fontFamily": "Arial", |
| 2726 | "_N$overflow": 0, | 2667 | "_N$overflow": 0, |
| 2727 | "_N$cacheMode": 0, | 2668 | "_N$cacheMode": 0, |
| 2728 | "_id": "d0CZ1Ao75PXa0OrFk6SYmo" | 2669 | "_id": "4ePf13G0pNu5jt9RRFjN2a" |
| 2729 | }, | 2670 | }, |
| 2730 | { | 2671 | { |
| 2731 | "__type__": "cc.Canvas", | 2672 | "__type__": "cc.Canvas", |
| ... | @@ -2768,37 +2709,31 @@ | ... | @@ -2768,37 +2709,31 @@ |
| 2768 | "_oFocusScaleFactorInfo": null, | 2709 | "_oFocusScaleFactorInfo": null, |
| 2769 | "holdClick": false, | 2710 | "holdClick": false, |
| 2770 | "_bShowExitBox": false, | 2711 | "_bShowExitBox": false, |
| 2771 | "spriteScrollBarBlock": { | 2712 | "spriteCollect": { |
| 2772 | "__id__": 51 | 2713 | "__id__": 11 |
| 2773 | }, | 2714 | }, |
| 2774 | "spriteScrollBarUp": { | 2715 | "spriteEditor": { |
| 2775 | "__id__": 35 | 2716 | "__id__": 14 |
| 2776 | }, | 2717 | }, |
| 2777 | "spriteScrollBarDown": { | 2718 | "spriteClear": { |
| 2778 | "__id__": 38 | 2719 | "__id__": 17 |
| 2720 | }, | ||
| 2721 | "spriteBackEditor": { | ||
| 2722 | "__id__": 20 | ||
| 2723 | }, | ||
| 2724 | "spriteIndex": { | ||
| 2725 | "__id__": 23 | ||
| 2779 | }, | 2726 | }, |
| 2780 | "_bPfbTypeCellInit": false, | 2727 | "_bPfbTypeCellInit": false, |
| 2781 | "_aTypeAppId": [], | 2728 | "_aTypeAppId": [], |
| 2782 | "_aTypeUrl": [], | ||
| 2783 | "_aNavList": [], | ||
| 2784 | "_nodeTypeHeight": 0, | 2729 | "_nodeTypeHeight": 0, |
| 2785 | "TYPE_LIST_CELL_SIZE": 4, | 2730 | "TYPE_LIST_CELL_SIZE": 4, |
| 2786 | "_strAppId": "", | ||
| 2787 | "_strDirURL": "", | ||
| 2788 | "_oDestURL": null, | ||
| 2789 | "_strIndexURL": "", | ||
| 2790 | "_strIconSrc": "", | ||
| 2791 | "_iCollectionId": 0, | ||
| 2792 | "_aEpisodeIndex": [], | ||
| 2793 | "_strPageIds": "", | ||
| 2794 | "_bIsContentWStatus": true, | ||
| 2795 | "_bIsCategoryListDataInit": false, | 2731 | "_bIsCategoryListDataInit": false, |
| 2796 | "_strIds": "", | 2732 | "_iDefaultCollectionId": 0, |
| 2733 | "_bEditorStatus": false, | ||
| 2797 | "_oType": null, | 2734 | "_oType": null, |
| 2798 | "_aCategoryMediaId": [], | 2735 | "_aNavList": [], |
| 2799 | "_aCategoryAlreadyMediaId": [], | 2736 | "_strAppId": "", |
| 2800 | "_bBackStatus": false, | 2737 | "_id": "45WbjOhxdJ/qGICJukUhoz" |
| 2801 | "PFB_TYPE": null, | ||
| 2802 | "_id": "a15wRNM8dNz7y8/tCUBSuF" | ||
| 2803 | } | 2738 | } |
| 2804 | ] | 2739 | ] |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -73,10 +73,6 @@ cc.Class({ | ... | @@ -73,10 +73,6 @@ cc.Class({ |
| 73 | this.spriteBackEditor.spriteFrame.setRect(cc.rect(0, 0, 137, 65)); | 73 | this.spriteBackEditor.spriteFrame.setRect(cc.rect(0, 0, 137, 65)); |
| 74 | this.spriteIndex.spriteFrame.setRect(cc.rect(0, 0, 137, 65)); | 74 | this.spriteIndex.spriteFrame.setRect(cc.rect(0, 0, 137, 65)); |
| 75 | 75 | ||
| 76 | // //左分类框框 | ||
| 77 | // this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node); | ||
| 78 | // this._nodeTypeList = cc.find("TypeList", this._nodeTypeListWrapper); | ||
| 79 | // this._nodeTypeList.addComponent(TVScrollParameter); | ||
| 80 | //右分类框框 | 76 | //右分类框框 |
| 81 | this._nodeCategoryList = cc.find("CategoryList", this.node); | 77 | this._nodeCategoryList = cc.find("CategoryList", this.node); |
| 82 | let lvCategoryList = this._nodeCategoryList.addComponent(ListView); | 78 | let lvCategoryList = this._nodeCategoryList.addComponent(ListView); |
| ... | @@ -90,93 +86,9 @@ cc.Class({ | ... | @@ -90,93 +86,9 @@ cc.Class({ |
| 90 | } | 86 | } |
| 91 | ); | 87 | ); |
| 92 | 88 | ||
| 93 | // //滚动条按钮 | ||
| 94 | // let nodeScrollBtn = cc.find("CategoryList/ScrollBarContainer/ScrollBarShadow/ScrollBarBlock", this.node); | ||
| 95 | // var fiScrollBtn = nodeScrollBtn.addComponent(FocusInfo); | ||
| 96 | // this._aFocusTargets[0]['scroll_bar_block'] = nodeScrollBtn; | ||
| 97 | // fiScrollBtn.init(null, true); | ||
| 98 | |||
| 99 | this.getPageBg(this, 'background'); | 89 | this.getPageBg(this, 'background'); |
| 100 | }, | 90 | }, |
| 101 | 91 | ||
| 102 | // getTypeList: function () { | ||
| 103 | // let oTypeRequestParameters = { | ||
| 104 | // "view": "json", | ||
| 105 | // "start": 0, | ||
| 106 | // "limit": 100, | ||
| 107 | // "name": "indexCollectionNew", | ||
| 108 | // "sortField": "left", | ||
| 109 | // "sortDirection": "desc", | ||
| 110 | // "token": Common.TEST_API_TOKEN, | ||
| 111 | // }; | ||
| 112 | // Network.ajax('GET', Common.TOPDRAW_API_SERVER + "Promotion/ListItemByName", null, oTypeRequestParameters, | ||
| 113 | // function (strResponse) { | ||
| 114 | // try { | ||
| 115 | // var oJSONResult = JSON.parse(strResponse); | ||
| 116 | // if (oJSONResult.businessCode == 'success') { | ||
| 117 | // this._oType = []; | ||
| 118 | // if (oJSONResult.resultSet.length > 0) { | ||
| 119 | // for (var i = 0; i < oJSONResult.resultSet.length; i++) { | ||
| 120 | // this._oType.push(oJSONResult.resultSet[i]); | ||
| 121 | // //恢复上下文带过来的位置 | ||
| 122 | // // if (this._oSceneContext.requestedTypeId && this._oSceneContext.requestedTypeId == oJSONResult.resultSet[i].id) { | ||
| 123 | // // this._iCurrentTypeIndex = i; | ||
| 124 | // // } | ||
| 125 | // let oTvlink = JSON.parse(oJSONResult.resultSet[i].tvlink); | ||
| 126 | // let oListCell = {}; | ||
| 127 | // let jaClick = oTvlink.click; | ||
| 128 | // let oParameters = null | ||
| 129 | // for (let i = 0; i < jaClick.length; i++) { | ||
| 130 | // oParameters = jaClick[i].parameters; | ||
| 131 | // } | ||
| 132 | // oListCell.appId = oParameters.appId; | ||
| 133 | |||
| 134 | // this._aNavList.push(oListCell); | ||
| 135 | // this._aTypeAppId.push(oParameters.appId); //拿到appId并保存到_aTypeAppId | ||
| 136 | |||
| 137 | // let nodeTypeListCell = cc.instantiate(this.PFB_TYPE); | ||
| 138 | // nodeTypeListCell.y = -nodeTypeListCell.height / 2 - i * (nodeTypeListCell.height + 25) - 10; | ||
| 139 | // this._nodeTypeList.addChild(nodeTypeListCell, 10, "TypeListCell" + i); | ||
| 140 | // //准备焦点坐标 | ||
| 141 | // let fiTypeBlock = nodeTypeListCell.addComponent(FocusInfo); | ||
| 142 | // fiTypeBlock.init( | ||
| 143 | // '', | ||
| 144 | // true, null, null, 1.15 | ||
| 145 | // ); | ||
| 146 | // this._aFocusTargets[0]['type_list_cell_' + i] = nodeTypeListCell; | ||
| 147 | // if (oJSONResult.resultSet[i].image[0]) { | ||
| 148 | // let width = oJSONResult.resultSet[i].image[0].width; | ||
| 149 | // let height = oJSONResult.resultSet[i].image[0].height / 2; | ||
| 150 | // nodeTypeListCell.width = width; | ||
| 151 | // nodeTypeListCell.height = height; | ||
| 152 | // this._nodeTypeHeight = height; | ||
| 153 | // Network.loadImageInNativeRuntime( | ||
| 154 | // Common.TOPDRAW_IMAGE_SERVER + oJSONResult.resultSet[i].image[0].fileUrl, | ||
| 155 | // function (texture) { | ||
| 156 | // cc.find('Bg', nodeTypeListCell).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, width, height)); | ||
| 157 | // }, null, this | ||
| 158 | // ); | ||
| 159 | // } | ||
| 160 | // } | ||
| 161 | // this._oSceneContext.requestedTypeId = this._aTypeAppId[this._oSceneContext._iCurrentTypeIndex]; | ||
| 162 | // this.getDefaultCollection(); | ||
| 163 | // } else { | ||
| 164 | // this._oSceneContext.focusPath = "app"; | ||
| 165 | // } | ||
| 166 | // cc.log("Success GET TYPE LIST..."); | ||
| 167 | // } else { | ||
| 168 | // cc.log("Error GET TYPE LIST..." + oJSONResult.description); | ||
| 169 | // } | ||
| 170 | // } catch (error) { | ||
| 171 | // cc.log("Exception GET TYPE LIST..." + error); | ||
| 172 | // } | ||
| 173 | // }, | ||
| 174 | // function (strResponse) { | ||
| 175 | // cc.log("Communication Error : Get Type List Information..." + strResponse + "\r\n"); | ||
| 176 | // }, this, "uuid" | ||
| 177 | // ); | ||
| 178 | // }, | ||
| 179 | |||
| 180 | /** | 92 | /** |
| 181 | * 用当前typeid拿到id | 93 | * 用当前typeid拿到id |
| 182 | */ | 94 | */ |
| ... | @@ -249,7 +161,7 @@ cc.Class({ | ... | @@ -249,7 +161,7 @@ cc.Class({ |
| 249 | this._bIsCategoryListDataInit = true; | 161 | this._bIsCategoryListDataInit = true; |
| 250 | this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPage(); | 162 | this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPage(); |
| 251 | this.checkDataReadyAndInitFocus(); | 163 | this.checkDataReadyAndInitFocus(); |
| 252 | this.changeEditorStatus(); | 164 | // this.changeEditorStatus(); |
| 253 | }); | 165 | }); |
| 254 | }, | 166 | }, |
| 255 | null, | 167 | null, |
| ... | @@ -259,23 +171,6 @@ cc.Class({ | ... | @@ -259,23 +171,6 @@ cc.Class({ |
| 259 | var self = this; | 171 | var self = this; |
| 260 | this._iShowCellRows = 2; | 172 | this._iShowCellRows = 2; |
| 261 | this._iCellCountEachRow = 3; | 173 | this._iCellCountEachRow = 3; |
| 262 | // lvCategoryList.setDataPositionRender(function (iPosition, iCount) { | ||
| 263 | // //这里是ListView的this 执行时作用域 | ||
| 264 | // let nodeDataPosition = self.node.getChildByName('DataPosition'); | ||
| 265 | // if (iCount == 0) { | ||
| 266 | // nodeDataPosition.getComponent(cc.Label).string = "1 / 1"; | ||
| 267 | // nodeDataPosition.x = Common.SCREEN_WIDTH / 2 - 70 - nodeDataPosition.width / 2; | ||
| 268 | // return; | ||
| 269 | // } | ||
| 270 | |||
| 271 | // if (null == iCount) { | ||
| 272 | // iCount = parseInt(nodeDataPosition.getComponent(cc.Label).string.split('/')[1]); | ||
| 273 | // cc.log(iCount); | ||
| 274 | // } | ||
| 275 | // nodeDataPosition.getComponent(cc.Label).string = Math.ceil(Math.min((iPosition + self._iShowCellRows * self._iCellCountEachRow - 1), iCount) / self._iShowCellRows / self._iCellCountEachRow) + " / " + Math.ceil(iCount / self._iShowCellRows / self._iCellCountEachRow); | ||
| 276 | // nodeDataPosition.x = Common.SCREEN_WIDTH / 2 - 70 - nodeDataPosition.width / 2; | ||
| 277 | // // this._compSceneCanvas.checkCountAndDisplayTopBtns(iCount); | ||
| 278 | // }); | ||
| 279 | }, | 174 | }, |
| 280 | 175 | ||
| 281 | /** | 176 | /** |
| ... | @@ -289,9 +184,11 @@ cc.Class({ | ... | @@ -289,9 +184,11 @@ cc.Class({ |
| 289 | if (this._bEditorStatus) { | 184 | if (this._bEditorStatus) { |
| 290 | fiFocusTarget = cc.find('BackEditorIcon', this.node).getComponent(FocusInfo); | 185 | fiFocusTarget = cc.find('BackEditorIcon', this.node).getComponent(FocusInfo); |
| 291 | cc.find('EditorIcon', this.node).getComponent(FocusInfo).setEnable(false); | 186 | cc.find('EditorIcon', this.node).getComponent(FocusInfo).setEnable(false); |
| 187 | cc.find('IndexIcon', this.node).getComponent(FocusInfo).setEnable(false); | ||
| 292 | cc.find('ClearIcon', this.node).getComponent(FocusInfo).setEnable(true); | 188 | cc.find('ClearIcon', this.node).getComponent(FocusInfo).setEnable(true); |
| 293 | cc.find('BackEditorIcon', this.node).getComponent(FocusInfo).setEnable(true); | 189 | cc.find('BackEditorIcon', this.node).getComponent(FocusInfo).setEnable(true); |
| 294 | cc.find('EditorIcon', this.node).opacity = 0; | 190 | cc.find('EditorIcon', this.node).opacity = 0; |
| 191 | cc.find('IndexIcon', this.node).opacity = 0; | ||
| 295 | cc.find('BackEditorIcon', this.node).opacity = 255; | 192 | cc.find('BackEditorIcon', this.node).opacity = 255; |
| 296 | cc.find('ClearIcon', this.node).opacity = 255; | 193 | cc.find('ClearIcon', this.node).opacity = 255; |
| 297 | // for (let i = 0; i < aNodeChildren.length; i++) { | 194 | // for (let i = 0; i < aNodeChildren.length; i++) { |
| ... | @@ -300,9 +197,11 @@ cc.Class({ | ... | @@ -300,9 +197,11 @@ cc.Class({ |
| 300 | } else { | 197 | } else { |
| 301 | fiFocusTarget = cc.find('EditorIcon', this.node).getComponent(FocusInfo); | 198 | fiFocusTarget = cc.find('EditorIcon', this.node).getComponent(FocusInfo); |
| 302 | cc.find('EditorIcon', this.node).getComponent(FocusInfo).setEnable(true); | 199 | cc.find('EditorIcon', this.node).getComponent(FocusInfo).setEnable(true); |
| 200 | cc.find('IndexIcon', this.node).getComponent(FocusInfo).setEnable(true); | ||
| 303 | cc.find('ClearIcon', this.node).getComponent(FocusInfo).setEnable(false); | 201 | cc.find('ClearIcon', this.node).getComponent(FocusInfo).setEnable(false); |
| 304 | cc.find('BackEditorIcon', this.node).getComponent(FocusInfo).setEnable(false); | 202 | cc.find('BackEditorIcon', this.node).getComponent(FocusInfo).setEnable(false); |
| 305 | cc.find('EditorIcon', this.node).opacity = 255; | 203 | cc.find('EditorIcon', this.node).opacity = 255; |
| 204 | cc.find('IndexIcon', this.node).opacity = 255; | ||
| 306 | cc.find('BackEditorIcon', this.node).opacity = 0; | 205 | cc.find('BackEditorIcon', this.node).opacity = 0; |
| 307 | cc.find('ClearIcon', this.node).opacity = 0; | 206 | cc.find('ClearIcon', this.node).opacity = 0; |
| 308 | // for (let i = 0; i < aNodeChildren.length; i++) { | 207 | // for (let i = 0; i < aNodeChildren.length; i++) { |
| ... | @@ -320,7 +219,7 @@ cc.Class({ | ... | @@ -320,7 +219,7 @@ cc.Class({ |
| 320 | 'view': "json", | 219 | 'view': "json", |
| 321 | "collectionId": this._iDefaultCollectionId, | 220 | "collectionId": this._iDefaultCollectionId, |
| 322 | 'mediaIds': id, | 221 | 'mediaIds': id, |
| 323 | "appId": this._aTypeAppId[this._oSceneContext._iCurrentTypeIndex], | 222 | // "appId": this._aTypeAppId[this._oSceneContext._iCurrentTypeIndex], |
| 324 | "token": Common.TEST_API_TOKEN, | 223 | "token": Common.TEST_API_TOKEN, |
| 325 | } | 224 | } |
| 326 | Network.ajax('GET', Common.TOPDRAW_API_SERVER + "User/RemoveMediaFromCollection", null, oRemoveProgramPara, | 225 | Network.ajax('GET', Common.TOPDRAW_API_SERVER + "User/RemoveMediaFromCollection", null, oRemoveProgramPara, |
| ... | @@ -353,15 +252,17 @@ cc.Class({ | ... | @@ -353,15 +252,17 @@ cc.Class({ |
| 353 | var oRemoveAllProgramPara = { | 252 | var oRemoveAllProgramPara = { |
| 354 | 'view': "json", | 253 | 'view': "json", |
| 355 | "collectionId": this._iDefaultCollectionId, | 254 | "collectionId": this._iDefaultCollectionId, |
| 356 | "appId": this._aTypeAppId[this._oSceneContext._iCurrentTypeIndex], | 255 | // "appId": this._aTypeAppId[this._oSceneContext._iCurrentTypeIndex], |
| 357 | "token": Common.TEST_API_TOKEN, | 256 | "token": Common.TEST_API_TOKEN_EDU, |
| 358 | } | 257 | } |
| 359 | Network.ajax('GET', Common.TOPDRAW_API_SERVER + "User/RemoveAllMediaFromCollection", null, oRemoveAllProgramPara, | 258 | Network.ajax('GET', Common.TOPDRAW_API_SERVER_EDU + "User/RemoveAllMediaFromCollection", null, oRemoveAllProgramPara, |
| 360 | function (strResponse) { | 259 | function (strResponse) { |
| 361 | try { | 260 | try { |
| 362 | var oJSONResult = JSON.parse(strResponse); | 261 | var oJSONResult = JSON.parse(strResponse); |
| 363 | if (oJSONResult.businessCode == 'success') { | 262 | if (oJSONResult.businessCode == 'success') { |
| 364 | cc.log("删除所有成功"); | 263 | cc.log("删除所有成功"); |
| 264 | let nodeContainer = cc.find('CategoryList/DataContainerMask/DataContainer', this.node); | ||
| 265 | nodeContainer.destroyAllChildren(); | ||
| 365 | this.getCategoryList(); | 266 | this.getCategoryList(); |
| 366 | cc.log("Success GET RemoveAllProgram..."); | 267 | cc.log("Success GET RemoveAllProgram..."); |
| 367 | } else { | 268 | } else { |
| ... | @@ -383,6 +284,7 @@ cc.Class({ | ... | @@ -383,6 +284,7 @@ cc.Class({ |
| 383 | this.initFocus(); | 284 | this.initFocus(); |
| 384 | // }, 0); | 285 | // }, 0); |
| 385 | this._bIsFocusInit = true; | 286 | this._bIsFocusInit = true; |
| 287 | this.changeEditorStatus(); | ||
| 386 | } | 288 | } |
| 387 | }, | 289 | }, |
| 388 | 290 | ||
| ... | @@ -425,8 +327,8 @@ cc.Class({ | ... | @@ -425,8 +327,8 @@ cc.Class({ |
| 425 | 327 | ||
| 426 | var fiIndex = this.spriteIndex.addComponent(FocusInfo); | 328 | var fiIndex = this.spriteIndex.addComponent(FocusInfo); |
| 427 | this._aFocusTargets[0]['to_home_index'] = this.spriteIndex; | 329 | this._aFocusTargets[0]['to_home_index'] = this.spriteIndex; |
| 428 | fiIndex.init(null, false); | 330 | fiIndex.init('{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneRecommend"}}]}', true); |
| 429 | 331 | ||
| 430 | // var nodeInitFocus = cc.find(this._oSceneContext.focusPath, this.node); | 332 | // var nodeInitFocus = cc.find(this._oSceneContext.focusPath, this.node); |
| 431 | var nodeInitFocus = cc.find("HistoryIcon", this.node); //从其他界面回退回来错乱,强制使用死路径 | 333 | var nodeInitFocus = cc.find("HistoryIcon", this.node); //从其他界面回退回来错乱,强制使用死路径 |
| 432 | var nodeFocus = new cc.Node('nodeFocus'); | 334 | var nodeFocus = new cc.Node('nodeFocus'); |
| ... | @@ -440,24 +342,6 @@ cc.Class({ | ... | @@ -440,24 +342,6 @@ cc.Class({ |
| 440 | nodeInitFocus.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 176, 64)); | 342 | nodeInitFocus.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 176, 64)); |
| 441 | }); | 343 | }); |
| 442 | } | 344 | } |
| 443 | // if (0 == nodeInitFocus.name.indexOf('TypeListCell')) { | ||
| 444 | // let iIndex = parseInt(nodeInitFocus.name.replace("TypeListCell", '')); | ||
| 445 | // if (this._oType[iIndex]) { | ||
| 446 | // Network.loadImageInNativeRuntime( | ||
| 447 | // Common.TOPDRAW_IMAGE_SERVER + this._oType[iIndex].image[0].fileUrl, | ||
| 448 | // function (texture) { | ||
| 449 | // let width = self._oType[iIndex].image[0].width; | ||
| 450 | // let height = self._oType[iIndex].image[0].height; | ||
| 451 | // nodeInitFocus.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, height / 2, width, height / 2)); | ||
| 452 | // }, null, this | ||
| 453 | // ); | ||
| 454 | // } | ||
| 455 | // } | ||
| 456 | |||
| 457 | // //处理焦点位于下方问题 | ||
| 458 | // if (this._oSceneContext.typeListY) { | ||
| 459 | // this._nodeTypeList.y = this._oSceneContext.typeListY; | ||
| 460 | // } | ||
| 461 | }, | 345 | }, |
| 462 | 346 | ||
| 463 | onKeyDown: function (event) { | 347 | onKeyDown: function (event) { |
| ... | @@ -479,10 +363,9 @@ cc.Class({ | ... | @@ -479,10 +363,9 @@ cc.Class({ |
| 479 | // return; | 363 | // return; |
| 480 | // } | 364 | // } |
| 481 | // } | 365 | // } |
| 482 | if (0 == this._fiCurrentFocus.node.getName().indexOf('DiaryListCell')) { | 366 | if (0 == this._fiCurrentFocus.node.getName().indexOf('OtherListCell')) { |
| 483 | var index = parseInt(this._fiCurrentFocus.node.getName().replace('DiaryListCell', '')); | 367 | var index = parseInt(this._fiCurrentFocus.node.getName().replace('OtherListCell', '')); |
| 484 | // cc.log("当前时多少条目:"+index); | 368 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); |
| 485 | let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); | ||
| 486 | if (lvCategoryList.scrollARowUp(index)) { | 369 | if (lvCategoryList.scrollARowUp(index)) { |
| 487 | return; | 370 | return; |
| 488 | } | 371 | } |
| ... | @@ -510,10 +393,9 @@ cc.Class({ | ... | @@ -510,10 +393,9 @@ cc.Class({ |
| 510 | // } | 393 | // } |
| 511 | // return; | 394 | // return; |
| 512 | // } | 395 | // } |
| 513 | if (0 == this._fiCurrentFocus.node.getName().indexOf('DiaryListCell')) { | 396 | if (0 == this._fiCurrentFocus.node.getName().indexOf('OtherListCell')) { |
| 514 | var index = parseInt(this._fiCurrentFocus.node.getName().replace('DiaryListCell', '')); | 397 | var index = parseInt(this._fiCurrentFocus.node.getName().replace('OtherListCell', '')); |
| 515 | // cc.log("CategoryList索引数:"+index); | 398 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); |
| 516 | let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); | ||
| 517 | if (lvCategoryList.scrollARowDown(null, index)) { | 399 | if (lvCategoryList.scrollARowDown(null, index)) { |
| 518 | // cc.log("line feed!"); | 400 | // cc.log("line feed!"); |
| 519 | return; | 401 | return; |
| ... | @@ -538,7 +420,8 @@ cc.Class({ | ... | @@ -538,7 +420,8 @@ cc.Class({ |
| 538 | if (event.keyCode == cc.macro.KEY.enter || event.keyCode == Common.ANDROID_KEY.enter) { | 420 | if (event.keyCode == cc.macro.KEY.enter || event.keyCode == Common.ANDROID_KEY.enter) { |
| 539 | if (0 == fiCurrentFocus.node.name.indexOf('EditorIcon') || 0 == fiCurrentFocus.node.name.indexOf('BackEditorIcon')) { | 421 | if (0 == fiCurrentFocus.node.name.indexOf('EditorIcon') || 0 == fiCurrentFocus.node.name.indexOf('BackEditorIcon')) { |
| 540 | this._bEditorStatus = !this._bEditorStatus; | 422 | this._bEditorStatus = !this._bEditorStatus; |
| 541 | this.getCategoryList(); | 423 | // this.getCategoryList(); |
| 424 | this.changeEditorStatus(); | ||
| 542 | } else if (0 == fiCurrentFocus.node.name.indexOf('DiaryListCell')) { //进入详情或删除该条目 | 425 | } else if (0 == fiCurrentFocus.node.name.indexOf('DiaryListCell')) { //进入详情或删除该条目 |
| 543 | if (this._bEditorStatus) { //删除 | 426 | if (this._bEditorStatus) { //删除 |
| 544 | this.requestRemoveProgram(); | 427 | this.requestRemoveProgram(); |
| ... | @@ -552,7 +435,7 @@ cc.Class({ | ... | @@ -552,7 +435,7 @@ cc.Class({ |
| 552 | } | 435 | } |
| 553 | } else if (this._bEditorStatus && 0 == fiCurrentFocus.node.name.indexOf('ClearIcon')) { //清空 | 436 | } else if (this._bEditorStatus && 0 == fiCurrentFocus.node.name.indexOf('ClearIcon')) { //清空 |
| 554 | this.requestRemoveAllProgram(); | 437 | this.requestRemoveAllProgram(); |
| 555 | } else if (0 == fiCurrentFocus.node.name.indexOf('HistoryIcon')) { //观看历史 | 438 | } else { //观看历史 |
| 556 | this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); | 439 | this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); |
| 557 | } | 440 | } |
| 558 | } | 441 | } |
| ... | @@ -565,85 +448,14 @@ cc.Class({ | ... | @@ -565,85 +448,14 @@ cc.Class({ |
| 565 | this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPage(); | 448 | this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPage(); |
| 566 | }, | 449 | }, |
| 567 | checkFocusTarget: function (fiFocusTarget, oScrollParameter) { | 450 | checkFocusTarget: function (fiFocusTarget, oScrollParameter) { |
| 568 | // if (0 == this._fiCurrentFocus.node.name.indexOf("TypeListCell") && 0 != fiFocusTarget.node.name.indexOf("TypeListCell")) { | 451 | |
| 569 | // if (!this._bIsCategoryListDataInit) { //滑动过快时_bIsCategoryListDataInit可能还未初始完成 | ||
| 570 | // return [null, oScrollParameter]; | ||
| 571 | // } | ||
| 572 | // } | ||
| 573 | // if (fiFocusTarget && 0 == fiFocusTarget.node.name.indexOf("TypeListCell")) { | ||
| 574 | // if (0 != this._fiCurrentFocus.node.name.indexOf("TypeListCell")) {//如果不是TypeList之间跳转,则哪里来回哪里去 | ||
| 575 | // fiFocusTarget = cc.find("TypeListCell" + this._oSceneContext._iCurrentTypeIndex, this._nodeTypeList).getComponent(FocusInfo); | ||
| 576 | // } else { | ||
| 577 | // let iIndex = parseInt(fiFocusTarget.node.name.replace(/TypeListCell/, '')); | ||
| 578 | // let iDirRate = null; | ||
| 579 | // if (-fiFocusTarget.node.y + fiFocusTarget.node.height / 2 - this._nodeTypeList.y >= this._nodeTypeListWrapper.height) { | ||
| 580 | // oScrollParameter = this._nodeTypeList.getComponent(TVScrollParameter); | ||
| 581 | // oScrollParameter.setHasRelation(true); | ||
| 582 | // oScrollParameter.setStep(-(-fiFocusTarget.node.y + fiFocusTarget.node.height / 2 + 1 - this._nodeTypeList.y) + this._nodeTypeListWrapper.height); | ||
| 583 | // oScrollParameter.setTargetPosition(this._nodeTypeList.y - oScrollParameter.getStep()); | ||
| 584 | // this._oSceneContext.typeListY = this._nodeTypeList.y - oScrollParameter.getStep(); | ||
| 585 | // iDirRate = 1; | ||
| 586 | // } | ||
| 587 | // if (-fiFocusTarget.node.y - this._nodeTypeList.y < 0) { | ||
| 588 | // oScrollParameter = this._nodeTypeList.getComponent(TVScrollParameter); | ||
| 589 | // oScrollParameter.setHasRelation(true); | ||
| 590 | // oScrollParameter.setStep(-fiFocusTarget.node.y - fiFocusTarget.node.height / 2 - this._nodeTypeList.y); | ||
| 591 | // oScrollParameter.setTargetPosition(this._nodeTypeList.y + oScrollParameter.getStep()); | ||
| 592 | // this._oSceneContext.typeListY = this._nodeTypeList.y + oScrollParameter.getStep(); | ||
| 593 | // iDirRate = -1; | ||
| 594 | // } | ||
| 595 | // if (iDirRate) { | ||
| 596 | // if (this._nodeTypeList.y + iDirRate * (this._nodeTypeHeight + 5) >= (this._aTypeAppId.length - this.TYPE_LIST_CELL_SIZE) * (this._nodeTypeHeight + 5) - 5) {//减5没有多大的意思,因为.y是有误差的 | ||
| 597 | // cc.find("TypeListArea/Down", this.node).opacity = 0; | ||
| 598 | // } else { | ||
| 599 | // cc.find("TypeListArea/Down", this.node).opacity = 255; | ||
| 600 | // } | ||
| 601 | // if (this._nodeTypeList.y + iDirRate * (this._nodeTypeHeight + 1) <= 5) { | ||
| 602 | // cc.find('TypeListArea/Up', this.node).opacity = 0; | ||
| 603 | // } else { | ||
| 604 | // cc.find('TypeListArea/Up', this.node).opacity = 255; | ||
| 605 | // } | ||
| 606 | // } | ||
| 607 | // } | ||
| 608 | // } | ||
| 609 | |||
| 610 | return [fiFocusTarget, oScrollParameter]; | 452 | return [fiFocusTarget, oScrollParameter]; |
| 611 | }, | 453 | }, |
| 612 | 454 | ||
| 613 | onBeforeFocusChange: function (event) { | 455 | onBeforeFocusChange: function (event) { |
| 614 | let fiFrom = event.detail.from; | 456 | let fiFrom = event.detail.from; |
| 615 | let fiTo = event.detail.to; | 457 | let fiTo = event.detail.to; |
| 616 | // if (0 == fiFrom.node.getName().indexOf('DiaryListCell')) { | 458 | |
| 617 | // cc.loader.loadRes('texture/ui/delete', cc.Texture2D, function (err, texture) { | ||
| 618 | // cc.find('GrayMask/DeleteButton', fiFrom.node).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 122, 122)); | ||
| 619 | // }); | ||
| 620 | // // cc.find('GrayMask/DeleteButton', fiFrom.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 122, 122)); | ||
| 621 | |||
| 622 | // fiFrom.node.getComponent(ListCell).setUIWithoutFocus(); | ||
| 623 | // } | ||
| 624 | |||
| 625 | // if (0 == fiFrom.node.getName().indexOf('TypeListCell')) { | ||
| 626 | // var self = this; | ||
| 627 | // let iIndex = fiFrom.node.name.replace("TypeListCell", ''); | ||
| 628 | // if (0 == fiTo.node.getName().indexOf('TypeListCell')) { | ||
| 629 | // if (this._oType[iIndex]) { | ||
| 630 | // let width = self._oType[iIndex].image[0].width; | ||
| 631 | // let height = self._oType[iIndex].image[0].height / 2; | ||
| 632 | // Network.loadImageInNativeRuntime( | ||
| 633 | // Common.TOPDRAW_IMAGE_SERVER + self._oType[iIndex].image[0].fileUrl, | ||
| 634 | // function (texture) { | ||
| 635 | // fiFrom.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, width, height)); | ||
| 636 | // }, null, this | ||
| 637 | // ); | ||
| 638 | // } | ||
| 639 | // } | ||
| 640 | // } | ||
| 641 | |||
| 642 | // if (0 == fiFrom.node.getName().indexOf('HistoryIcon') || 0 == fiFrom.node.getName().indexOf('EditorIcon') | ||
| 643 | // || 0 == fiFrom.node.getName().indexOf('ClearIcon') || 0 == fiFrom.node.getName().indexOf('BackEditorIcon')) { // | ||
| 644 | // fiFrom.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height)); | ||
| 645 | // } | ||
| 646 | |||
| 647 | if (0 == fiFrom.node.getName().indexOf('HistoryIcon')) { | 459 | if (0 == fiFrom.node.getName().indexOf('HistoryIcon')) { |
| 648 | cc.loader.loadRes('button/history_button', cc.Texture2D, function (err, texture) { | 460 | cc.loader.loadRes('button/history_button', cc.Texture2D, function (err, texture) { |
| 649 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 176, 64)); | 461 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 176, 64)); |
| ... | @@ -673,38 +485,7 @@ cc.Class({ | ... | @@ -673,38 +485,7 @@ cc.Class({ |
| 673 | 485 | ||
| 674 | onAfterFocusChange: function (event) { | 486 | onAfterFocusChange: function (event) { |
| 675 | let fiTo = event.detail.to; | 487 | let fiTo = event.detail.to; |
| 676 | // if (0 == fiTo.node.getName().indexOf('DiaryListCell')) { | 488 | |
| 677 | // cc.loader.loadRes('texture/ui/delete', cc.Texture2D, function (err, texture) { | ||
| 678 | // cc.find('GrayMask/DeleteButton', fiTo.node).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 122, 122, 122)); | ||
| 679 | // }); | ||
| 680 | // // cc.find('GrayMask/DeleteButton', fiTo.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 122, 122, 122)); | ||
| 681 | |||
| 682 | // fiTo.node.getComponent(ListCell).setUIWithFocus(); | ||
| 683 | // } | ||
| 684 | |||
| 685 | // if (0 == fiTo.node.getName().indexOf('TypeListCell')) { | ||
| 686 | // var self = this; | ||
| 687 | // let iIndex = fiTo.node.name.replace("TypeListCell", ''); | ||
| 688 | // if (this._oType[iIndex]) { | ||
| 689 | // let width = self._oType[iIndex].image[0].width; | ||
| 690 | // let height = self._oType[iIndex].image[0].height / 2; | ||
| 691 | // Network.loadImageInNativeRuntime( | ||
| 692 | // Common.TOPDRAW_IMAGE_SERVER + self._oType[iIndex].image[0].fileUrl, | ||
| 693 | // function (texture) { | ||
| 694 | // fiTo.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, height, width, height)); | ||
| 695 | // }, null, this | ||
| 696 | // ); | ||
| 697 | // } | ||
| 698 | // this._oSceneContext._iCurrentTypeIndex = iIndex; | ||
| 699 | // this.scheduleOnce(this.getDefaultCollection, 1); | ||
| 700 | // this._bIsCategoryListDataInit = false; //初始化它 | ||
| 701 | // } | ||
| 702 | |||
| 703 | // if (0 == fiTo.node.getName().indexOf('HistoryIcon') || 0 == fiTo.node.getName().indexOf('EditorIcon') | ||
| 704 | // || 0 == fiTo.node.getName().indexOf('ClearIcon') || 0 == fiTo.node.getName().indexOf('BackEditorIcon')) { // | ||
| 705 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); | ||
| 706 | // } | ||
| 707 | |||
| 708 | if (0 == fiTo.node.getName().indexOf('HistoryIcon')) { | 489 | if (0 == fiTo.node.getName().indexOf('HistoryIcon')) { |
| 709 | cc.loader.loadRes('button/history_button', cc.Texture2D, function (err, texture) { | 490 | cc.loader.loadRes('button/history_button', cc.Texture2D, function (err, texture) { |
| 710 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 176, 64)); | 491 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 176, 64)); | ... | ... |
| 1 | //观看历史 | 1 | //日记(我的收藏) |
| 2 | //这里跳转地址是由返回数据指定,暂未实现 | 2 | //这里跳转地址是由返回数据指定,暂未实现 |
| 3 | //这里获取CategoryList数据的接口有问题 | ||
| 4 | //正常接口不管limit字段多少返回的count都是总数据量,这里只返回了limit的数量,导致CategoryList刷新出错!!! | ||
| 5 | var Common = require('Common'); | 3 | var Common = require('Common'); |
| 6 | var Network = require('Network'); | 4 | var Network = require('Network'); |
| 7 | var TVFocus = require('TVFocus'); | 5 | var TVFocus = require('TVFocus'); |
| ... | @@ -10,63 +8,33 @@ var TVCanvas = require('TVCanvas'); | ... | @@ -10,63 +8,33 @@ var TVCanvas = require('TVCanvas'); |
| 10 | var TVScrollParameter = require('TVScrollParameter'); | 8 | var TVScrollParameter = require('TVScrollParameter'); |
| 11 | var ListView = require('ListView'); | 9 | var ListView = require('ListView'); |
| 12 | var ListCell = require('ListCell'); | 10 | var ListCell = require('ListCell'); |
| 13 | var Utils = require('Utils'); | ||
| 14 | var BusinessParameter = require('BusinessParameter'); | ||
| 15 | 11 | ||
| 16 | cc.Class({ | 12 | cc.Class({ |
| 17 | extends: TVCanvas, | 13 | extends: TVCanvas, |
| 18 | 14 | ||
| 19 | properties: { | 15 | properties: { |
| 20 | spriteScrollBarBlock: cc.Sprite, | 16 | spriteCollect: cc.Sprite, |
| 21 | spriteScrollBarUp: cc.Sprite, | 17 | spriteEditor: cc.Sprite, |
| 22 | spriteScrollBarDown: cc.Sprite, | 18 | spriteClear: cc.Sprite, |
| 19 | spriteBackEditor: cc.Sprite, | ||
| 20 | spriteIndex: cc.Sprite, | ||
| 23 | _bPfbTypeCellInit: false, | 21 | _bPfbTypeCellInit: false, |
| 24 | _aTypeAppId: [], | 22 | _aTypeAppId: [], |
| 25 | _aTypeUrl: [], | ||
| 26 | _aNavList: [], | ||
| 27 | _nodeTypeHeight: 0, | 23 | _nodeTypeHeight: 0, |
| 28 | TYPE_LIST_CELL_SIZE: 4, | 24 | TYPE_LIST_CELL_SIZE: 4, |
| 29 | |||
| 30 | _strAppId: '', //为了跳播放 | ||
| 31 | _strDirURL: '', | ||
| 32 | _oDestURL: null, | ||
| 33 | _strIndexURL: '', | ||
| 34 | _strIconSrc: '', | ||
| 35 | _iCollectionId: 0,//默认收藏夹的id | ||
| 36 | _aEpisodeIndex: [],//剧集index集合 | ||
| 37 | _strPageIds: '', //页面内mediaId | ||
| 38 | _bIsContentWStatus: true,//海报图状态,true为横图,false为竖图 | ||
| 39 | |||
| 40 | _bIsCategoryListDataInit: false, | 25 | _bIsCategoryListDataInit: false, |
| 41 | // _iCurrentTypeIndex: 0, | 26 | // _iCurrentTypeIndex: 0, |
| 42 | _strIds: '', | ||
| 43 | _oType: null, | ||
| 44 | |||
| 45 | _aCategoryMediaId: [], | ||
| 46 | _aCategoryAlreadyMediaId: [], | ||
| 47 | |||
| 48 | _bBackStatus: false, | ||
| 49 | 27 | ||
| 50 | // PFB_TYPE: { | 28 | _iDefaultCollectionId: 0, |
| 51 | // default: null, | 29 | _bEditorStatus: false, |
| 52 | // type: cc.Prefab, | 30 | _oType: null, |
| 53 | // }, | 31 | _aNavList: [], //存储跳转需要的参数,appId,url... |
| 32 | _strAppId: '', | ||
| 54 | }, | 33 | }, |
| 55 | 34 | ||
| 56 | onLoad: function () { | 35 | onLoad: function () { |
| 57 | this._super(); | 36 | this._super(); |
| 58 | 37 | ||
| 59 | this._iShowCellRows = 3; | ||
| 60 | this._iAlphaCellRows = 0; | ||
| 61 | this._iHiddenCellRows = 3; | ||
| 62 | this._iCellCountEachRow = 2; | ||
| 63 | this._iBeginPositionX = -200; | ||
| 64 | this._iBeginPositionY = 210; | ||
| 65 | this._fCellMarginTop = 20; | ||
| 66 | this._fCellMarginRight = 15; | ||
| 67 | this._fCellMarginBottom = 10; | ||
| 68 | this._fCellMarginLeft = 0; | ||
| 69 | |||
| 70 | //-----------上下文及参数相关处理------------ | 38 | //-----------上下文及参数相关处理------------ |
| 71 | let oSceneParameter = this._cApplication.getTopSceneParameter(); | 39 | let oSceneParameter = this._cApplication.getTopSceneParameter(); |
| 72 | if (oSceneParameter) { | 40 | if (oSceneParameter) { |
| ... | @@ -76,13 +44,12 @@ cc.Class({ | ... | @@ -76,13 +44,12 @@ cc.Class({ |
| 76 | if (this._cApplication.getBackStatus()) { | 44 | if (this._cApplication.getBackStatus()) { |
| 77 | this._oSceneContext = this._cApplication.popSceneContext(); | 45 | this._oSceneContext = this._cApplication.popSceneContext(); |
| 78 | this._cApplication.setBackStatus(false); | 46 | this._cApplication.setBackStatus(false); |
| 79 | this._bBackStatus = true; | ||
| 80 | } else { | 47 | } else { |
| 81 | this._oSceneContext = {}; | 48 | this._oSceneContext = {}; |
| 82 | this._oSceneContext.requestedTypeId = null; | 49 | this._oSceneContext.requestedTypeId = null; |
| 83 | this._oSceneContext._iCurrentTypeIndex = 0; | 50 | this._oSceneContext._iCurrentTypeIndex = 0; |
| 84 | this._oSceneContext.categoryRecordIndexOfFirstCell = 0; | 51 | this._oSceneContext.categoryRecordIndexOfFirstCell = 0; |
| 85 | this._oSceneContext.focusPath = "CollectionIcon"; | 52 | this._oSceneContext.focusPath = "TypeListArea/TypeListWrapper/TypeList/TypeListCell0"; |
| 86 | this._oSceneContext.typeListY = 0; | 53 | this._oSceneContext.typeListY = 0; |
| 87 | // this._oSceneContext.elderTypeId = oSceneParameter.elderTypeId || 37; //从上级拿过来的二级父Id | 54 | // this._oSceneContext.elderTypeId = oSceneParameter.elderTypeId || 37; //从上级拿过来的二级父Id |
| 88 | } | 55 | } |
| ... | @@ -90,169 +57,22 @@ cc.Class({ | ... | @@ -90,169 +57,22 @@ cc.Class({ |
| 90 | this._strAppId = this._strAppId || "tda7e47f868313d9f5"; //测试 | 57 | this._strAppId = this._strAppId || "tda7e47f868313d9f5"; //测试 |
| 91 | //---------上下文及参数相关处理结束----------- | 58 | //---------上下文及参数相关处理结束----------- |
| 92 | 59 | ||
| 93 | //左分类框框 | 60 | // this.spriteHistory.spriteFrame.setRect(cc.rect(0, 0, 176, 64)); |
| 94 | this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node); | 61 | this.spriteCollect.spriteFrame.setRect(cc.rect(0, 0, 176, 64)); |
| 95 | this._nodeTypeList = cc.find("TypeList", this._nodeTypeListWrapper); | 62 | this.spriteEditor.spriteFrame.setRect(cc.rect(0, 0, 137, 65)); |
| 96 | this._nodeTypeList.addComponent(TVScrollParameter); | 63 | this.spriteClear.spriteFrame.setRect(cc.rect(0, 0, 137, 65)); |
| 97 | 64 | this.spriteBackEditor.spriteFrame.setRect(cc.rect(0, 0, 137, 65)); | |
| 98 | // //右分类框框 | 65 | this.spriteIndex.spriteFrame.setRect(cc.rect(0, 0, 137, 65)); |
| 99 | this._nodeCategoryList = cc.find("CategoryList", this.node); | ||
| 100 | |||
| 101 | // cc.find("HistoryIcon", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 102 | cc.find("CollectionIcon", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 176, 64)); | ||
| 103 | cc.find("EditorSprite", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 137, 64)); | ||
| 104 | cc.find("IndexSprite", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 137, 64)); | ||
| 105 | |||
| 106 | //滚动条按钮 | ||
| 107 | let nodeScrollBtn = cc.find("CategoryList/ScrollBarContainer/ScrollBarShadow/ScrollBarBlock", this.node); | ||
| 108 | var fiScrollBtn = nodeScrollBtn.addComponent(FocusInfo); | ||
| 109 | this._aFocusTargets[0]['scroll_bar_block'] = nodeScrollBtn; | ||
| 110 | fiScrollBtn.init(null, true); | ||
| 111 | 66 | ||
| 112 | this.getPageBg(this, 'background'); | 67 | this.getPageBg(this, 'background'); |
| 113 | // this.addHomeIcon(this); | ||
| 114 | // this.getTypeList(); //暂时不要Type | ||
| 115 | this.getListBookmark(); //直接请求 | 68 | this.getListBookmark(); //直接请求 |
| 116 | this.checkDataReadyAndInitFocus(); //初始化焦点放到这里 | 69 | this.getDefaultCollection(); //删除所有条目用的 |
| 117 | }, | 70 | }, |
| 118 | 71 | ||
| 119 | // getTypeList: function () { | ||
| 120 | // let oTypeRequestParameters = { | ||
| 121 | // "view": "json", | ||
| 122 | // "start": 0, | ||
| 123 | // "limit": 100, | ||
| 124 | // "name": "indexHistoryNew", | ||
| 125 | // "sortField": "left", | ||
| 126 | // "sortDirection": "desc", | ||
| 127 | // "token": Common.TEST_API_TOKEN, | ||
| 128 | // }; | ||
| 129 | // Network.ajax('GET', Common.TOPDRAW_API_SERVER + "Promotion/ListItemByName", null, oTypeRequestParameters, | ||
| 130 | // function (strResponse) { | ||
| 131 | // try { | ||
| 132 | // var oJSONResult = JSON.parse(strResponse); | ||
| 133 | // if (oJSONResult.businessCode == 'success') { | ||
| 134 | // if (oJSONResult.resultSet.length > 0) { | ||
| 135 | // this._oType = []; | ||
| 136 | // this._aNavList = []; | ||
| 137 | // cc.loader.setAutoReleaseRecursively(this.PFB_TYPE, true); //设置允许自动释放 | ||
| 138 | // for (var i = 0; i < oJSONResult.resultSet.length; i++) { | ||
| 139 | // let oTvlink = JSON.parse(oJSONResult.resultSet[i].tvlink); | ||
| 140 | // let oListCell = {}; | ||
| 141 | // let jaClick = oTvlink.click; | ||
| 142 | // let oParameters = null | ||
| 143 | // for (let i = 0; i < jaClick.length; i++) { | ||
| 144 | // oParameters = jaClick[i].parameters; | ||
| 145 | // } | ||
| 146 | // oListCell.appId = oParameters.appId; | ||
| 147 | |||
| 148 | // this._aNavList.push(oListCell); | ||
| 149 | // this._aTypeAppId.push(oParameters.appId); //拿到appId并保存到_aTypeAppId | ||
| 150 | // this._oType.push(oJSONResult.resultSet[i]); | ||
| 151 | // //恢复上下文带过来的位置 | ||
| 152 | // // if (this._oSceneContext.requestedTypeId && this._oSceneContext.requestedTypeId == oJSONResult.resultSet[i].id) { | ||
| 153 | // // this._iCurrentTypeIndex = i; | ||
| 154 | // // } | ||
| 155 | // let nodeTypeListCell = cc.instantiate(this.PFB_TYPE); | ||
| 156 | // nodeTypeListCell.y = -nodeTypeListCell.height / 2 - i * (nodeTypeListCell.height + 27) - 10; | ||
| 157 | // this._nodeTypeList.addChild(nodeTypeListCell, 10, "TypeListCell" + i); | ||
| 158 | // //准备焦点坐标 | ||
| 159 | // let fiTypeBlock = nodeTypeListCell.addComponent(FocusInfo); | ||
| 160 | // fiTypeBlock.init( | ||
| 161 | // '', | ||
| 162 | // true, null, null, 1.15 | ||
| 163 | // ); | ||
| 164 | // this._aFocusTargets[0]['type_list_cell_' + i] = nodeTypeListCell; | ||
| 165 | // if (oJSONResult.resultSet[i].image[0]) { | ||
| 166 | // let width = oJSONResult.resultSet[i].image[0].width; | ||
| 167 | // let height = oJSONResult.resultSet[i].image[0].height / 2; | ||
| 168 | // nodeTypeListCell.width = width; | ||
| 169 | // nodeTypeListCell.height = height; | ||
| 170 | // this._nodeTypeHeight = height; | ||
| 171 | // if (this._oSceneContext._iCurrentTypeIndex == i) { | ||
| 172 | // Network.loadImageInNativeRuntime( | ||
| 173 | // Common.TOPDRAW_IMAGE_SERVER + oJSONResult.resultSet[i].image[0].fileUrl, | ||
| 174 | // function (texture) { | ||
| 175 | // cc.find('Bg', nodeTypeListCell).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, height, width, height)); | ||
| 176 | // }, null, this | ||
| 177 | // ); | ||
| 178 | // } else { | ||
| 179 | // Network.loadImageInNativeRuntime( | ||
| 180 | // Common.TOPDRAW_IMAGE_SERVER + oJSONResult.resultSet[i].image[0].fileUrl, | ||
| 181 | // function (texture) { | ||
| 182 | // cc.find('Bg', nodeTypeListCell).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, width, height)); | ||
| 183 | // }, null, this | ||
| 184 | // ); | ||
| 185 | // } | ||
| 186 | // } | ||
| 187 | // } | ||
| 188 | // this._oSceneContext.requestedTypeId = this._aTypeAppId[this._oSceneContext._iCurrentTypeIndex]; | ||
| 189 | // this.getCollectionId(); | ||
| 190 | |||
| 191 | // this._bInitTypeListSuccess = true; | ||
| 192 | // this.checkDataReadyAndInitFocus(); //初始化焦点放到这里 | ||
| 193 | // } else { | ||
| 194 | // this._oSceneContext.focusPath = "app"; | ||
| 195 | // } | ||
| 196 | // cc.log("Success GET TYPE LIST..."); | ||
| 197 | // } else { | ||
| 198 | // cc.log("Error GET TYPE LIST..." + oJSONResult.description); | ||
| 199 | // } | ||
| 200 | // } catch (error) { | ||
| 201 | // cc.log("Exception GET TYPE LIST..." + error); | ||
| 202 | // } | ||
| 203 | // }, | ||
| 204 | // function (strResponse) { | ||
| 205 | // cc.log("Communication Error : Get Type List Information..." + strResponse + "\r\n"); | ||
| 206 | // }, this, "uuid" | ||
| 207 | // ); | ||
| 208 | // }, | ||
| 209 | |||
| 210 | // //获取当前的appId等相关的信息 | ||
| 211 | // getCollectionId: function () { | ||
| 212 | // this._strAppId = this._aNavList[this._oSceneContext._iCurrentTypeIndex].appId; | ||
| 213 | // this._strDirURL = this._aNavList[this._oSceneContext._iCurrentTypeIndex].dirURL; | ||
| 214 | // this._oDestURL = this._aNavList[this._oSceneContext._iCurrentTypeIndex].destURL; | ||
| 215 | // this._strIndexURL = this._aNavList[this._oSceneContext._iCurrentTypeIndex].indexURL; | ||
| 216 | // var oGetDefaultCollectionPara = { | ||
| 217 | // 'view': "json", | ||
| 218 | // 'appId': this._strAppId, | ||
| 219 | // "token": Common.TEST_API_TOKEN, | ||
| 220 | // }; | ||
| 221 | // Network.ajax('GET', Common.TOPDRAW_API_SERVER + "User/GetDefaultCollection", null, oGetDefaultCollectionPara, | ||
| 222 | // function (strResponse) { | ||
| 223 | // try { | ||
| 224 | // var oJSONResult = JSON.parse(strResponse); | ||
| 225 | // // var strBlank = '{"businessCode":"success","count":0,"currentTime":1542195457309,"description":"","resultSet":[]}'; | ||
| 226 | // if (oJSONResult.businessCode == 'success') { | ||
| 227 | // this._iCollectionId = oJSONResult.resultSet[0].id; //获取默认收藏id | ||
| 228 | // // if (this._strAppId == BusinessParameter.CARTOON_APPID) { //动漫 | ||
| 229 | // // this._bIsContentWStatus = false; //竖图 | ||
| 230 | // // // this._nodeCategoryList.getComponents(ListView)[1].renderInitData(strBlank); //另一个置空 | ||
| 231 | // // // this.lvCategoryList = this._nodeCategoryList.getComponents(ListView)[0]; | ||
| 232 | // // } else { //横图 | ||
| 233 | // // this._bIsCategoryListDataInit = true; | ||
| 234 | // // // this._nodeCategoryList.getComponents(ListView)[0].renderInitData(strBlank); | ||
| 235 | // // // this.lvCategoryList = this._nodeCategoryList.getComponents(ListView)[1]; | ||
| 236 | // // } | ||
| 237 | |||
| 238 | // this.getListBookmark(); | ||
| 239 | // cc.log("Success GET GetDefaultCollection..."); | ||
| 240 | // } else { | ||
| 241 | // cc.log("Error GET GetDefaultCollection..." + oJSONResult.description); | ||
| 242 | // } | ||
| 243 | // } catch (error) { | ||
| 244 | // cc.log("Exception GET GetDefaultCollection..." + error); | ||
| 245 | // } | ||
| 246 | // }, | ||
| 247 | // function (strResponse) { | ||
| 248 | // cc.log("Communication Error : Get GetDefaultCollection Information..." + strResponse + "\r\n"); | ||
| 249 | // }, this, "uuid" | ||
| 250 | // ); | ||
| 251 | // }, | ||
| 252 | 72 | ||
| 253 | /** | 73 | /** |
| 254 | * 拿到列表需要的ids | 74 | * 拿到列表需要的ids |
| 255 | */ | 75 | */ |
| 256 | getListBookmark: function () { | 76 | getListBookmark: function () { |
| 257 | let oTypeRequestParameters = { | 77 | let oTypeRequestParameters = { |
| 258 | "view": "json", | 78 | "view": "json", |
| ... | @@ -300,30 +120,48 @@ cc.Class({ | ... | @@ -300,30 +120,48 @@ cc.Class({ |
| 300 | ); | 120 | ); |
| 301 | }, | 121 | }, |
| 302 | 122 | ||
| 123 | /** | ||
| 124 | * 用当前typeid拿到id | ||
| 125 | */ | ||
| 126 | getDefaultCollection: function () { | ||
| 127 | // this._strAppId = this._aNavList[this._oSceneContext._iCurrentTypeIndex].appId; | ||
| 128 | let oDefaultCollectionParameters = { | ||
| 129 | "view": "json", | ||
| 130 | // "appId": this._aTypeAppId[this._oSceneContext._iCurrentTypeIndex], | ||
| 131 | "token": Common.TEST_API_TOKEN_EDU, | ||
| 132 | }; | ||
| 133 | Network.ajax('GET', Common.TOPDRAW_API_SERVER_EDU + "User/GetDefaultCollection", null, oDefaultCollectionParameters, | ||
| 134 | function (strResponse) { | ||
| 135 | try { | ||
| 136 | var oJSONResult = JSON.parse(strResponse); | ||
| 137 | if (oJSONResult.businessCode == 'success') { | ||
| 138 | if (oJSONResult.resultSet.length > 0) { | ||
| 139 | this._iDefaultCollectionId = oJSONResult.resultSet[0].id; | ||
| 140 | // this.getCategoryList(); | ||
| 141 | } else { | ||
| 142 | this._oSceneContext.focusPath = "app"; | ||
| 143 | } | ||
| 144 | cc.log("Success GET DefaultCollection..."); | ||
| 145 | } else { | ||
| 146 | cc.log("Error GET DefaultCollection..." + oJSONResult.description); | ||
| 147 | } | ||
| 148 | } catch (error) { | ||
| 149 | cc.log("Exception GET DefaultCollection..." + error); | ||
| 150 | } | ||
| 151 | }, | ||
| 152 | function (strResponse) { | ||
| 153 | cc.log("Communication Error : Get DefaultCollection Information..." + strResponse + "\r\n"); | ||
| 154 | }, this, "uuid" | ||
| 155 | ); | ||
| 156 | }, | ||
| 157 | |||
| 158 | |||
| 303 | getCategoryList: function () { | 159 | getCategoryList: function () { |
| 304 | //把之前的东西删掉 | 160 | //把之前的东西删掉 |
| 305 | let nodeCategoryList = this.node.getChildByName('CategoryList'); | 161 | let nodeCategoryList = this.node.getChildByName('CategoryList'); |
| 306 | // nodeCategoryList.getChildByName('DataContainerMask').getChildByName('DataContainer').removeAllChildren(); | 162 | // nodeCategoryList.getChildByName('DataContainerMask').getChildByName('DataContainer').removeAllChildren(); |
| 307 | nodeCategoryList.getChildByName('DataContainerMask').getChildByName('DataContainer').destroyAllChildren(); | 163 | nodeCategoryList.getChildByName('DataContainerMask').getChildByName('DataContainer').destroyAllChildren(); |
| 308 | 164 | ||
| 309 | // let strAppId = this._aTypeAppId[this._oSceneContext._iCurrentTypeIndex]; | ||
| 310 | // switch (strAppId) { | ||
| 311 | // case BusinessParameter.CARTOON_APPID: | ||
| 312 | // this._oSceneContext.focusPath = this._oSceneContext.focusPath || "SongList/DataContainerMask/DataContainer/ListCell0/SongTitleContainer"; | ||
| 313 | // this._strSongListCellComponentName = "HistoryCartoonListCell"; | ||
| 314 | // this._iBeginPositionX = -250; | ||
| 315 | // this._iBeginPositionY = 200; | ||
| 316 | // this._iShowCellRows = 2; | ||
| 317 | // this._iAlphaCellRows = 0; | ||
| 318 | // this._iHiddenCellRows = 2; | ||
| 319 | // this._iCellCountEachRow = 3; | ||
| 320 | // this._fCellMarginTop = 0; | ||
| 321 | // this._fCellMarginRight = 53; | ||
| 322 | // this._fCellMarginBottom = 15; | ||
| 323 | // this._fCellMarginLeft = 0; | ||
| 324 | // break; | ||
| 325 | // default: | ||
| 326 | // // this._oSceneContext.focusPath = this._oSceneContext.focusPath || "SongList/DataContainerMask/DataContainer/ListCell0/ImageBlock"; | ||
| 327 | this._strSongListCellComponentName = "HistoryOtherListCell"; | 165 | this._strSongListCellComponentName = "HistoryOtherListCell"; |
| 328 | this._iBeginPositionX = -450; | 166 | this._iBeginPositionX = -450; |
| 329 | this._iBeginPositionY = 250; | 167 | this._iBeginPositionY = 250; |
| ... | @@ -393,197 +231,128 @@ cc.Class({ | ... | @@ -393,197 +231,128 @@ cc.Class({ |
| 393 | ); | 231 | ); |
| 394 | } | 232 | } |
| 395 | ); | 233 | ); |
| 396 | |||
| 397 | // var self = this; | ||
| 398 | |||
| 399 | // lvCategoryList.setDataDecorator( | ||
| 400 | // function (oData, onDecorate, oScope) { | ||
| 401 | // let oCollectionRequestParameters = { | ||
| 402 | // "view": "json", | ||
| 403 | // "mediaIds": "", | ||
| 404 | // "needCollection": 1, | ||
| 405 | // "start": 0, | ||
| 406 | // "limit": 0, | ||
| 407 | // "appId": self._strAppId, | ||
| 408 | // "token": Common.TEST_API_TOKEN, | ||
| 409 | // }; | ||
| 410 | |||
| 411 | // let aData = oData.refData; | ||
| 412 | |||
| 413 | // //造一个跳转tvlink | ||
| 414 | // for (let i = 0; i < aData.length; i++) { | ||
| 415 | // //造一个跳转界面 | ||
| 416 | // let tvlink = ''; | ||
| 417 | // if (aData[i].type == 4) { | ||
| 418 | // tvlink = '{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneProgramPlayerFullScreen",\ | ||
| 419 | // "appId":"' + self._strAppId + '","id":"' + aData[i].id + '","episodeNum":"' + aData[i].episode_number + '"}}]}'; | ||
| 420 | // } else { | ||
| 421 | // tvlink = '{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneProgramPlayerFullScreen",\ | ||
| 422 | // "appId":"' + self._strAppId + '","id":"' + aData[i].id + '"}}]}'; | ||
| 423 | // } | ||
| 424 | // aData[i].tvlink = tvlink; | ||
| 425 | // } | ||
| 426 | |||
| 427 | // for (let i = 0; i < aData.length; i++) { | ||
| 428 | // oCollectionRequestParameters.mediaIds += (aData[i].id + ','); | ||
| 429 | // } | ||
| 430 | // oCollectionRequestParameters.limit = aData.length; | ||
| 431 | // oCollectionRequestParameters.mediaIds = oCollectionRequestParameters.mediaIds.substring(0, oCollectionRequestParameters.mediaIds.length - 1); | ||
| 432 | |||
| 433 | // // if (this._strAppId != BusinessParameter.CARTOON_APPID) { //刨去动漫,动漫没有收藏选项 | ||
| 434 | // // Network.ajax('GET', Common.TOPDRAW_API_SERVER + "User/ListMediaAdditional", null, oCollectionRequestParameters, | ||
| 435 | // // function (strResponse) { | ||
| 436 | // // try { | ||
| 437 | // // var oJSONResult = JSON.parse(strResponse); | ||
| 438 | // // if (oJSONResult.businessCode == 'success') { | ||
| 439 | // // self._aCategoryAlreadyMediaId = []; | ||
| 440 | // // for (var i = 0; i < oJSONResult.resultSet[0].collections.length; i++) { | ||
| 441 | // // var mediaId = oJSONResult.resultSet[0].collections[i].media_id; | ||
| 442 | // // for (let i = 0; i < aData.length; i++) { | ||
| 443 | // // // cc.log("tvlink--------------------->" + aData[i].tvlink); | ||
| 444 | // // if (aData[i].id == mediaId) { //检测是否收藏 | ||
| 445 | // // aData[i].isCollect = true; //将已收藏的插进去 | ||
| 446 | // // } | ||
| 447 | // // } | ||
| 448 | // // } | ||
| 449 | |||
| 450 | // // if (onDecorate) { | ||
| 451 | // // if (null != oScope) { | ||
| 452 | // // onDecorate.call(oScope, aData); | ||
| 453 | // // } else { | ||
| 454 | // // onDecorate(aData); | ||
| 455 | // // } | ||
| 456 | // // } | ||
| 457 | |||
| 458 | // // cc.log("Success GET MediaAdditinal..."); | ||
| 459 | // // } else { | ||
| 460 | // // cc.log("Error GET MediaAdditinal..." + oJSONResult.description); | ||
| 461 | // // } | ||
| 462 | // // } catch (error) { | ||
| 463 | // // cc.log("Exception GET MediaAdditinal..." + error); | ||
| 464 | // // } | ||
| 465 | // // }, | ||
| 466 | // // function (strResponse) { | ||
| 467 | // // cc.log("Communication Error : Get MediaAdditinal Information..." + strResponse + "\r\n"); | ||
| 468 | // // }, self, "uuid" | ||
| 469 | // // ); | ||
| 470 | // // } | ||
| 471 | |||
| 472 | // } | ||
| 473 | // ); | ||
| 474 | |||
| 475 | |||
| 476 | // lvCategoryList.setDataPositionRender(function (iPosition, iCount) { | ||
| 477 | // //这里是ListView的this 执行时作用域 | ||
| 478 | // let nodeDataPosition = self.node.getChildByName('DataPosition'); | ||
| 479 | // if (iCount == 0) { | ||
| 480 | // nodeDataPosition.getComponent(cc.Label).string = "1 / 1"; | ||
| 481 | // nodeDataPosition.x = Common.SCREEN_WIDTH / 2 - 70 - nodeDataPosition.width / 2; | ||
| 482 | // return; | ||
| 483 | // } | ||
| 484 | // if (null == iCount) { | ||
| 485 | // iCount = parseInt(nodeDataPosition.getComponent(cc.Label).string.split('/')[1]); | ||
| 486 | // cc.log(iCount); | ||
| 487 | // } | ||
| 488 | // nodeDataPosition.getComponent(cc.Label).string = Math.ceil(Math.min((iPosition + self._iShowCellRows * self._iCellCountEachRow - 1), iCount) / self._iShowCellRows / self._iCellCountEachRow) + " / " + Math.ceil(iCount / self._iShowCellRows / self._iCellCountEachRow); | ||
| 489 | // nodeDataPosition.x = Common.SCREEN_WIDTH / 2 - 70 - nodeDataPosition.width / 2; | ||
| 490 | // // this._compSceneCanvas.checkCountAndDisplayTopBtns(iCount); | ||
| 491 | // }); | ||
| 492 | }, | 234 | }, |
| 493 | 235 | ||
| 236 | |||
| 494 | /** | 237 | /** |
| 495 | * 添加收藏 | 238 | * 改变管理的状态 |
| 496 | */ | 239 | */ |
| 497 | AddMedia2Collection: function () { | 240 | changeEditorStatus: function () { |
| 498 | let nodeId = this._fiCurrentFocus.node.parent.getComponent(ListCell).id; | 241 | var fiFocusTarget = null; |
| 499 | if (!nodeId || !this._iCollectionId) { | 242 | if (!this._bIsFocusInit) return; //还未初始化焦点 |
| 500 | return; | 243 | var nodeContainer = cc.find('CategoryList/DataContainerMask/DataContainer', this.node); |
| 244 | var aNodeChildren = nodeContainer.children; | ||
| 245 | if (this._bEditorStatus) { | ||
| 246 | fiFocusTarget = cc.find('BackEditorIcon', this.node).getComponent(FocusInfo); | ||
| 247 | cc.find('EditorIcon', this.node).getComponent(FocusInfo).setEnable(false); | ||
| 248 | cc.find('IndexIcon', this.node).getComponent(FocusInfo).setEnable(false); | ||
| 249 | cc.find('ClearIcon', this.node).getComponent(FocusInfo).setEnable(true); | ||
| 250 | cc.find('BackEditorIcon', this.node).getComponent(FocusInfo).setEnable(true); | ||
| 251 | cc.find('EditorIcon', this.node).opacity = 0; | ||
| 252 | cc.find('IndexIcon', this.node).opacity = 0; | ||
| 253 | cc.find('BackEditorIcon', this.node).opacity = 255; | ||
| 254 | cc.find('ClearIcon', this.node).opacity = 255; | ||
| 255 | // for (let i = 0; i < aNodeChildren.length; i++) { | ||
| 256 | // cc.find('GrayMask', aNodeChildren[i]).opacity = 255; | ||
| 257 | // } | ||
| 258 | } else { | ||
| 259 | fiFocusTarget = cc.find('EditorIcon', this.node).getComponent(FocusInfo); | ||
| 260 | cc.find('EditorIcon', this.node).getComponent(FocusInfo).setEnable(true); | ||
| 261 | cc.find('IndexIcon', this.node).getComponent(FocusInfo).setEnable(true); | ||
| 262 | cc.find('ClearIcon', this.node).getComponent(FocusInfo).setEnable(false); | ||
| 263 | cc.find('BackEditorIcon', this.node).getComponent(FocusInfo).setEnable(false); | ||
| 264 | cc.find('EditorIcon', this.node).opacity = 255; | ||
| 265 | cc.find('IndexIcon', this.node).opacity = 255; | ||
| 266 | cc.find('BackEditorIcon', this.node).opacity = 0; | ||
| 267 | cc.find('ClearIcon', this.node).opacity = 0; | ||
| 268 | // for (let i = 0; i < aNodeChildren.length; i++) { | ||
| 269 | // cc.find('GrayMask', aNodeChildren[i]).opacity = 0; | ||
| 270 | // } | ||
| 501 | } | 271 | } |
| 502 | let oCollectionRequestParameters = { | 272 | // this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_RIGHT, null, null);//TODO:焦点跳转一次,不然按钮状态无法改变 |
| 503 | "view": "json", | 273 | }, |
| 504 | "mediaId": nodeId, | 274 | |
| 505 | "collectionId": this._iCollectionId, | 275 | |
| 506 | "appId": this._strAppId, | 276 | //删除ListView条目 |
| 277 | requestRemoveProgram: function () { | ||
| 278 | let id = this._fiCurrentFocus.node.getChildByName('Id').getComponent(cc.Label).string; | ||
| 279 | var oRemoveProgramPara = { | ||
| 280 | 'view': "json", | ||
| 281 | "collectionId": this._iDefaultCollectionId, | ||
| 282 | 'mediaIds': id, | ||
| 283 | // "appId": this._aTypeAppId[this._oSceneContext._iCurrentTypeIndex], | ||
| 507 | "token": Common.TEST_API_TOKEN, | 284 | "token": Common.TEST_API_TOKEN, |
| 508 | }; | 285 | } |
| 509 | Network.ajax('GET', Common.TOPDRAW_API_SERVER + "User/AddMedia2Collection", null, oCollectionRequestParameters, | 286 | Network.ajax('GET', Common.TOPDRAW_API_SERVER + "User/RemoveMediaFromCollection", null, oRemoveProgramPara, |
| 510 | function (strResponse) { | 287 | function (strResponse) { |
| 511 | try { | 288 | try { |
| 512 | var oJSONResult = JSON.parse(strResponse); | 289 | var oJSONResult = JSON.parse(strResponse); |
| 513 | if (oJSONResult.businessCode == 'success') { | 290 | if (oJSONResult.businessCode == 'success') { |
| 514 | cc.log("添加成功"); | 291 | cc.log("删除成功"); |
| 515 | // this.getCategoryList(); //不能更新网络,焦点会错乱 | 292 | this.getCategoryList(); |
| 516 | this._aCategoryAlreadyMediaId.push(nodeId); | 293 | let fiFocusTarget = cc.find("BackEditorIcon", this.node).getComponent(FocusInfo); //处理焦点跳转 |
| 517 | let nodeCollectionPic = cc.find("CollectionBg/CollectionPic", this._fiCurrentFocus.node.parent); | 294 | setTimeout(function () { |
| 518 | cc.loader.loadRes("texture/ui/collect_heart", cc.Texture2D, function (err, texture) { | 295 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_UP, null, null); |
| 519 | var spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 28, 30, 28)); | 296 | }.bind(this), 300); |
| 520 | nodeCollectionPic.getComponent(cc.Sprite).spriteFrame = spriteFrame; | 297 | cc.log("Success GET RemoveProgram..."); |
| 521 | }); | ||
| 522 | } else { | 298 | } else { |
| 523 | cc.log("Error GET AddMedia..." + oJSONResult.description); | 299 | cc.log("Error GET RemoveProgram..." + oJSONResult.description); |
| 524 | } | 300 | } |
| 525 | } catch (error) { | 301 | } catch (error) { |
| 526 | cc.log("Exception GET AddMedia..." + error); | 302 | cc.log("Exception GET RemoveProgram..." + error); |
| 527 | } | 303 | } |
| 528 | }, | 304 | }, |
| 529 | function (strResponse) { | 305 | function (strResponse) { |
| 530 | cc.log("Communication Error : Get AddMedia Information..." + strResponse + "\r\n"); | 306 | cc.log("Communication Error : Get RemoveProgram Information..." + strResponse + "\r\n"); |
| 531 | }, this, "uuid" | 307 | }, this, "uuid" |
| 532 | ); | 308 | ); |
| 533 | }, | 309 | }, |
| 534 | 310 | ||
| 535 | /** | 311 | //清空所有条目 |
| 536 | * 移除收藏 | 312 | requestRemoveAllProgram: function () { |
| 537 | */ | 313 | var oRemoveAllProgramPara = { |
| 538 | removeMedia2Collection: function () { | 314 | 'view': "json", |
| 539 | let nodeId = this._fiCurrentFocus.node.parent.getChildByName('Id').getComponent(cc.Label).string; | 315 | "collectionId": this._iDefaultCollectionId, |
| 540 | if (!nodeId || !this._iCollectionId) { | 316 | // "appId": this._aTypeAppId[this._oSceneContext._iCurrentTypeIndex], |
| 541 | return; | 317 | "token": Common.TEST_API_TOKEN_EDU, |
| 542 | } | 318 | } |
| 543 | let oCollectionRequestParameters = { | 319 | Network.ajax('GET', Common.TOPDRAW_API_SERVER_EDU + "User/RemoveAllMediaFromCollection", null, oRemoveAllProgramPara, |
| 544 | "view": "json", | ||
| 545 | "mediaId": nodeId, | ||
| 546 | "collectionId": this._iCollectionId, | ||
| 547 | "appId": this._strAppId, | ||
| 548 | "token": Common.TEST_API_TOKEN, | ||
| 549 | }; | ||
| 550 | Network.ajax('GET', Common.TOPDRAW_API_SERVER + "User/RemoveMediaFromCollection", null, oCollectionRequestParameters, | ||
| 551 | function (strResponse) { | 320 | function (strResponse) { |
| 552 | try { | 321 | try { |
| 553 | var oJSONResult = JSON.parse(strResponse); | 322 | var oJSONResult = JSON.parse(strResponse); |
| 554 | if (oJSONResult.businessCode == 'success') { | 323 | if (oJSONResult.businessCode == 'success') { |
| 555 | cc.log("移除成功"); | 324 | cc.log("删除所有成功"); |
| 556 | // this.getCategoryList(); //不能更新网络,焦点会错乱 | 325 | let nodeContainer = cc.find('CategoryList/DataContainerMask/DataContainer', this.node); |
| 557 | Utils.remove(this._aCategoryAlreadyMediaId, nodeId); | 326 | nodeContainer.destroyAllChildren(); |
| 558 | let nodeCollectionPic = cc.find("CollectionBg/CollectionPic", this._fiCurrentFocus.node.parent); | 327 | this.getCategoryList(); |
| 559 | cc.loader.loadRes("texture/ui/collect_heart", cc.Texture2D, function (err, texture) { | 328 | cc.log("Success GET RemoveAllProgram..."); |
| 560 | var spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 30, 28)); | ||
| 561 | nodeCollectionPic.getComponent(cc.Sprite).spriteFrame = spriteFrame; | ||
| 562 | }); | ||
| 563 | } else { | 329 | } else { |
| 564 | cc.log("Error GET removeMedia..." + oJSONResult.description); | 330 | cc.log("Error GET RemoveAllProgram..." + oJSONResult.description); |
| 565 | } | 331 | } |
| 566 | } catch (error) { | 332 | } catch (error) { |
| 567 | cc.log("Exception GET removeMedia..." + error); | 333 | cc.log("Exception GET RemoveAllProgram..." + error); |
| 568 | } | 334 | } |
| 569 | }, | 335 | }, |
| 570 | function (strResponse) { | 336 | function (strResponse) { |
| 571 | cc.log("Communication Error : Get removeMedia Information..." + strResponse + "\r\n"); | 337 | cc.log("Communication Error : Get RemoveAllProgram Information..." + strResponse + "\r\n"); |
| 572 | }, this, "uuid" | 338 | }, this, "uuid" |
| 573 | ); | 339 | ); |
| 574 | }, | 340 | }, |
| 575 | 341 | ||
| 576 | checkDataReadyAndInitFocus: function () { | 342 | checkDataReadyAndInitFocus: function () { |
| 577 | if (!this._bIsFocusInit) { | 343 | if (this._bIsCategoryListDataInit && !this._bIsFocusInit) { |
| 344 | // this.scheduleOnce(() => { //指定0让回调函数在下一帧立即执行 | ||
| 578 | this.initFocus(); | 345 | this.initFocus(); |
| 346 | // }, 0); | ||
| 579 | this._bIsFocusInit = true; | 347 | this._bIsFocusInit = true; |
| 348 | this.changeEditorStatus(); | ||
| 580 | } | 349 | } |
| 581 | }, | 350 | }, |
| 582 | 351 | ||
| 583 | initFocus: function () { | 352 | initFocus: function () { |
| 584 | var self = this; | 353 | var self = this; |
| 585 | // //----------------Creator2.1.0-rc2版本有毒-------------------------- | 354 | //----------------Creator2.1.0-rc2版本有毒-------------------------- |
| 586 | // //动态加载这几张引起黑屏的罪魁祸首 | 355 | //动态加载这几张引起黑屏的罪魁祸首 |
| 587 | // cc.loader.loadRes("Texture/scroll/pageIncon", cc.SpriteFrame, function (err, spriteFrame) { | 356 | // cc.loader.loadRes("Texture/scroll/pageIncon", cc.SpriteFrame, function (err, spriteFrame) { |
| 588 | // self.spriteScrollBarBlock.spriteFrame = spriteFrame; | 357 | // self.spriteScrollBarBlock.spriteFrame = spriteFrame; |
| 589 | // }); | 358 | // }); |
| ... | @@ -593,94 +362,60 @@ cc.Class({ | ... | @@ -593,94 +362,60 @@ cc.Class({ |
| 593 | // cc.loader.loadRes("Texture/scroll/down_arrow", cc.SpriteFrame, function (err, spriteFrame) { | 362 | // cc.loader.loadRes("Texture/scroll/down_arrow", cc.SpriteFrame, function (err, spriteFrame) { |
| 594 | // self.spriteScrollBarDown.spriteFrame = spriteFrame; | 363 | // self.spriteScrollBarDown.spriteFrame = spriteFrame; |
| 595 | // }); | 364 | // }); |
| 596 | // //----------------------------------------------------------------- | 365 | //----------------------------------------------------------------- |
| 597 | var nodeEditor = cc.find("EditorSprite", this.node); //管理 | 366 | var fiCollection = this.spriteCollect.addComponent(FocusInfo); |
| 598 | // cc.find("HistoryIcon", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | 367 | this._aFocusTargets[0]['to_collection_index'] = this.spriteCollect; |
| 599 | var fiEditor = nodeEditor.addComponent(FocusInfo); | 368 | fiCollection.init('{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneDiary","appId":"' + this._strAppId + '"}}]}', true); |
| 600 | this._aFocusTargets[0]['to_editor_index'] = nodeEditor; | 369 | // self.spriteEditor.spriteFrame.setRect(cc.rect(0, 0, 142, 54)); |
| 601 | fiEditor.init( | 370 | var fiEditor = this.spriteEditor.addComponent(FocusInfo); |
| 602 | null, true | 371 | this._aFocusTargets[0]['to_editor_index'] = this.spriteEditor; |
| 603 | ); | 372 | fiEditor.init(null, true); |
| 604 | 373 | // self.spriteClear.spriteFrame.setRect(cc.rect(0, 0, 142, 54)); | |
| 605 | var nodeIndex = cc.find("IndexSprite", this.node); //首页 | 374 | var fiClearEditor = this.spriteClear.addComponent(FocusInfo); |
| 606 | // cc.find("HistoryIcon", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | 375 | this._aFocusTargets[0]['to_clear_index'] = this.spriteClear; |
| 607 | var fiIndex = nodeIndex.addComponent(FocusInfo); | 376 | fiClearEditor.init(null, false); |
| 608 | this._aFocusTargets[0]['to_first_index'] = nodeIndex; | 377 | // self.spriteBackEditor.spriteFrame.setRect(cc.rect(0, 0, 142, 54)); |
| 609 | fiIndex.init( | 378 | var fiBackEditor = this.spriteBackEditor.addComponent(FocusInfo); |
| 610 | null, true | 379 | this._aFocusTargets[0]['to_exit_editor_index'] = this.spriteBackEditor; |
| 611 | ); | 380 | fiBackEditor.init(null, false); |
| 612 | 381 | ||
| 613 | var nodeCollection = cc.find("CollectionIcon", this.node); //我的收藏 | 382 | var fiIndex = this.spriteIndex.addComponent(FocusInfo); |
| 614 | // cc.find("CollectionIcon", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 142, 54)); | 383 | this._aFocusTargets[0]['to_home_index'] = this.spriteIndex; |
| 615 | var fiCollection = nodeCollection.addComponent(FocusInfo); | 384 | fiIndex.init('{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneRecommend"}}]}', true); |
| 616 | this._aFocusTargets[0]['to_collection_index'] = nodeCollection; | 385 | |
| 617 | fiCollection.init( | 386 | // var nodeInitFocus = cc.find(this._oSceneContext.focusPath, this.node); |
| 618 | '{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneDiary","appId":"' + this._strAppId + '"}}]}', true | 387 | var nodeInitFocus = cc.find("CollectionIcon", this.node); //从其他界面回退回来错乱,强制使用死路径 |
| 619 | ); | ||
| 620 | |||
| 621 | var nodeInitFocus = cc.find(this._oSceneContext.focusPath, this.node); | ||
| 622 | var nodeFocus = new cc.Node('nodeFocus'); | 388 | var nodeFocus = new cc.Node('nodeFocus'); |
| 623 | this.node.addChild(nodeFocus, 10); | 389 | this.node.addChild(nodeFocus, 10); |
| 624 | this._cFocus = this.node.getChildByName('nodeFocus').addComponent(TVFocus); | 390 | this._cFocus = this.node.getChildByName('nodeFocus').addComponent(TVFocus); |
| 625 | this._cFocus.init('focusContainer', this, | 391 | this._cFocus.init('focusContainer', this, |
| 626 | nodeInitFocus.getComponent(FocusInfo), | 392 | nodeInitFocus.getComponent(FocusInfo), |
| 627 | Common.SCREEN_WIDTH, Common.SCREEN_HEIGHT, 0, 0, 1.0); | 393 | Common.SCREEN_WIDTH, Common.SCREEN_HEIGHT, 0, 0, 1.0); |
| 628 | if (0 == nodeInitFocus.getName().indexOf('CollectionIcon')) { // | 394 | if (0 == nodeInitFocus.name.indexOf('CollectionIcon')) { |
| 629 | nodeInitFocus.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 64, 176, 64)); | 395 | cc.loader.loadRes('button/collection_button', cc.Texture2D, function (err, texture) { |
| 630 | } | 396 | nodeInitFocus.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 176, 64)); |
| 631 | // if (0 == nodeInitFocus.name.indexOf('TypeListCell')) { | 397 | }); |
| 632 | // let iIndex = parseInt(nodeInitFocus.name.replace("TypeListCell", '')); | ||
| 633 | // if (this._oType[iIndex]) { | ||
| 634 | // Network.loadImageInNativeRuntime( | ||
| 635 | // Common.TOPDRAW_IMAGE_SERVER + this._oType[iIndex].image[0].fileUrl, | ||
| 636 | // function (texture) { | ||
| 637 | // let width = self._oType[iIndex].image[0].width; | ||
| 638 | // let height = self._oType[iIndex].image[0].height; | ||
| 639 | // nodeInitFocus.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, height / 2, width, height / 2)); | ||
| 640 | // }, null, this | ||
| 641 | // ); | ||
| 642 | // } | ||
| 643 | // } | ||
| 644 | |||
| 645 | if (this._bBackStatus && 0 == nodeInitFocus.getName().indexOf('OtherListCell')) { //显示收藏框框 | ||
| 646 | nodeInitFocus.getChildByName("CollectionBg").opacity = 255; | ||
| 647 | nodeInitFocus.getComponent(ListCell).setUIWithFocus(); | ||
| 648 | } | ||
| 649 | |||
| 650 | // if (this._bBackStatus && 0 == nodeInitFocus.getName().indexOf('CartoonListCell')) { //显示收藏框框 | ||
| 651 | // nodeInitFocus.getComponent(ListCell).setUIWithFocus(); | ||
| 652 | // } | ||
| 653 | |||
| 654 | //处理焦点位于下方问题 | ||
| 655 | if (this._oSceneContext.typeListY) { | ||
| 656 | this._nodeTypeList.y = this._oSceneContext.typeListY; | ||
| 657 | } | 398 | } |
| 658 | }, | 399 | }, |
| 659 | 400 | ||
| 660 | onKeyDown: function (event) { | 401 | onKeyDown: function (event) { |
| 661 | this._super(event); | 402 | this._super(event); |
| 662 | // cc.log("当前列表:" + this._fiCurrentFocus.node.getName()); | ||
| 663 | var fiFocusTarget = null; | 403 | var fiFocusTarget = null; |
| 664 | var fiCurrentFocus = this._fiCurrentFocus; | 404 | var fiCurrentFocus = this._fiCurrentFocus; |
| 665 | var oScrollParameter = null; | 405 | var oScrollParameter = null; |
| 666 | let aCheckResult; | 406 | let aCheckResult; |
| 667 | //TODO:给ListView传值,使其可以让滑块跟随滚动 | 407 | //TODO:给ListView传值,使其可以让滑块跟随滚动 |
| 668 | let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); | 408 | let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); |
| 669 | // if (lvCategoryList) { | 409 | if (lvCategoryList) { |
| 670 | // lvCategoryList.setCurrentFocus(this._fiCurrentFocus); | 410 | lvCategoryList.setCurrentFocus(this._fiCurrentFocus); |
| 671 | // } | 411 | } |
| 672 | // this.lvCategoryList.setCurrentFocus(this._fiCurrentFocus); | 412 | // this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPageAdvance(); |
| 673 | // this._oSceneContext.categoryRecordIndexOfFirstCell=lvCategoryList.getRecordIndexOfFirstCellInPageAdvance(); | ||
| 674 | if (event.keyCode == cc.macro.KEY.up || event.keyCode == Common.ANDROID_KEY.up) { | 413 | if (event.keyCode == cc.macro.KEY.up || event.keyCode == Common.ANDROID_KEY.up) { |
| 675 | // if (this._bIsCategoryItemMoving || this._bIsSongListMoving) { | ||
| 676 | // return; | ||
| 677 | // } | ||
| 678 | // if (0 == this._fiCurrentFocus.node.getName().indexOf('ScrollBarBlock')) { //如果滚动条 | 414 | // if (0 == this._fiCurrentFocus.node.getName().indexOf('ScrollBarBlock')) { //如果滚动条 |
| 679 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); | 415 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); |
| 680 | // if (lvCategoryList.scrollAPageUp()) { | 416 | // if (lvCategoryList.scrollAPageUp()) { |
| 681 | 417 | // return; | |
| 682 | // } | 418 | // } |
| 683 | // return; | ||
| 684 | // } | 419 | // } |
| 685 | if (0 == this._fiCurrentFocus.node.getName().indexOf('OtherListCell')) { | 420 | if (0 == this._fiCurrentFocus.node.getName().indexOf('OtherListCell')) { |
| 686 | var index = parseInt(this._fiCurrentFocus.node.getName().replace('OtherListCell', '')); | 421 | var index = parseInt(this._fiCurrentFocus.node.getName().replace('OtherListCell', '')); |
| ... | @@ -689,13 +424,6 @@ cc.Class({ | ... | @@ -689,13 +424,6 @@ cc.Class({ |
| 689 | return; | 424 | return; |
| 690 | } | 425 | } |
| 691 | } | 426 | } |
| 692 | // if (0 == this._fiCurrentFocus.node.getName().indexOf('CartoonListCell')) { | ||
| 693 | // var index = parseInt(this._fiCurrentFocus.node.getName().replace('CartoonListCell', '')); | ||
| 694 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); | ||
| 695 | // if (lvCategoryList.scrollARowUp(index)) { | ||
| 696 | // return; | ||
| 697 | // } | ||
| 698 | // } | ||
| 699 | fiFocusTarget = this._cFocus.findTarget(fiCurrentFocus, this._aFocusTargets, 0, Common.MOVE_DIRECTION_UP); | 427 | fiFocusTarget = this._cFocus.findTarget(fiCurrentFocus, this._aFocusTargets, 0, Common.MOVE_DIRECTION_UP); |
| 700 | if (!fiFocusTarget) { return; } | 428 | if (!fiFocusTarget) { return; } |
| 701 | aCheckResult = this.checkFocusTarget(fiFocusTarget, oScrollParameter); | 429 | aCheckResult = this.checkFocusTarget(fiFocusTarget, oScrollParameter); |
| ... | @@ -706,12 +434,6 @@ cc.Class({ | ... | @@ -706,12 +434,6 @@ cc.Class({ |
| 706 | if (event.keyCode == cc.macro.KEY.right || event.keyCode == Common.ANDROID_KEY.right) { | 434 | if (event.keyCode == cc.macro.KEY.right || event.keyCode == Common.ANDROID_KEY.right) { |
| 707 | fiFocusTarget = this._cFocus.findTarget(this._fiCurrentFocus, this._aFocusTargets, 0, Common.MOVE_DIRECTION_RIGHT); | 435 | fiFocusTarget = this._cFocus.findTarget(this._fiCurrentFocus, this._aFocusTargets, 0, Common.MOVE_DIRECTION_RIGHT); |
| 708 | if (!fiFocusTarget) { return; } | 436 | if (!fiFocusTarget) { return; } |
| 709 | // if (0 == this._fiCurrentFocus.node.name.indexOf("OtherListCell")) { | ||
| 710 | // let index = this._fiCurrentFocus.node.name.replace("OtherListCell", ''); | ||
| 711 | // // cc.find("DataContainerMask/DataContainer/EnglishListCell" + index + "/CollectionBg", this._nodeCategoryList).opacity=255; | ||
| 712 | // fiFocusTarget = cc.find("DataContainerMask/DataContainer/OtherListCell" + index + "/CollectionBg", this._nodeCategoryList).getComponent(FocusInfo); | ||
| 713 | // } | ||
| 714 | |||
| 715 | aCheckResult = this.checkFocusTarget(fiFocusTarget, oScrollParameter); | 437 | aCheckResult = this.checkFocusTarget(fiFocusTarget, oScrollParameter); |
| 716 | fiFocusTarget = aCheckResult[0]; | 438 | fiFocusTarget = aCheckResult[0]; |
| 717 | oScrollParameter = aCheckResult[1]; | 439 | oScrollParameter = aCheckResult[1]; |
| ... | @@ -719,24 +441,12 @@ cc.Class({ | ... | @@ -719,24 +441,12 @@ cc.Class({ |
| 719 | } | 441 | } |
| 720 | if (event.keyCode == cc.macro.KEY.down || event.keyCode == Common.ANDROID_KEY.down) { | 442 | if (event.keyCode == cc.macro.KEY.down || event.keyCode == Common.ANDROID_KEY.down) { |
| 721 | // if (!this._iScrollGroupStatus) { | 443 | // if (!this._iScrollGroupStatus) { |
| 722 | if (this._bIsCategoryItemMoving || this._bIsSongListMoving) { | ||
| 723 | return; | ||
| 724 | } | ||
| 725 | // if (0 == this._fiCurrentFocus.node.getName().indexOf('ScrollBarBlock')) { //如果是滚动条 | 444 | // if (0 == this._fiCurrentFocus.node.getName().indexOf('ScrollBarBlock')) { //如果是滚动条 |
| 726 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); | 445 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); |
| 727 | // if (lvCategoryList.scrollAPageDown()) { | 446 | // if (lvCategoryList.scrollAPageDown()) { |
| 728 | |||
| 729 | // } | 447 | // } |
| 730 | // return; | 448 | // return; |
| 731 | // } | 449 | // } |
| 732 | // if (0 == this._fiCurrentFocus.node.getName().indexOf('CartoonListCell')) { | ||
| 733 | // var index = parseInt(this._fiCurrentFocus.node.getName().replace('CartoonListCell', '')); | ||
| 734 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); | ||
| 735 | // if (lvCategoryList.scrollARowDown(null, index)) { | ||
| 736 | // // cc.log("line feed!"); | ||
| 737 | // return; | ||
| 738 | // } | ||
| 739 | // } | ||
| 740 | if (0 == this._fiCurrentFocus.node.getName().indexOf('OtherListCell')) { | 450 | if (0 == this._fiCurrentFocus.node.getName().indexOf('OtherListCell')) { |
| 741 | var index = parseInt(this._fiCurrentFocus.node.getName().replace('OtherListCell', '')); | 451 | var index = parseInt(this._fiCurrentFocus.node.getName().replace('OtherListCell', '')); |
| 742 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); | 452 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); |
| ... | @@ -762,201 +472,99 @@ cc.Class({ | ... | @@ -762,201 +472,99 @@ cc.Class({ |
| 762 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_LEFT, null, oScrollParameter); | 472 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_LEFT, null, oScrollParameter); |
| 763 | } | 473 | } |
| 764 | if (event.keyCode == cc.macro.KEY.enter || event.keyCode == Common.ANDROID_KEY.enter) { | 474 | if (event.keyCode == cc.macro.KEY.enter || event.keyCode == Common.ANDROID_KEY.enter) { |
| 765 | 475 | if (0 == fiCurrentFocus.node.name.indexOf('EditorIcon') || 0 == fiCurrentFocus.node.name.indexOf('BackEditorIcon')) { | |
| 766 | if (0 == this._fiCurrentFocus.node.name.indexOf("CollectionBg")) { //收藏OR取消收藏 | 476 | this._bEditorStatus = !this._bEditorStatus; |
| 767 | let nodeId = this._fiCurrentFocus.node.parent.getComponent(ListCell).id; | 477 | // this.getCategoryList(); |
| 768 | //数组转成字符串才能判断是否包含某串值(存在返回位置,不存在则返回-1) | 478 | this.changeEditorStatus(); |
| 769 | -1 != this._aCategoryAlreadyMediaId.toString().indexOf(nodeId) ? this.removeMedia2Collection() : this.AddMedia2Collection(); | 479 | } else if (0 == fiCurrentFocus.node.name.indexOf('DiaryListCell')) { //进入详情或删除该条目 |
| 770 | return; | 480 | if (this._bEditorStatus) { //删除 |
| 481 | this.requestRemoveProgram(); | ||
| 482 | } else { //进入详情(这里要先设置焦点)注意:有些不需要进入详情是直接播放的 | ||
| 483 | let id = fiCurrentFocus.node.getChildByName('Id').getComponent(cc.Label).string; | ||
| 484 | let fiBlock = fiCurrentFocus.node.getComponent(FocusInfo); | ||
| 485 | fiBlock.init( | ||
| 486 | '{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneCartoonDetail","appId":"' + this._strAppId + '","id":"' + id + '"}}]}' | ||
| 487 | ); | ||
| 488 | this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); | ||
| 489 | } | ||
| 490 | } else if (this._bEditorStatus && 0 == fiCurrentFocus.node.name.indexOf('ClearIcon')) { //清空 | ||
| 491 | this.requestRemoveAllProgram(); | ||
| 492 | } else { //观看历史 | ||
| 493 | this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); | ||
| 771 | } | 494 | } |
| 772 | this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); | ||
| 773 | } | ||
| 774 | if (event.keyCode == cc.macro.KEY.space) { | ||
| 775 | // this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); | ||
| 776 | } | 495 | } |
| 496 | if (event.keyCode == cc.macro.KEY.space) { } | ||
| 777 | if (event.keyCode == cc.macro.KEY.backspace || event.keyCode == Common.ANDROID_KEY.back) { | 497 | if (event.keyCode == cc.macro.KEY.backspace || event.keyCode == Common.ANDROID_KEY.back) { |
| 778 | this.backAScene(); | 498 | this.backAScene(); |
| 779 | } | 499 | } |
| 780 | 500 | ||
| 781 | //记录CategoryList滚动位置 | 501 | //记录CategoryList滚动位置 |
| 782 | this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPage(); | 502 | this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPage(); |
| 783 | |||
| 784 | }, | 503 | }, |
| 785 | checkFocusTarget: function (fiFocusTarget, oScrollParameter) { | 504 | checkFocusTarget: function (fiFocusTarget, oScrollParameter) { |
| 786 | // if (0 == this._fiCurrentFocus.node.name.indexOf("TypeListCell") && 0 != fiFocusTarget.node.name.indexOf("TypeListCell")) { | ||
| 787 | // if (!this._bIsCategoryListDataInit) { | ||
| 788 | // return [null, oScrollParameter]; | ||
| 789 | // } | ||
| 790 | // } | ||
| 791 | // if (fiFocusTarget && 0 == fiFocusTarget.node.name.indexOf("TypeListCell")) { | ||
| 792 | // if (0 != this._fiCurrentFocus.node.name.indexOf("TypeListCell")) {//如果不是TypeList之间跳转,则哪里来回哪里去 | ||
| 793 | // fiFocusTarget = cc.find("TypeListCell" + this._oSceneContext._iCurrentTypeIndex, this._nodeTypeList).getComponent(FocusInfo); | ||
| 794 | // } else { | ||
| 795 | // let iIndex = parseInt(fiFocusTarget.node.name.replace(/TypeListCell/, '')); | ||
| 796 | // let iDirRate = null; | ||
| 797 | // if (-fiFocusTarget.node.y + fiFocusTarget.node.height / 2 - this._nodeTypeList.y >= this._nodeTypeListWrapper.height) { | ||
| 798 | // oScrollParameter = this._nodeTypeList.getComponent(TVScrollParameter); | ||
| 799 | // oScrollParameter.setHasRelation(true); | ||
| 800 | // oScrollParameter.setStep(-(-fiFocusTarget.node.y + fiFocusTarget.node.height / 2 + 1 - this._nodeTypeList.y) + this._nodeTypeListWrapper.height); | ||
| 801 | // oScrollParameter.setTargetPosition(this._nodeTypeList.y - oScrollParameter.getStep()); | ||
| 802 | // this._oSceneContext.typeListY = this._nodeTypeList.y - oScrollParameter.getStep(); | ||
| 803 | // iDirRate = 1; | ||
| 804 | // } | ||
| 805 | // if (-fiFocusTarget.node.y - this._nodeTypeList.y < 0) { | ||
| 806 | // oScrollParameter = this._nodeTypeList.getComponent(TVScrollParameter); | ||
| 807 | // oScrollParameter.setHasRelation(true); | ||
| 808 | // oScrollParameter.setStep(-fiFocusTarget.node.y - fiFocusTarget.node.height / 2 - this._nodeTypeList.y); | ||
| 809 | // oScrollParameter.setTargetPosition(this._nodeTypeList.y + oScrollParameter.getStep()); | ||
| 810 | // this._oSceneContext.typeListY = this._nodeTypeList.y + oScrollParameter.getStep(); | ||
| 811 | // iDirRate = -1; | ||
| 812 | // } | ||
| 813 | // if (iDirRate) { | ||
| 814 | // if (this._nodeTypeList.y + iDirRate * (this._nodeTypeHeight + 5) >= (this._aTypeAppId.length - this.TYPE_LIST_CELL_SIZE) * (this._nodeTypeHeight + 5) - 5) {//减5没有多大的意思,因为.y是有误差的 | ||
| 815 | // cc.find("TypeListArea/Down", this.node).opacity = 0; | ||
| 816 | // } else { | ||
| 817 | // cc.find("TypeListArea/Down", this.node).opacity = 255; | ||
| 818 | // } | ||
| 819 | // if (this._nodeTypeList.y + iDirRate * (this._nodeTypeHeight + 1) <= 5) { | ||
| 820 | // cc.find('TypeListArea/Up', this.node).opacity = 0; | ||
| 821 | // } else { | ||
| 822 | // cc.find('TypeListArea/Up', this.node).opacity = 255; | ||
| 823 | // } | ||
| 824 | // } | ||
| 825 | // } | ||
| 826 | // } | ||
| 827 | 505 | ||
| 828 | return [fiFocusTarget, oScrollParameter]; | 506 | return [fiFocusTarget, oScrollParameter]; |
| 829 | }, | 507 | }, |
| 830 | 508 | ||
| 831 | onBeforeFocusChange: function (event) { | 509 | onBeforeFocusChange: function (event) { |
| 832 | this._super(event); | ||
| 833 | let fiFrom = event.detail.from; | 510 | let fiFrom = event.detail.from; |
| 834 | let fiTo = event.detail.to; | 511 | let fiTo = event.detail.to; |
| 835 | // if (0 == fiFrom.node.getName().indexOf('CartoonListCell')) { | ||
| 836 | // fiFrom.node.getComponent(ListCell).setUIWithoutFocus(); | ||
| 837 | // } | ||
| 838 | |||
| 839 | // if (0 == fiFrom.node.getName().indexOf('TypeListCell') && 0 == fiTo.node.getName().indexOf('TypeListCell')) { | ||
| 840 | // // fiFrom.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height)); | ||
| 841 | // var self = this; | ||
| 842 | // let iIndex = fiFrom.node.name.replace("TypeListCell", ''); | ||
| 843 | // if (0 == fiTo.node.getName().indexOf('TypeListCell')) { | ||
| 844 | // if (this._oType[iIndex]) { | ||
| 845 | // let width = self._oType[iIndex].image[0].width; | ||
| 846 | // let height = self._oType[iIndex].image[0].height / 2; | ||
| 847 | // // Network.loadImageInNativeRuntime( | ||
| 848 | // // Common.TOPDRAW_IMAGE_SERVER + self._oType[iIndex].image[0].fileUrl, | ||
| 849 | // // function (texture) { | ||
| 850 | // // fiFrom.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, width, height)); | ||
| 851 | // // }, null, this | ||
| 852 | // // ); | ||
| 853 | // cc.loader.load(Common.TOPDRAW_IMAGE_SERVER + self._oType[iIndex].image[0].fileUrl, function (err, texture) { | ||
| 854 | // fiFrom.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, width, height)); | ||
| 855 | // }); | ||
| 856 | // } | ||
| 857 | // } | ||
| 858 | // } | ||
| 859 | 512 | ||
| 860 | if (0 == fiFrom.node.getName().indexOf('CollectionIcon')) { | 513 | if (0 == fiFrom.node.getName().indexOf('CollectionIcon')) { |
| 861 | // fiFrom.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 142, 54)); | ||
| 862 | cc.loader.loadRes('button/collection_button', cc.Texture2D, function (err, texture) { | 514 | cc.loader.loadRes('button/collection_button', cc.Texture2D, function (err, texture) { |
| 863 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 176, 64)); | 515 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 176, 64)); |
| 864 | }); | 516 | }); |
| 865 | } | 517 | } |
| 866 | 518 | if (0 == fiFrom.node.getName().indexOf('EditorIcon')) { | |
| 867 | if (0 == fiFrom.node.getName().indexOf('EditorSprite')) { //我的收藏按钮 | ||
| 868 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 869 | cc.loader.loadRes('button/editor_button', cc.Texture2D, function (err, texture) { | 519 | cc.loader.loadRes('button/editor_button', cc.Texture2D, function (err, texture) { |
| 870 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 137, 64)); | 520 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 137, 65)); |
| 871 | }); | 521 | }); |
| 872 | } | 522 | } |
| 873 | 523 | if (0 == fiFrom.node.getName().indexOf('ClearIcon')) { | |
| 874 | if (0 == fiFrom.node.getName().indexOf('IndexSprite')) { //我的收藏按钮 | 524 | cc.loader.loadRes('button/clear_button', cc.Texture2D, function (err, texture) { |
| 875 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | 525 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 137, 65)); |
| 526 | }); | ||
| 527 | } | ||
| 528 | if (0 == fiFrom.node.getName().indexOf('BackEditorIcon')) { | ||
| 529 | cc.loader.loadRes('button/exitEditor_button', cc.Texture2D, function (err, texture) { | ||
| 530 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 137, 65)); | ||
| 531 | }); | ||
| 532 | } | ||
| 533 | if (0 == fiFrom.node.getName().indexOf('IndexIcon')) { | ||
| 876 | cc.loader.loadRes('button/index_button', cc.Texture2D, function (err, texture) { | 534 | cc.loader.loadRes('button/index_button', cc.Texture2D, function (err, texture) { |
| 877 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 137, 64)); | 535 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 137, 65)); |
| 878 | }); | 536 | }); |
| 879 | } | 537 | } |
| 880 | |||
| 881 | // if (0 == fiFrom.node.getName().indexOf('OtherListCell')) { | ||
| 882 | // fiFrom.node.getChildByName("CollectionBg").opacity = 0; | ||
| 883 | // fiFrom.node.getComponent(ListCell).setUIWithoutFocus(); | ||
| 884 | // } | ||
| 885 | |||
| 886 | // if (0 == fiFrom.node.getName().indexOf('CollectionBg')) { //TODO:解决收藏框框跳转某些不隐藏情况 | ||
| 887 | // fiFrom.node.opacity = 0; | ||
| 888 | // // fiFrom.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 53, 171)); | ||
| 889 | // cc.loader.loadRes('texture/ui/collect_bg', cc.Texture2D, function (err, texture) { | ||
| 890 | // fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 53, 171)); | ||
| 891 | // }); | ||
| 892 | // } | ||
| 893 | }, | 538 | }, |
| 894 | 539 | ||
| 895 | onAfterFocusChange: function (event) { | 540 | onAfterFocusChange: function (event) { |
| 896 | this._super(event); | ||
| 897 | let fiTo = event.detail.to; | 541 | let fiTo = event.detail.to; |
| 898 | let fiFrom = event.detail.from; | ||
| 899 | // if (0 == fiTo.node.getName().indexOf('CartoonListCell')) { | ||
| 900 | // fiTo.node.getComponent(ListCell).setUIWithFocus(); | ||
| 901 | // } | ||
| 902 | |||
| 903 | // if (0 == fiTo.node.getName().indexOf('TypeListCell')) { | ||
| 904 | // let iIndex = fiTo.node.name.replace("TypeListCell", ''); | ||
| 905 | // this._oSceneContext._iCurrentTypeIndex = iIndex; | ||
| 906 | // // fiTo.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); | ||
| 907 | // var self = this; | ||
| 908 | // if (this._oType[this._oSceneContext._iCurrentTypeIndex]) { | ||
| 909 | // let width = self._oType[iIndex].image[0].width; | ||
| 910 | // let height = self._oType[iIndex].image[0].height / 2; | ||
| 911 | // // Network.loadImageInNativeRuntime( | ||
| 912 | // // Common.TOPDRAW_IMAGE_SERVER + self._oType[iIndex].image[0].fileUrl, | ||
| 913 | // // function (texture) { | ||
| 914 | // // fiTo.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, height, width, height)); | ||
| 915 | // // }, null, this | ||
| 916 | // // ); | ||
| 917 | // cc.loader.load(Common.TOPDRAW_IMAGE_SERVER + self._oType[iIndex].image[0].fileUrl, function (err, texture) { | ||
| 918 | // fiTo.node.getChildByName('Bg').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, height, width, height)); | ||
| 919 | // }); | ||
| 920 | // } | ||
| 921 | |||
| 922 | // if (0 == fiFrom.node.getName().indexOf('TypeListCell')) { //正常状态返回回去不需要刷新 | ||
| 923 | // this.scheduleOnce(this.getCollectionId, 0.3); | ||
| 924 | // this._bIsCategoryListDataInit = false; //初始它 | ||
| 925 | // } | ||
| 926 | // } | ||
| 927 | 542 | ||
| 928 | if (0 == fiTo.node.getName().indexOf('CollectionIcon')) { //我的收藏按钮 | 543 | if (0 == fiTo.node.getName().indexOf('CollectionIcon')) { |
| 929 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 930 | cc.loader.loadRes('button/collection_button', cc.Texture2D, function (err, texture) { | 544 | cc.loader.loadRes('button/collection_button', cc.Texture2D, function (err, texture) { |
| 931 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 176, 64)); | 545 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 176, 64)); |
| 932 | }); | 546 | }); |
| 933 | } | 547 | } |
| 934 | 548 | if (0 == fiTo.node.getName().indexOf('EditorIcon')) { | |
| 935 | if (0 == fiTo.node.getName().indexOf('EditorSprite')) { //我的收藏按钮 | ||
| 936 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 937 | cc.loader.loadRes('button/editor_button', cc.Texture2D, function (err, texture) { | 549 | cc.loader.loadRes('button/editor_button', cc.Texture2D, function (err, texture) { |
| 938 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 137, 64)); | 550 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 65, 137, 65)); |
| 939 | }); | 551 | }); |
| 940 | } | 552 | } |
| 941 | 553 | if (0 == fiTo.node.getName().indexOf('ClearIcon')) { | |
| 942 | if (0 == fiTo.node.getName().indexOf('IndexSprite')) { //我的收藏按钮 | 554 | cc.loader.loadRes('button/clear_button', cc.Texture2D, function (err, texture) { |
| 943 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | 555 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 65, 137, 65)); |
| 556 | }); | ||
| 557 | } | ||
| 558 | if (0 == fiTo.node.getName().indexOf('BackEditorIcon')) { | ||
| 559 | cc.loader.loadRes('button/exitEditor_button', cc.Texture2D, function (err, texture) { | ||
| 560 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 65, 137, 65)); | ||
| 561 | }); | ||
| 562 | } | ||
| 563 | if (0 == fiTo.node.getName().indexOf('IndexIcon')) { | ||
| 944 | cc.loader.loadRes('button/index_button', cc.Texture2D, function (err, texture) { | 564 | cc.loader.loadRes('button/index_button', cc.Texture2D, function (err, texture) { |
| 945 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 137, 64)); | 565 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 65, 137, 65)); |
| 946 | }); | 566 | }); |
| 947 | } | 567 | } |
| 948 | // if (0 == fiTo.node.getName().indexOf('OtherListCell')) { //显示收藏框框 | ||
| 949 | // fiTo.node.getChildByName("CollectionBg").opacity = 255; | ||
| 950 | // fiTo.node.getComponent(ListCell).setUIWithFocus(); | ||
| 951 | // } | ||
| 952 | |||
| 953 | // if (0 == fiTo.node.getName().indexOf('CollectionBg')) { | ||
| 954 | // fiTo.node.opacity = 255; | ||
| 955 | // cc.loader.loadRes("texture/ui/collect_bg", cc.Texture2D, function (err, texture) { | ||
| 956 | // var spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 171, 53, 171)); | ||
| 957 | // fiTo.node.getComponent(cc.Sprite).spriteFrame = spriteFrame; | ||
| 958 | // }); | ||
| 959 | // } | ||
| 960 | }, | 568 | }, |
| 961 | 569 | ||
| 962 | doCurrentFocusTVLinkAction: function (strAction) { | 570 | doCurrentFocusTVLinkAction: function (strAction) { |
| ... | @@ -977,17 +585,7 @@ cc.Class({ | ... | @@ -977,17 +585,7 @@ cc.Class({ |
| 977 | } | 585 | } |
| 978 | }, | 586 | }, |
| 979 | 587 | ||
| 980 | onListScrollStart: function () { | ||
| 981 | this._bIsSongListMoving = true; | ||
| 982 | cc.log("scroll start"); | ||
| 983 | }, | ||
| 984 | onListScrollEnd: function () { | ||
| 985 | this._bIsSongListMoving = false; | ||
| 986 | cc.log("scroll completed"); | ||
| 987 | }, | ||
| 988 | |||
| 989 | onDestroy: function () { | 588 | onDestroy: function () { |
| 990 | cc.director.emit('stop_render'); //分发事件 | 589 | cc.director.emit('stop_render'); //分发事件 |
| 991 | }, | 590 | }, |
| 992 | |||
| 993 | }); | 591 | }); | ... | ... |
assets/Script/History22.js
0 → 100644
| 1 | //观看历史 | ||
| 2 | //这里跳转地址是由返回数据指定,暂未实现 | ||
| 3 | //这里获取CategoryList数据的接口有问题 | ||
| 4 | //正常接口不管limit字段多少返回的count都是总数据量,这里只返回了limit的数量,导致CategoryList刷新出错!!! | ||
| 5 | var Common = require('Common'); | ||
| 6 | var Network = require('Network'); | ||
| 7 | var TVFocus = require('TVFocus'); | ||
| 8 | var FocusInfo = require('FocusInfo'); | ||
| 9 | var TVCanvas = require('TVCanvas'); | ||
| 10 | var TVScrollParameter = require('TVScrollParameter'); | ||
| 11 | var ListView = require('ListView'); | ||
| 12 | var ListCell = require('ListCell'); | ||
| 13 | var Utils = require('Utils'); | ||
| 14 | var BusinessParameter = require('BusinessParameter'); | ||
| 15 | |||
| 16 | cc.Class({ | ||
| 17 | extends: TVCanvas, | ||
| 18 | |||
| 19 | properties: { | ||
| 20 | spriteScrollBarBlock: cc.Sprite, | ||
| 21 | spriteScrollBarUp: cc.Sprite, | ||
| 22 | spriteScrollBarDown: cc.Sprite, | ||
| 23 | _bPfbTypeCellInit: false, | ||
| 24 | _aTypeAppId: [], | ||
| 25 | _aTypeUrl: [], | ||
| 26 | _aNavList: [], | ||
| 27 | _nodeTypeHeight: 0, | ||
| 28 | TYPE_LIST_CELL_SIZE: 4, | ||
| 29 | |||
| 30 | _strAppId: '', //为了跳播放 | ||
| 31 | _strDirURL: '', | ||
| 32 | _oDestURL: null, | ||
| 33 | _strIndexURL: '', | ||
| 34 | _strIconSrc: '', | ||
| 35 | _iCollectionId: 0,//默认收藏夹的id | ||
| 36 | _aEpisodeIndex: [],//剧集index集合 | ||
| 37 | _strPageIds: '', //页面内mediaId | ||
| 38 | _bIsContentWStatus: true,//海报图状态,true为横图,false为竖图 | ||
| 39 | |||
| 40 | _bIsCategoryListDataInit: false, | ||
| 41 | // _iCurrentTypeIndex: 0, | ||
| 42 | _strIds: '', | ||
| 43 | _oType: null, | ||
| 44 | |||
| 45 | _aCategoryMediaId: [], | ||
| 46 | _aCategoryAlreadyMediaId: [], | ||
| 47 | |||
| 48 | _bBackStatus: false, | ||
| 49 | |||
| 50 | // PFB_TYPE: { | ||
| 51 | // default: null, | ||
| 52 | // type: cc.Prefab, | ||
| 53 | // }, | ||
| 54 | }, | ||
| 55 | |||
| 56 | onLoad: function () { | ||
| 57 | this._super(); | ||
| 58 | |||
| 59 | this._iShowCellRows = 3; | ||
| 60 | this._iAlphaCellRows = 0; | ||
| 61 | this._iHiddenCellRows = 3; | ||
| 62 | this._iCellCountEachRow = 2; | ||
| 63 | this._iBeginPositionX = -200; | ||
| 64 | this._iBeginPositionY = 210; | ||
| 65 | this._fCellMarginTop = 20; | ||
| 66 | this._fCellMarginRight = 15; | ||
| 67 | this._fCellMarginBottom = 10; | ||
| 68 | this._fCellMarginLeft = 0; | ||
| 69 | |||
| 70 | //-----------上下文及参数相关处理------------ | ||
| 71 | let oSceneParameter = this._cApplication.getTopSceneParameter(); | ||
| 72 | if (oSceneParameter) { | ||
| 73 | this._strAppId = oSceneParameter.appId;//应用id | ||
| 74 | } | ||
| 75 | //恢复上下文 | ||
| 76 | if (this._cApplication.getBackStatus()) { | ||
| 77 | this._oSceneContext = this._cApplication.popSceneContext(); | ||
| 78 | this._cApplication.setBackStatus(false); | ||
| 79 | this._bBackStatus = true; | ||
| 80 | } else { | ||
| 81 | this._oSceneContext = {}; | ||
| 82 | this._oSceneContext.requestedTypeId = null; | ||
| 83 | this._oSceneContext._iCurrentTypeIndex = 0; | ||
| 84 | this._oSceneContext.categoryRecordIndexOfFirstCell = 0; | ||
| 85 | this._oSceneContext.focusPath = "CollectionIcon"; | ||
| 86 | this._oSceneContext.typeListY = 0; | ||
| 87 | // this._oSceneContext.elderTypeId = oSceneParameter.elderTypeId || 37; //从上级拿过来的二级父Id | ||
| 88 | } | ||
| 89 | |||
| 90 | this._strAppId = this._strAppId || "tda7e47f868313d9f5"; //测试 | ||
| 91 | //---------上下文及参数相关处理结束----------- | ||
| 92 | |||
| 93 | |||
| 94 | // //右分类框框 | ||
| 95 | this._nodeCategoryList = cc.find("CategoryList", this.node); | ||
| 96 | |||
| 97 | // cc.find("HistoryIcon", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 98 | cc.find("CollectionIcon", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 176, 64)); | ||
| 99 | cc.find("EditorSprite", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 137, 64)); | ||
| 100 | cc.find("IndexSprite", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 137, 64)); | ||
| 101 | |||
| 102 | this.getPageBg(this, 'background'); | ||
| 103 | // this.addHomeIcon(this); | ||
| 104 | // this.getTypeList(); //暂时不要Type | ||
| 105 | this.getListBookmark(); //直接请求 | ||
| 106 | this.checkDataReadyAndInitFocus(); //初始化焦点放到这里 | ||
| 107 | }, | ||
| 108 | |||
| 109 | /** | ||
| 110 | * 拿到列表需要的ids | ||
| 111 | */ | ||
| 112 | getListBookmark: function () { | ||
| 113 | let oTypeRequestParameters = { | ||
| 114 | "view": "json", | ||
| 115 | // "appId": this._aTypeAppId[this._oSceneContext._iCurrentTypeIndex], | ||
| 116 | "sortByCollection": 1, | ||
| 117 | "start": 0, | ||
| 118 | "limit": 9, | ||
| 119 | "sortField": "update_time", | ||
| 120 | "sortDirection": "desc", | ||
| 121 | "token": Common.TEST_API_TOKEN_EDU, | ||
| 122 | }; | ||
| 123 | Network.ajax('GET', Common.TOPDRAW_API_SERVER_EDU + "User/ListBookmark", null, oTypeRequestParameters, | ||
| 124 | function (strResponse) { | ||
| 125 | try { | ||
| 126 | var oJSONResult = JSON.parse(strResponse); | ||
| 127 | if (oJSONResult.businessCode == 'success') { | ||
| 128 | this._strIds = ""; //初始化 | ||
| 129 | if (oJSONResult.resultSet.length > 0) { | ||
| 130 | cc.find('BlankIcon', this.node).opacity = 0; | ||
| 131 | for (let i = 0; i < oJSONResult.resultSet.length; i++) { | ||
| 132 | if (oJSONResult.resultSet[i].media_id) { | ||
| 133 | this._strIds = this._strIds + "," + oJSONResult.resultSet[i].media_id; | ||
| 134 | } | ||
| 135 | } | ||
| 136 | // this.getCategoryList(); | ||
| 137 | } | ||
| 138 | this.getCategoryList(); | ||
| 139 | // else { | ||
| 140 | // cc.find('BlankIcon', this.node).opacity = 255; | ||
| 141 | // let lvCategoryList = this._nodeCategoryList.getComponent(ListView); | ||
| 142 | // lvCategoryList.renderInitData(strResponse); //将ListView数据置空 | ||
| 143 | // this._oSceneContext.focusPath = "app"; | ||
| 144 | // } | ||
| 145 | cc.log("Success GET ListBookmark..."); | ||
| 146 | } else { | ||
| 147 | cc.log("Error GET ListBookmark..." + oJSONResult.description); | ||
| 148 | } | ||
| 149 | } catch (error) { | ||
| 150 | cc.log("Exception GET ListBookmark..." + error); | ||
| 151 | } | ||
| 152 | }, | ||
| 153 | function (strResponse) { | ||
| 154 | cc.log("Communication Error : Get ListBookmark Information..." + strResponse + "\r\n"); | ||
| 155 | }, this, "uuid" | ||
| 156 | ); | ||
| 157 | }, | ||
| 158 | |||
| 159 | getCategoryList: function () { | ||
| 160 | //把之前的东西删掉 | ||
| 161 | let nodeCategoryList = this.node.getChildByName('CategoryList'); | ||
| 162 | // nodeCategoryList.getChildByName('DataContainerMask').getChildByName('DataContainer').removeAllChildren(); | ||
| 163 | nodeCategoryList.getChildByName('DataContainerMask').getChildByName('DataContainer').destroyAllChildren(); | ||
| 164 | |||
| 165 | this._strSongListCellComponentName = "HistoryOtherListCell"; | ||
| 166 | this._iBeginPositionX = -450; | ||
| 167 | this._iBeginPositionY = 250; | ||
| 168 | this._iShowCellRows = 2; | ||
| 169 | this._iAlphaCellRows = 1; | ||
| 170 | this._iHiddenCellRows = 2; | ||
| 171 | this._iCellCountEachRow = 4; | ||
| 172 | this._fCellMarginTop = 0; | ||
| 173 | this._fCellMarginRight = 20; | ||
| 174 | this._fCellMarginBottom = 60; | ||
| 175 | this._fCellMarginLeft = 0; | ||
| 176 | // break; | ||
| 177 | // } | ||
| 178 | //重新开始 | ||
| 179 | let lvCategoryList = nodeCategoryList.getComponent(ListView); | ||
| 180 | if (!lvCategoryList) { | ||
| 181 | lvCategoryList = nodeCategoryList.addComponent(ListView); | ||
| 182 | } | ||
| 183 | |||
| 184 | var ids = this._strIds.substring(1, this._strIds.length); | ||
| 185 | lvCategoryList.init(this, this._iShowCellRows, this._iAlphaCellRows, this._iHiddenCellRows, this._iCellCountEachRow, this._strSongListCellComponentName, | ||
| 186 | this._iBeginPositionX, this._iBeginPositionY,//起始位置 | ||
| 187 | this._fCellMarginTop, this._fCellMarginRight, this._fCellMarginBottom, this._fCellMarginLeft, | ||
| 188 | 1, 1, //0-横向 1-纵向 | ||
| 189 | function () { | ||
| 190 | //请求列表 | ||
| 191 | let oMediaParas = {}; | ||
| 192 | oMediaParas.ids = ids; | ||
| 193 | // oMediaParas.appId = strAppId; | ||
| 194 | oMediaParas.sortField = "update_time"; | ||
| 195 | oMediaParas.sortDirection = "desc"; | ||
| 196 | let iStart1 = 0; | ||
| 197 | if (null != this._oSceneContext.categoryRecordIndexOfFirstCell) { | ||
| 198 | iStart1 = this._oSceneContext.categoryRecordIndexOfFirstCell; | ||
| 199 | } | ||
| 200 | |||
| 201 | //函数默认取一页数据,但是第一次显示需要加上Alpha的部分 | ||
| 202 | lvCategoryList.setDataSource( | ||
| 203 | "GET", | ||
| 204 | Common.TOPDRAW_API_SERVER_EDU + "Media/List", | ||
| 205 | oMediaParas, | ||
| 206 | iStart1, (lvCategoryList.getShowCellRows() + lvCategoryList.getAlphaCellRows()) * lvCategoryList.getCellCountEachRow(), | ||
| 207 | null, null | ||
| 208 | ); | ||
| 209 | lvCategoryList.loadData( | ||
| 210 | function (strResponse) { | ||
| 211 | lvCategoryList.renderInitData(strResponse, function () { | ||
| 212 | var oJSONResult = JSON.parse(strResponse); | ||
| 213 | if (oJSONResult.resultSet.length <= 0) { //没有数据就显示占位图 | ||
| 214 | cc.find('BlankIcon', this.node).opacity = 255 | ||
| 215 | } else { | ||
| 216 | cc.find('BlankIcon', this.node).opacity = 0 | ||
| 217 | } | ||
| 218 | // this.lvCategoryList.renderInitData(strResponse); | ||
| 219 | this._bIsCategoryListDataInit = true; | ||
| 220 | this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPage(); | ||
| 221 | |||
| 222 | this.checkDataReadyAndInitFocus(); | ||
| 223 | |||
| 224 | // for (var key in this._aFocusTargets[0]) { | ||
| 225 | // cc.log(key + "=====current focus========" + this._aFocusTargets[0][key].name + "==cc.isValid==" + cc.isValid(this._aFocusTargets[0][key])); | ||
| 226 | // } | ||
| 227 | }); | ||
| 228 | }, | ||
| 229 | null, | ||
| 230 | this | ||
| 231 | ); | ||
| 232 | } | ||
| 233 | ); | ||
| 234 | |||
| 235 | }, | ||
| 236 | |||
| 237 | /** | ||
| 238 | * 添加收藏 | ||
| 239 | */ | ||
| 240 | AddMedia2Collection: function () { | ||
| 241 | let nodeId = this._fiCurrentFocus.node.parent.getComponent(ListCell).id; | ||
| 242 | if (!nodeId || !this._iCollectionId) { | ||
| 243 | return; | ||
| 244 | } | ||
| 245 | let oCollectionRequestParameters = { | ||
| 246 | "view": "json", | ||
| 247 | "mediaId": nodeId, | ||
| 248 | "collectionId": this._iCollectionId, | ||
| 249 | "appId": this._strAppId, | ||
| 250 | "token": Common.TEST_API_TOKEN, | ||
| 251 | }; | ||
| 252 | Network.ajax('GET', Common.TOPDRAW_API_SERVER + "User/AddMedia2Collection", null, oCollectionRequestParameters, | ||
| 253 | function (strResponse) { | ||
| 254 | try { | ||
| 255 | var oJSONResult = JSON.parse(strResponse); | ||
| 256 | if (oJSONResult.businessCode == 'success') { | ||
| 257 | cc.log("添加成功"); | ||
| 258 | // this.getCategoryList(); //不能更新网络,焦点会错乱 | ||
| 259 | this._aCategoryAlreadyMediaId.push(nodeId); | ||
| 260 | let nodeCollectionPic = cc.find("CollectionBg/CollectionPic", this._fiCurrentFocus.node.parent); | ||
| 261 | cc.loader.loadRes("texture/ui/collect_heart", cc.Texture2D, function (err, texture) { | ||
| 262 | var spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 28, 30, 28)); | ||
| 263 | nodeCollectionPic.getComponent(cc.Sprite).spriteFrame = spriteFrame; | ||
| 264 | }); | ||
| 265 | } else { | ||
| 266 | cc.log("Error GET AddMedia..." + oJSONResult.description); | ||
| 267 | } | ||
| 268 | } catch (error) { | ||
| 269 | cc.log("Exception GET AddMedia..." + error); | ||
| 270 | } | ||
| 271 | }, | ||
| 272 | function (strResponse) { | ||
| 273 | cc.log("Communication Error : Get AddMedia Information..." + strResponse + "\r\n"); | ||
| 274 | }, this, "uuid" | ||
| 275 | ); | ||
| 276 | }, | ||
| 277 | |||
| 278 | /** | ||
| 279 | * 移除收藏 | ||
| 280 | */ | ||
| 281 | removeMedia2Collection: function () { | ||
| 282 | let nodeId = this._fiCurrentFocus.node.parent.getChildByName('Id').getComponent(cc.Label).string; | ||
| 283 | if (!nodeId || !this._iCollectionId) { | ||
| 284 | return; | ||
| 285 | } | ||
| 286 | let oCollectionRequestParameters = { | ||
| 287 | "view": "json", | ||
| 288 | "mediaId": nodeId, | ||
| 289 | "collectionId": this._iCollectionId, | ||
| 290 | "appId": this._strAppId, | ||
| 291 | "token": Common.TEST_API_TOKEN, | ||
| 292 | }; | ||
| 293 | Network.ajax('GET', Common.TOPDRAW_API_SERVER + "User/RemoveMediaFromCollection", null, oCollectionRequestParameters, | ||
| 294 | function (strResponse) { | ||
| 295 | try { | ||
| 296 | var oJSONResult = JSON.parse(strResponse); | ||
| 297 | if (oJSONResult.businessCode == 'success') { | ||
| 298 | cc.log("移除成功"); | ||
| 299 | // this.getCategoryList(); //不能更新网络,焦点会错乱 | ||
| 300 | Utils.remove(this._aCategoryAlreadyMediaId, nodeId); | ||
| 301 | let nodeCollectionPic = cc.find("CollectionBg/CollectionPic", this._fiCurrentFocus.node.parent); | ||
| 302 | cc.loader.loadRes("texture/ui/collect_heart", cc.Texture2D, function (err, texture) { | ||
| 303 | var spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 30, 28)); | ||
| 304 | nodeCollectionPic.getComponent(cc.Sprite).spriteFrame = spriteFrame; | ||
| 305 | }); | ||
| 306 | } else { | ||
| 307 | cc.log("Error GET removeMedia..." + oJSONResult.description); | ||
| 308 | } | ||
| 309 | } catch (error) { | ||
| 310 | cc.log("Exception GET removeMedia..." + error); | ||
| 311 | } | ||
| 312 | }, | ||
| 313 | function (strResponse) { | ||
| 314 | cc.log("Communication Error : Get removeMedia Information..." + strResponse + "\r\n"); | ||
| 315 | }, this, "uuid" | ||
| 316 | ); | ||
| 317 | }, | ||
| 318 | |||
| 319 | checkDataReadyAndInitFocus: function () { | ||
| 320 | if (!this._bIsFocusInit) { | ||
| 321 | this.initFocus(); | ||
| 322 | this._bIsFocusInit = true; | ||
| 323 | } | ||
| 324 | }, | ||
| 325 | |||
| 326 | initFocus: function () { | ||
| 327 | var self = this; | ||
| 328 | // //----------------Creator2.1.0-rc2版本有毒-------------------------- | ||
| 329 | // //动态加载这几张引起黑屏的罪魁祸首 | ||
| 330 | // cc.loader.loadRes("Texture/scroll/pageIncon", cc.SpriteFrame, function (err, spriteFrame) { | ||
| 331 | // self.spriteScrollBarBlock.spriteFrame = spriteFrame; | ||
| 332 | // }); | ||
| 333 | // cc.loader.loadRes("Texture/scroll/up_arrow", cc.SpriteFrame, function (err, spriteFrame) { | ||
| 334 | // self.spriteScrollBarUp.spriteFrame = spriteFrame; | ||
| 335 | // }); | ||
| 336 | // cc.loader.loadRes("Texture/scroll/down_arrow", cc.SpriteFrame, function (err, spriteFrame) { | ||
| 337 | // self.spriteScrollBarDown.spriteFrame = spriteFrame; | ||
| 338 | // }); | ||
| 339 | // //----------------------------------------------------------------- | ||
| 340 | var nodeEditor = cc.find("EditorSprite", this.node); //管理 | ||
| 341 | // cc.find("HistoryIcon", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 342 | var fiEditor = nodeEditor.addComponent(FocusInfo); | ||
| 343 | this._aFocusTargets[0]['to_editor_index'] = nodeEditor; | ||
| 344 | fiEditor.init( | ||
| 345 | null, true | ||
| 346 | ); | ||
| 347 | |||
| 348 | var nodeIndex = cc.find("IndexSprite", this.node); //首页 | ||
| 349 | // cc.find("HistoryIcon", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 350 | var fiIndex = nodeIndex.addComponent(FocusInfo); | ||
| 351 | this._aFocusTargets[0]['to_first_index'] = nodeIndex; | ||
| 352 | fiIndex.init( | ||
| 353 | null, true | ||
| 354 | ); | ||
| 355 | |||
| 356 | var nodeCollection = cc.find("CollectionIcon", this.node); //我的收藏 | ||
| 357 | // cc.find("CollectionIcon", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 142, 54)); | ||
| 358 | var fiCollection = nodeCollection.addComponent(FocusInfo); | ||
| 359 | this._aFocusTargets[0]['to_collection_index'] = nodeCollection; | ||
| 360 | fiCollection.init( | ||
| 361 | '{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneDiary","appId":"' + this._strAppId + '"}}]}', true | ||
| 362 | ); | ||
| 363 | |||
| 364 | var nodeInitFocus = cc.find(this._oSceneContext.focusPath, this.node); | ||
| 365 | var nodeFocus = new cc.Node('nodeFocus'); | ||
| 366 | this.node.addChild(nodeFocus, 10); | ||
| 367 | this._cFocus = this.node.getChildByName('nodeFocus').addComponent(TVFocus); | ||
| 368 | this._cFocus.init('focusContainer', this, | ||
| 369 | nodeInitFocus.getComponent(FocusInfo), | ||
| 370 | Common.SCREEN_WIDTH, Common.SCREEN_HEIGHT, 0, 0, 1.0); | ||
| 371 | if (0 == nodeInitFocus.getName().indexOf('CollectionIcon')) { // | ||
| 372 | nodeInitFocus.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 64, 176, 64)); | ||
| 373 | } | ||
| 374 | |||
| 375 | if (this._bBackStatus && 0 == nodeInitFocus.getName().indexOf('OtherListCell')) { //显示收藏框框 | ||
| 376 | nodeInitFocus.getChildByName("CollectionBg").opacity = 255; | ||
| 377 | nodeInitFocus.getComponent(ListCell).setUIWithFocus(); | ||
| 378 | } | ||
| 379 | |||
| 380 | //处理焦点位于下方问题 | ||
| 381 | if (this._oSceneContext.typeListY) { | ||
| 382 | this._nodeTypeList.y = this._oSceneContext.typeListY; | ||
| 383 | } | ||
| 384 | }, | ||
| 385 | |||
| 386 | onKeyDown: function (event) { | ||
| 387 | this._super(event); | ||
| 388 | // cc.log("当前列表:" + this._fiCurrentFocus.node.getName()); | ||
| 389 | var fiFocusTarget = null; | ||
| 390 | var fiCurrentFocus = this._fiCurrentFocus; | ||
| 391 | var oScrollParameter = null; | ||
| 392 | let aCheckResult; | ||
| 393 | //TODO:给ListView传值,使其可以让滑块跟随滚动 | ||
| 394 | let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); | ||
| 395 | |||
| 396 | if (event.keyCode == cc.macro.KEY.up || event.keyCode == Common.ANDROID_KEY.up) { | ||
| 397 | |||
| 398 | if (0 == this._fiCurrentFocus.node.getName().indexOf('OtherListCell')) { | ||
| 399 | var index = parseInt(this._fiCurrentFocus.node.getName().replace('OtherListCell', '')); | ||
| 400 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); | ||
| 401 | if (lvCategoryList.scrollARowUp(index)) { | ||
| 402 | return; | ||
| 403 | } | ||
| 404 | } | ||
| 405 | fiFocusTarget = this._cFocus.findTarget(fiCurrentFocus, this._aFocusTargets, 0, Common.MOVE_DIRECTION_UP); | ||
| 406 | if (!fiFocusTarget) { return; } | ||
| 407 | aCheckResult = this.checkFocusTarget(fiFocusTarget, oScrollParameter); | ||
| 408 | fiFocusTarget = aCheckResult[0]; | ||
| 409 | oScrollParameter = aCheckResult[1]; | ||
| 410 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_UP, null, oScrollParameter); | ||
| 411 | } | ||
| 412 | if (event.keyCode == cc.macro.KEY.right || event.keyCode == Common.ANDROID_KEY.right) { | ||
| 413 | fiFocusTarget = this._cFocus.findTarget(this._fiCurrentFocus, this._aFocusTargets, 0, Common.MOVE_DIRECTION_RIGHT); | ||
| 414 | if (!fiFocusTarget) { return; } | ||
| 415 | |||
| 416 | aCheckResult = this.checkFocusTarget(fiFocusTarget, oScrollParameter); | ||
| 417 | fiFocusTarget = aCheckResult[0]; | ||
| 418 | oScrollParameter = aCheckResult[1]; | ||
| 419 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_RIGHT, null, oScrollParameter); | ||
| 420 | } | ||
| 421 | if (event.keyCode == cc.macro.KEY.down || event.keyCode == Common.ANDROID_KEY.down) { | ||
| 422 | // if (!this._iScrollGroupStatus) { | ||
| 423 | if (this._bIsCategoryItemMoving || this._bIsSongListMoving) { | ||
| 424 | return; | ||
| 425 | } | ||
| 426 | if (0 == this._fiCurrentFocus.node.getName().indexOf('OtherListCell')) { | ||
| 427 | var index = parseInt(this._fiCurrentFocus.node.getName().replace('OtherListCell', '')); | ||
| 428 | // let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView); | ||
| 429 | if (lvCategoryList.scrollARowDown(null, index)) { | ||
| 430 | // cc.log("line feed!"); | ||
| 431 | return; | ||
| 432 | } | ||
| 433 | } | ||
| 434 | fiFocusTarget = this._cFocus.findTarget(this._fiCurrentFocus, this._aFocusTargets, 0, Common.MOVE_DIRECTION_DOWN); | ||
| 435 | if (!fiFocusTarget) { return; } | ||
| 436 | aCheckResult = this.checkFocusTarget(fiFocusTarget, oScrollParameter); | ||
| 437 | fiFocusTarget = aCheckResult[0]; | ||
| 438 | oScrollParameter = aCheckResult[1]; | ||
| 439 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_DOWN, null, oScrollParameter); | ||
| 440 | // } | ||
| 441 | } | ||
| 442 | if (event.keyCode == cc.macro.KEY.left || event.keyCode == Common.ANDROID_KEY.left) { | ||
| 443 | fiFocusTarget = this._cFocus.findTarget(this._fiCurrentFocus, this._aFocusTargets, 0, Common.MOVE_DIRECTION_LEFT); | ||
| 444 | if (!fiFocusTarget) { return; } | ||
| 445 | aCheckResult = this.checkFocusTarget(fiFocusTarget, oScrollParameter); | ||
| 446 | fiFocusTarget = aCheckResult[0]; | ||
| 447 | oScrollParameter = aCheckResult[1]; | ||
| 448 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_LEFT, null, oScrollParameter); | ||
| 449 | } | ||
| 450 | if (event.keyCode == cc.macro.KEY.enter || event.keyCode == Common.ANDROID_KEY.enter) { | ||
| 451 | |||
| 452 | if (0 == this._fiCurrentFocus.node.name.indexOf("CollectionBg")) { //收藏OR取消收藏 | ||
| 453 | let nodeId = this._fiCurrentFocus.node.parent.getComponent(ListCell).id; | ||
| 454 | //数组转成字符串才能判断是否包含某串值(存在返回位置,不存在则返回-1) | ||
| 455 | -1 != this._aCategoryAlreadyMediaId.toString().indexOf(nodeId) ? this.removeMedia2Collection() : this.AddMedia2Collection(); | ||
| 456 | return; | ||
| 457 | } | ||
| 458 | this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); | ||
| 459 | } | ||
| 460 | if (event.keyCode == cc.macro.KEY.space) { | ||
| 461 | // this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); | ||
| 462 | } | ||
| 463 | if (event.keyCode == cc.macro.KEY.backspace || event.keyCode == Common.ANDROID_KEY.back) { | ||
| 464 | this.backAScene(); | ||
| 465 | } | ||
| 466 | |||
| 467 | //记录CategoryList滚动位置 | ||
| 468 | this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPage(); | ||
| 469 | |||
| 470 | }, | ||
| 471 | checkFocusTarget: function (fiFocusTarget, oScrollParameter) { | ||
| 472 | return [fiFocusTarget, oScrollParameter]; | ||
| 473 | }, | ||
| 474 | |||
| 475 | onBeforeFocusChange: function (event) { | ||
| 476 | this._super(event); | ||
| 477 | let fiFrom = event.detail.from; | ||
| 478 | let fiTo = event.detail.to; | ||
| 479 | |||
| 480 | if (0 == fiFrom.node.getName().indexOf('CollectionIcon')) { | ||
| 481 | // fiFrom.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 142, 54)); | ||
| 482 | cc.loader.loadRes('button/collection_button', cc.Texture2D, function (err, texture) { | ||
| 483 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 176, 64)); | ||
| 484 | }); | ||
| 485 | } | ||
| 486 | |||
| 487 | if (0 == fiFrom.node.getName().indexOf('EditorSprite')) { //我的收藏按钮 | ||
| 488 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 489 | cc.loader.loadRes('button/editor_button', cc.Texture2D, function (err, texture) { | ||
| 490 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 137, 64)); | ||
| 491 | }); | ||
| 492 | } | ||
| 493 | |||
| 494 | if (0 == fiFrom.node.getName().indexOf('IndexSprite')) { //我的收藏按钮 | ||
| 495 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 496 | cc.loader.loadRes('button/index_button', cc.Texture2D, function (err, texture) { | ||
| 497 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 137, 64)); | ||
| 498 | }); | ||
| 499 | } | ||
| 500 | |||
| 501 | }, | ||
| 502 | |||
| 503 | onAfterFocusChange: function (event) { | ||
| 504 | this._super(event); | ||
| 505 | let fiTo = event.detail.to; | ||
| 506 | let fiFrom = event.detail.from; | ||
| 507 | |||
| 508 | if (0 == fiTo.node.getName().indexOf('CollectionIcon')) { //我的收藏按钮 | ||
| 509 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 510 | cc.loader.loadRes('button/collection_button', cc.Texture2D, function (err, texture) { | ||
| 511 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 176, 64)); | ||
| 512 | }); | ||
| 513 | } | ||
| 514 | |||
| 515 | if (0 == fiTo.node.getName().indexOf('EditorSprite')) { //我的收藏按钮 | ||
| 516 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 517 | cc.loader.loadRes('button/editor_button', cc.Texture2D, function (err, texture) { | ||
| 518 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 137, 64)); | ||
| 519 | }); | ||
| 520 | } | ||
| 521 | |||
| 522 | if (0 == fiTo.node.getName().indexOf('IndexSprite')) { //我的收藏按钮 | ||
| 523 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 54, 142, 54)); | ||
| 524 | cc.loader.loadRes('button/index_button', cc.Texture2D, function (err, texture) { | ||
| 525 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 64, 137, 64)); | ||
| 526 | }); | ||
| 527 | } | ||
| 528 | }, | ||
| 529 | |||
| 530 | doCurrentFocusTVLinkAction: function (strAction) { | ||
| 531 | let strTVLink = this._fiCurrentFocus.getTVLink(); | ||
| 532 | var joTVLink = null; | ||
| 533 | try { | ||
| 534 | joTVLink = JSON.parse(strTVLink); | ||
| 535 | let jaOperationList = joTVLink.click; | ||
| 536 | for (let i = 0; i < jaOperationList.length; i++) { | ||
| 537 | switch (jaOperationList[i].action) { | ||
| 538 | default: | ||
| 539 | this.doTVLinkAction(jaOperationList[i]); | ||
| 540 | break; | ||
| 541 | } | ||
| 542 | } | ||
| 543 | } catch (error) { | ||
| 544 | cc.log("runTVLinkAction Exception..." + error); | ||
| 545 | } | ||
| 546 | }, | ||
| 547 | |||
| 548 | onListScrollStart: function () { | ||
| 549 | this._bIsSongListMoving = true; | ||
| 550 | cc.log("scroll start"); | ||
| 551 | }, | ||
| 552 | onListScrollEnd: function () { | ||
| 553 | this._bIsSongListMoving = false; | ||
| 554 | cc.log("scroll completed"); | ||
| 555 | }, | ||
| 556 | |||
| 557 | onDestroy: function () { | ||
| 558 | cc.director.emit('stop_render'); //分发事件 | ||
| 559 | }, | ||
| 560 | |||
| 561 | }); |
assets/Script/History22.js.meta
0 → 100644
| ... | @@ -683,7 +683,8 @@ cc.Class({ | ... | @@ -683,7 +683,8 @@ cc.Class({ |
| 683 | this._aFocusTargets[0]['btn_collect'] = cc.find('IntroductionArea/BtnPicCollect', this.node); | 683 | this._aFocusTargets[0]['btn_collect'] = cc.find('IntroductionArea/BtnPicCollect', this.node); |
| 684 | 684 | ||
| 685 | let fiHomeBtn = cc.find('HomeBtn', this.node).addComponent(FocusInfo); // | 685 | let fiHomeBtn = cc.find('HomeBtn', this.node).addComponent(FocusInfo); // |
| 686 | fiHomeBtn.init('', true, null, null, 1.0); | 686 | // fiHomeBtn.init('', true, null, null, 1.0); |
| 687 | fiHomeBtn.init('{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneRecommend"}}]}', true); | ||
| 687 | this._aFocusTargets[0]['btn_home'] = cc.find('HomeBtn', this.node); | 688 | this._aFocusTargets[0]['btn_home'] = cc.find('HomeBtn', this.node); |
| 688 | 689 | ||
| 689 | var nodeInitFocus = cc.find('PlayBg/VideoView', this.node); | 690 | var nodeInitFocus = cc.find('PlayBg/VideoView', this.node); |
| ... | @@ -795,10 +796,11 @@ cc.Class({ | ... | @@ -795,10 +796,11 @@ cc.Class({ |
| 795 | } else if (this._bScore && 0 == this._fiCurrentFocus.node.name.indexOf('Score')) { //已经是加入课堂了 | 796 | } else if (this._bScore && 0 == this._fiCurrentFocus.node.name.indexOf('Score')) { //已经是加入课堂了 |
| 796 | // this.submitScore(); | 797 | // this.submitScore(); |
| 797 | return; | 798 | return; |
| 798 | }else if(0 == this._fiCurrentFocus.node.name.indexOf('HomeBtn')){ | ||
| 799 | cc.log("返回首页"); | ||
| 800 | return; | ||
| 801 | } | 799 | } |
| 800 | // else if(0 == this._fiCurrentFocus.node.name.indexOf('HomeBtn')){ | ||
| 801 | // cc.log("返回首页"); | ||
| 802 | // return; | ||
| 803 | // } | ||
| 802 | this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); | 804 | this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK); |
| 803 | break; | 805 | break; |
| 804 | case cc.macro.KEY.backspace: | 806 | case cc.macro.KEY.backspace: | ... | ... |
| ... | @@ -281,7 +281,8 @@ cc.Class({ | ... | @@ -281,7 +281,8 @@ cc.Class({ |
| 281 | ); | 281 | ); |
| 282 | if (currentNode.getComponent(FocusInfo)) { | 282 | if (currentNode.getComponent(FocusInfo)) { |
| 283 | let fiBlock = currentNode.getComponent(FocusInfo); //弄tvlink | 283 | let fiBlock = currentNode.getComponent(FocusInfo); //弄tvlink |
| 284 | fiBlock.setTVLink(currentRemote.tvlink); | 284 | // fiBlock.setTVLink(currentRemote.tvlink); |
| 285 | fiBlock.setTVLink('{"click":[{"action":"ChangeScene","parameters":{"sceneName":"sceneCategory"}}]}'); | ||
| 285 | } | 286 | } |
| 286 | } else if (currentNode.name == "hasChildFrame" && currentNode.childrenCount > 0) { //渲染自动布局的节点 | 287 | } else if (currentNode.name == "hasChildFrame" && currentNode.childrenCount > 0) { //渲染自动布局的节点 |
| 287 | for (let k = 0; k < currentNode.childrenCount; k++) { | 288 | for (let k = 0; k < currentNode.childrenCount; k++) { |
| ... | @@ -295,7 +296,8 @@ cc.Class({ | ... | @@ -295,7 +296,8 @@ cc.Class({ |
| 295 | ); | 296 | ); |
| 296 | if (sonCurrentNode.getComponent(FocusInfo)) { | 297 | if (sonCurrentNode.getComponent(FocusInfo)) { |
| 297 | let fiBlock = sonCurrentNode.getComponent(FocusInfo); //弄tvlink | 298 | let fiBlock = sonCurrentNode.getComponent(FocusInfo); //弄tvlink |
| 298 | fiBlock.setTVLink(currentRemote.tvlink); | 299 | // fiBlock.setTVLink(currentRemote.tvlink); |
| 300 | fiBlock.setTVLink('{"click":[{"action":"ChangeScene","parameters":{"sceneName":"sceneCategory"}}]}'); | ||
| 299 | } | 301 | } |
| 300 | } | 302 | } |
| 301 | } | 303 | } | ... | ... |
| ... | @@ -76,12 +76,12 @@ cc.Class({ | ... | @@ -76,12 +76,12 @@ cc.Class({ |
| 76 | "name": "Addition",//模块名称 | 76 | "name": "Addition",//模块名称 |
| 77 | "resultSet": [ | 77 | "resultSet": [ |
| 78 | { | 78 | { |
| 79 | "name": "我的", | 79 | "name": "收藏", |
| 80 | "left": 822, | 80 | "left": 822, |
| 81 | "top": 19, | 81 | "top": 19, |
| 82 | "width": 137, | 82 | "width": 137, |
| 83 | "height": 65, | 83 | "height": 65, |
| 84 | "tvlink": '{"click": [{"action": "changeUI","parameters": {"uiName": "collection"}}]}', | 84 | "tvlink": '{"click":[{"action":"ChangeScene","parameters":{"sceneName":"sceneDiary"}}]}', |
| 85 | "type" : "promotion_item", | 85 | "type" : "promotion_item", |
| 86 | "imageURL": "image/addition/my.png" | 86 | "imageURL": "image/addition/my.png" |
| 87 | }, | 87 | }, |
| ... | @@ -91,7 +91,7 @@ cc.Class({ | ... | @@ -91,7 +91,7 @@ cc.Class({ |
| 91 | "top": 19, | 91 | "top": 19, |
| 92 | "width": 137, | 92 | "width": 137, |
| 93 | "height": 65, | 93 | "height": 65, |
| 94 | "tvlink": '{"click": [{"action": "changeUI","parameters": {"uiName": "history"}}]}', | 94 | "tvlink": '{"click":[{"action":"ChangeScene","parameters":{"sceneName":"sceneHistory"}}]}', |
| 95 | "type" : "promotion_item", | 95 | "type" : "promotion_item", |
| 96 | "imageURL": "image/addition/history.png" | 96 | "imageURL": "image/addition/history.png" |
| 97 | }, | 97 | }, |
| ... | @@ -101,7 +101,7 @@ cc.Class({ | ... | @@ -101,7 +101,7 @@ cc.Class({ |
| 101 | "top": 19, | 101 | "top": 19, |
| 102 | "width": 137, | 102 | "width": 137, |
| 103 | "height": 65, | 103 | "height": 65, |
| 104 | "tvlink": '{"click": [{"action": "changeUI","parameters": {"uiName": "search"}}]}', | 104 | "tvlink": '{"click":[{"action":"ChangeScene","parameters":{"sceneName":"sceneSearch"}}]}', |
| 105 | "type" : "promotion_item", | 105 | "type" : "promotion_item", |
| 106 | "imageURL": "image/addition/search.png" | 106 | "imageURL": "image/addition/search.png" |
| 107 | } | 107 | } | ... | ... |
| ... | @@ -55,7 +55,9 @@ cc.Class({ | ... | @@ -55,7 +55,9 @@ cc.Class({ |
| 55 | ); | 55 | ); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | this.node.getComponent(FocusInfo).setTVLink(oData.tvlink); | 58 | // this.node.getComponent(FocusInfo).setTVLink(oData.tvlink); |
| 59 | this.node.getComponent(FocusInfo) | ||
| 60 | .setTVLink('{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneProgram","id":"' + oData.id + '"}}]}'); | ||
| 59 | }, | 61 | }, |
| 60 | 62 | ||
| 61 | enableFocusInfo: function () { | 63 | enableFocusInfo: function () { | ... | ... |
| ... | @@ -59,7 +59,8 @@ cc.Class({ | ... | @@ -59,7 +59,8 @@ cc.Class({ |
| 59 | ); | 59 | ); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | this.node.getComponent(FocusInfo).setTVLink(oData.tvlink); | 62 | // this.node.getComponent(FocusInfo).setTVLink(oData.tvlink); |
| 63 | this.node.getComponent(FocusInfo).setTVLink('{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneProgram","id":"' + oData.id + '"}}]}'); | ||
| 63 | }, | 64 | }, |
| 64 | 65 | ||
| 65 | enableFocusInfo: function () { | 66 | enableFocusInfo: function () { | ... | ... |
assets/Texture/ui/collection404.png
0 → 100644
73.7 KB
assets/Texture/ui/collection404.png.meta
0 → 100644
| 1 | { | ||
| 2 | "ver": "2.3.1", | ||
| 3 | "uuid": "45eb9209-7e5f-4879-928c-d322d78d8c0d", | ||
| 4 | "type": "sprite", | ||
| 5 | "wrapMode": "clamp", | ||
| 6 | "filterMode": "bilinear", | ||
| 7 | "premultiplyAlpha": false, | ||
| 8 | "platformSettings": {}, | ||
| 9 | "subMetas": { | ||
| 10 | "collection404": { | ||
| 11 | "ver": "1.0.4", | ||
| 12 | "uuid": "1c7a33d8-7cec-4bbc-8e8c-90b17a6de4f9", | ||
| 13 | "rawTextureUuid": "45eb9209-7e5f-4879-928c-d322d78d8c0d", | ||
| 14 | "trimType": "auto", | ||
| 15 | "trimThreshold": 1, | ||
| 16 | "rotated": false, | ||
| 17 | "offsetX": 0, | ||
| 18 | "offsetY": -57.5, | ||
| 19 | "trimX": 58, | ||
| 20 | "trimY": 156, | ||
| 21 | "width": 1164, | ||
| 22 | "height": 523, | ||
| 23 | "rawWidth": 1280, | ||
| 24 | "rawHeight": 720, | ||
| 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 |
| 1 | { | 1 | { |
| 2 | "android-instant": { | ||
| 3 | "REMOTE_SERVER_ROOT": "", | ||
| 4 | "host": "", | ||
| 5 | "pathPattern": "", | ||
| 6 | "recordPath": "", | ||
| 7 | "scheme": "https", | ||
| 8 | "skipRecord": false | ||
| 9 | }, | ||
| 10 | "appBundle": false, | ||
| 11 | "baidugame": { | ||
| 12 | "REMOTE_SERVER_ROOT": "", | ||
| 13 | "appid": "testappid", | ||
| 14 | "orientation": "portrait", | ||
| 15 | "subContext": "" | ||
| 16 | }, | ||
| 17 | "encryptJs": true, | ||
| 2 | "excludeScenes": [], | 18 | "excludeScenes": [], |
| 19 | "fb-instant-games": {}, | ||
| 20 | "includeSDKBox": false, | ||
| 21 | "inlineSpriteFrames": true, | ||
| 22 | "inlineSpriteFrames_native": true, | ||
| 23 | "md5Cache": false, | ||
| 24 | "mergeStartScene": false, | ||
| 25 | "optimizeHotUpdate": false, | ||
| 3 | "orientation": { | 26 | "orientation": { |
| 4 | "landscapeLeft": true, | 27 | "landscapeLeft": true, |
| 5 | "landscapeRight": true, | 28 | "landscapeRight": true, |
| ... | @@ -7,7 +30,21 @@ | ... | @@ -7,7 +30,21 @@ |
| 7 | "upsideDown": false | 30 | "upsideDown": false |
| 8 | }, | 31 | }, |
| 9 | "packageName": "org.cocos2d.helloworld", | 32 | "packageName": "org.cocos2d.helloworld", |
| 33 | "qqplay": { | ||
| 34 | "REMOTE_SERVER_ROOT": "", | ||
| 35 | "orientation": "portrait", | ||
| 36 | "zip": false | ||
| 37 | }, | ||
| 10 | "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49", | 38 | "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49", |
| 11 | "title": "hello_world", | 39 | "title": "fuse_apk", |
| 12 | "webOrientation": "auto" | 40 | "webOrientation": "auto", |
| 41 | "wechatgame": { | ||
| 42 | "REMOTE_SERVER_ROOT": "", | ||
| 43 | "appid": "wx6ac3f5090a6b99c5", | ||
| 44 | "orientation": "portrait", | ||
| 45 | "separate_engine": false, | ||
| 46 | "subContext": "" | ||
| 47 | }, | ||
| 48 | "xxteaKey": "0b7cbd8b-f258-42", | ||
| 49 | "zipCompressJs": true | ||
| 13 | } | 50 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | { | 1 | { |
| 2 | "assets-sort-type": "name", | ||
| 2 | "collision-matrix": [ | 3 | "collision-matrix": [ |
| 3 | [ | 4 | [ |
| 4 | true | 5 | true |
| 5 | ] | 6 | ] |
| 6 | ], | 7 | ], |
| 7 | "excluded-modules": [], | ||
| 8 | "group-list": [ | ||
| 9 | "default" | ||
| 10 | ], | ||
| 11 | "start-scene": "current", | ||
| 12 | "design-resolution-width": 960, | ||
| 13 | "design-resolution-height": 640, | 8 | "design-resolution-height": 640, |
| 14 | "fit-width": false, | 9 | "design-resolution-width": 960, |
| 15 | "fit-height": true, | 10 | "excluded-modules": [], |
| 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": { | 11 | "facebook": { |
| 26 | "enable": false, | ||
| 27 | "appID": "", | 12 | "appID": "", |
| 28 | "live": { | 13 | "audience": { |
| 29 | "enable": false | 14 | "enable": false |
| 30 | }, | 15 | }, |
| 31 | "audience": { | 16 | "enable": false, |
| 17 | "live": { | ||
| 32 | "enable": false | 18 | "enable": false |
| 33 | } | 19 | } |
| 34 | } | 20 | }, |
| 21 | "fit-height": true, | ||
| 22 | "fit-width": false, | ||
| 23 | "group-list": [ | ||
| 24 | "default" | ||
| 25 | ], | ||
| 26 | "last-module-event-record-time": 1567662056700, | ||
| 27 | "simulator-orientation": false, | ||
| 28 | "simulator-resolution": { | ||
| 29 | "height": 640, | ||
| 30 | "width": 960 | ||
| 31 | }, | ||
| 32 | "start-scene": "current", | ||
| 33 | "use-customize-simulator": false, | ||
| 34 | "use-project-simulator-setting": false | ||
| 35 | } | 35 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -16,45 +16,30 @@ | ... | @@ -16,45 +16,30 @@ |
| 16 | "iOS", | 16 | "iOS", |
| 17 | "HTML5" | 17 | "HTML5" |
| 18 | ], | 18 | ], |
| 19 | "package_download_url": "http://download.cocos.com/CocosServices/plugins/service-analytics/1.2.0_2.1.0.zip", | 19 | "package_download_url": "https://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>", | 20 | "package_version_desc": "<b>更新日期:</b>2019/6/10<br>\n<br><b>更新说明:</b><br>\n1、优化SDK,修复H5-SDK 与多个小游戏平台适配问题,删除和优化init事件无用接口<br>\n2、如有相关问题咨询或者需求, 可以联系我们技术支持邮箱 <a href=' '>support-cocos@cocos.com</a>", |
| 21 | "service_component_name": "service-analytics", | 21 | "service_component_name": "service-analytics", |
| 22 | "package_versions": [ | 22 | "package_versions": [ |
| 23 | "1.0.0_1.0.5", | 23 | "1.2.1_2.1.0", |
| 24 | "1.1.2_2.0.0", | 24 | "1.2.0_2.1.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", | 25 | "1.1.7_2.0.3", |
| 30 | "1.1.8_2.0.4", | 26 | "1.1.6_2.0.1_2.0.2", |
| 31 | "1.1.9_2.1.0", | 27 | "1.1.5_2.0.1", |
| 32 | "1.2.0_2.1.0" | 28 | "1.1.4_2.0.1", |
| 33 | ], | 29 | "1.1.3_2.0.1", |
| 34 | "build_platform": [ | 30 | "1.1.2_2.0.0", |
| 35 | "web-mobile", | 31 | "1.0.0_1.0.5" |
| 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 | ], | 32 | ], |
| 33 | "build_platform": [], | ||
| 48 | "require_verify": 0, | 34 | "require_verify": 0, |
| 49 | "service_price": "", | 35 | "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>" | 36 | "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 | }, | 37 | }, |
| 53 | { | 38 | { |
| 54 | "service_id": "241", | 39 | "service_id": "241", |
| 55 | "service_name": "Matchvs", | 40 | "service_name": "Matchvs", |
| 56 | "service_icon": "https://account.cocos.com/client/14406719a07eb3d714d36e5edc6e06fa.png", | 41 | "service_icon": "https://account.cocos.com/client/14406719a07eb3d714d36e5edc6e06fa.png", |
| 57 | "service_desc": "通过SDK接入快速实现联网功能、帧同步、国内外多节点、服务器独立部署、gameServer自定义游戏服务端逻辑。\n技术支持群QQ群:822523258", | 42 | "service_desc": "通过SDK接入快速实现联网功能、帧同步、国内外多节点、服务器独立部署、gameServer自定义游戏服务端逻辑。", |
| 58 | "service_title": "专业成熟的移动游戏联网与服务端解决方案", | 43 | "service_title": "专业成熟的移动游戏联网与服务端解决方案", |
| 59 | "service_guide_url": "http://doc.matchvs.com/QuickStart/QuickStart-CocosCreator", | 44 | "service_guide_url": "http://doc.matchvs.com/QuickStart/QuickStart-CocosCreator", |
| 60 | "service_sample_url": "http://www.matchvs.com/serviceCourse", | 45 | "service_sample_url": "http://www.matchvs.com/serviceCourse", |
| ... | @@ -66,41 +51,26 @@ | ... | @@ -66,41 +51,26 @@ |
| 66 | "iOS", | 51 | "iOS", |
| 67 | "HTML5" | 52 | "HTML5" |
| 68 | ], | 53 | ], |
| 69 | "package_download_url": "http://download.cocos.com/CocosServices/plugins/service-matchvs/1.0.9_3.7.9.9.zip", | 54 | "package_download_url": "https://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平台受限安全策略的问题", | 55 | "package_version_desc": "<p><strong>更新日期:</strong> 2019/07/18\n<strong>更新内容:</strong>\n1、修复多节点登录返回值错误\n2、修复FaceBook平台受限安全策略的问题</p>", |
| 71 | "service_component_name": "service-matchvs", | 56 | "service_component_name": "service-matchvs", |
| 72 | "package_versions": [ | 57 | "package_versions": [ |
| 73 | "1.0.3_3.7.6.4", | 58 | "1.0.9_3.7.9.9", |
| 74 | "1.0.5_3.7.7.3", | ||
| 75 | "1.0.6_3.7.9.2", | ||
| 76 | "1.0.7_3.7.9.6", | 59 | "1.0.7_3.7.9.6", |
| 77 | "1.0.9_3.7.9.9" | 60 | "1.0.6_3.7.9.2", |
| 78 | ], | 61 | "1.0.5_3.7.7.3", |
| 79 | "build_platform": [ | 62 | "1.0.3_3.7.6.4" |
| 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 | ], | 63 | ], |
| 64 | "build_platform": [], | ||
| 94 | "require_verify": 0, | 65 | "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> 中扣除。", | 66 | "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>" | 67 | "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 | }, | 68 | }, |
| 99 | { | 69 | { |
| 100 | "service_id": "242", | 70 | "service_id": "242", |
| 101 | "service_name": "Agora Voice", | 71 | "service_name": "Agora Voice", |
| 102 | "service_icon": "https://account.cocos.com/uploads/client_icon/2019-07-16/273952d155b4cdb72d2b1bc61de91ade.png", | 72 | "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", | 73 | "service_desc": "稳定、低耗、76ms超低延时、全球200+数据中心覆盖;变声器、超高音质、听声辩位等丰富玩法极速接入;全平台支持:Android、iOS、Web。", |
| 104 | "service_title": "游戏内置实时语音", | 74 | "service_title": "游戏内置实时语音", |
| 105 | "service_guide_url": "https://docs.agora.io/cn/Interactive Gaming/game_c?platform=Cocos Creator", | 75 | "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", | 76 | "service_sample_url": "https://github.com/AgoraIO/Voice-Call-for-Mobile-Gaming/tree/master/Basic-Voice-Call-for-Gaming/Hello-CocosCreator-Voice-Agora", |
| ... | @@ -112,22 +82,16 @@ | ... | @@ -112,22 +82,16 @@ |
| 112 | "iOS", | 82 | "iOS", |
| 113 | "HTML5" | 83 | "HTML5" |
| 114 | ], | 84 | ], |
| 115 | "package_download_url": "http://download.cocos.com/CocosServices/plugins/service-agora/1.0.2_2.2.3.20_2.5.2.zip", | 85 | "package_download_url": "https://download.cocos.com/CocosServices/plugins/service-agora/1.0.2_2.2.3.20_2.5.2.zip", |
| 116 | "package_version_desc": "解决Bug:onAudioVolumeIndication 回调收不到.", | 86 | "package_version_desc": "<b>更新日期:<b>2019/06/27<br>\n<br><b>更新内容:</b><br>\n1、修复部分BUG<br>\n2、代码优化", |
| 117 | "service_component_name": "service-agora", | 87 | "service_component_name": "service-agora", |
| 118 | "package_versions": [ | 88 | "package_versions": [ |
| 119 | "1.0.1_2.2.3.20_2.5.2", | 89 | "1.0.2_2.2.3.20_2.5.2", |
| 120 | "1.0.2_2.2.3.20_2.5.2" | 90 | "1.0.1_2.2.3.20_2.5.2" |
| 121 | ], | ||
| 122 | "build_platform": [ | ||
| 123 | "web-mobile", | ||
| 124 | "web-desktop", | ||
| 125 | "android", | ||
| 126 | "ios" | ||
| 127 | ], | 91 | ], |
| 92 | "build_platform": [], | ||
| 128 | "require_verify": 1, | 93 | "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> 中扣除。", | 94 | "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>" | 95 | "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 | } | 96 | } |
| 133 | ], | 97 | ], | ... | ... |
-
Please register or sign in to post a comment