good detail data structure
Showing
3 changed files
with
263 additions
and
64 deletions
@@ -683,6 +683,265 @@ | @@ -683,6 +683,265 @@ | ||
683 | } | 683 | } |
684 | } | 684 | } |
685 | 685 | ||
686 | +### 热销排行 | ||
687 | + | ||
688 | + { | ||
689 | + hotrankPage: true, //引用hotrank.js | ||
690 | + hotrank: [ | ||
691 | + { | ||
692 | + slide: { | ||
693 | + //大图列表 | ||
694 | + list: [ | ||
695 | + { | ||
696 | + 'href': '', | ||
697 | + 'img': '' | ||
698 | + }, | ||
699 | + ... | ||
700 | + ] | ||
701 | + } | ||
702 | + }, | ||
703 | + { | ||
704 | + popular: { //人气单品 | ||
705 | + name: '', //楼层标题 | ||
706 | + list: [ | ||
707 | + { | ||
708 | + href: '', //链接 | ||
709 | + img: '', //图片 | ||
710 | + title: '', //商品名称 | ||
711 | + price: '', //商品原价 | ||
712 | + sPrice: '', //商品现价 | ||
713 | + rank: '' //排行 | ||
714 | + } | ||
715 | + ... | ||
716 | + ] | ||
717 | + } | ||
718 | + } | ||
719 | + { | ||
720 | + hotBrands: { //同上logo品牌 ajax数据 | ||
721 | + name: '' //楼层标题 | ||
722 | + } | ||
723 | + }, | ||
724 | + { | ||
725 | + hotWeek: { //一周热卖 | ||
726 | + name: '' //楼层标题 | ||
727 | + nav: [ //一周热卖导航 | ||
728 | + { | ||
729 | + textCn' => 'TOP100', //导航名称 | ||
730 | + 'url' => '', | ||
731 | + 'sid' => 1 //对应ajax发送id | ||
732 | + } | ||
733 | + ], | ||
734 | + list: [ //同上面商品数据 | ||
735 | + { | ||
736 | + ... | ||
737 | + } | ||
738 | + ... | ||
739 | + ] | ||
740 | + } | ||
741 | + } | ||
742 | + ] | ||
743 | + } | ||
744 | + | ||
745 | +### 商品详情页 | ||
746 | + | ||
747 | + { | ||
748 | + detail: { | ||
749 | + banner: { | ||
750 | + bgColor: '', | ||
751 | + bgImg: '', | ||
752 | + homeUrl: '', | ||
753 | + logo: '', | ||
754 | + coled: true | ||
755 | + }, | ||
756 | + | ||
757 | + pathNav: [...], | ||
758 | + | ||
759 | + goodInfo: { | ||
760 | + skn: '', | ||
761 | + tags: [ | ||
762 | + { | ||
763 | + isNew: true | ||
764 | + }, | ||
765 | + { | ||
766 | + isReNew: true | ||
767 | + }, | ||
768 | + { | ||
769 | + isSale: true | ||
770 | + }, | ||
771 | + { | ||
772 | + isNewFestival: true | ||
773 | + }, | ||
774 | + { | ||
775 | + isLimit: true | ||
776 | + }, | ||
777 | + { | ||
778 | + isYearEndPromotion: true | ||
779 | + }, | ||
780 | + { | ||
781 | + isYearMidPromotion: true | ||
782 | + }, | ||
783 | + { | ||
784 | + isFew: true | ||
785 | + } | ||
786 | + ], | ||
787 | + img: '', | ||
788 | + name: '', | ||
789 | + brandUrl: '', | ||
790 | + brandName: '', | ||
791 | + marketPrice: 999, | ||
792 | + salePrice: 777, | ||
793 | + activity: [ | ||
794 | + { | ||
795 | + url: '', | ||
796 | + activityImg: '' | ||
797 | + }, | ||
798 | + { | ||
799 | + type: '加价购', | ||
800 | + des: '' | ||
801 | + }, | ||
802 | + ... | ||
803 | + ], | ||
804 | + colors: [ | ||
805 | + { | ||
806 | + focus: true, | ||
807 | + disable: true, | ||
808 | + title: '', | ||
809 | + src: '', | ||
810 | + thumbs: [ | ||
811 | + { | ||
812 | + url: '', | ||
813 | + img: '', //左侧缩略图 | ||
814 | + shower: '' //缩略图的大图显示 | ||
815 | + }, | ||
816 | + ... | ||
817 | + ], | ||
818 | + size: [ | ||
819 | + { | ||
820 | + skn: '', | ||
821 | + title: '', | ||
822 | + name: '' | ||
823 | + num: 20 | ||
824 | + } | ||
825 | + ] | ||
826 | + } | ||
827 | + ], | ||
828 | + coled: true, | ||
829 | + goCartUrl: '' //去购物车结算 | ||
830 | + }, | ||
831 | + | ||
832 | + description: { | ||
833 | + basic: [ | ||
834 | + { | ||
835 | + key: '材质', | ||
836 | + value: 'xxx' | ||
837 | + }, | ||
838 | + ... | ||
839 | + ], | ||
840 | + comfort: [ | ||
841 | + { | ||
842 | + name: '硬度', | ||
843 | + minDes: '软', | ||
844 | + blocks: [ | ||
845 | + { | ||
846 | + cur: true | ||
847 | + }, | ||
848 | + //n个等级 | ||
849 | + ... | ||
850 | + ], | ||
851 | + maxDes: '' | ||
852 | + }, | ||
853 | + ... | ||
854 | + ] | ||
855 | + }, | ||
856 | + material: { | ||
857 | + detail: [ | ||
858 | + { | ||
859 | + img: '', | ||
860 | + name: '', | ||
861 | + enName: '', | ||
862 | + text: '' | ||
863 | + }, | ||
864 | + ... | ||
865 | + ], | ||
866 | + wash: [ | ||
867 | + { | ||
868 | + img: '', | ||
869 | + name: '' | ||
870 | + }, | ||
871 | + ... | ||
872 | + ] | ||
873 | + }, | ||
874 | + size: { | ||
875 | + thead: [ | ||
876 | + { | ||
877 | + width: '130', | ||
878 | + name: '' | ||
879 | + }, | ||
880 | + ... | ||
881 | + ], | ||
882 | + tbody: [ | ||
883 | + [ | ||
884 | + ... //每行数据 | ||
885 | + ], | ||
886 | + ... | ||
887 | + ], | ||
888 | + sizeImg: '' | ||
889 | + }, | ||
890 | + reference: [ | ||
891 | + thead: [ | ||
892 | + { | ||
893 | + width: '', | ||
894 | + name: '' | ||
895 | + }, | ||
896 | + ... | ||
897 | + ], | ||
898 | + tbody: [ | ||
899 | + [ | ||
900 | + 'header-img-url', .., .. | ||
901 | + ], | ||
902 | + ... | ||
903 | + ] | ||
904 | + ], | ||
905 | + details: '', //html | ||
906 | + consultComment: { | ||
907 | + consultNum: 0, | ||
908 | + commentNum: 2, | ||
909 | + comments: [ | ||
910 | + { | ||
911 | + avatar: '', | ||
912 | + userName: '', | ||
913 | + color: '', | ||
914 | + size: '', | ||
915 | + date: '', | ||
916 | + comment: '' | ||
917 | + }, | ||
918 | + ... | ||
919 | + ], | ||
920 | + hasMoreComments: true, | ||
921 | + commentUrl: '', | ||
922 | + consults: [ | ||
923 | + { | ||
924 | + avatar: '', | ||
925 | + question: '', | ||
926 | + date: '', | ||
927 | + answer: '' | ||
928 | + } | ||
929 | + ], | ||
930 | + hasMoreConsults: true | ||
931 | + }, | ||
932 | + recentView: [ | ||
933 | + { | ||
934 | + url: '', | ||
935 | + img: '', | ||
936 | + name: '', | ||
937 | + marketPrice: '', | ||
938 | + salePrice: '' | ||
939 | + }, | ||
940 | + ... | ||
941 | + ] | ||
942 | + } | ||
943 | + } | ||
944 | + | ||
686 | ## 逛 | 945 | ## 逛 |
687 | 946 | ||
688 | ### 【公用】资讯 | 947 | ### 【公用】资讯 |
@@ -931,63 +1190,3 @@ | @@ -931,63 +1190,3 @@ | ||
931 | coverImg' => '##', //右侧封面地址 | 1190 | coverImg' => '##', //右侧封面地址 |
932 | } | 1191 | } |
933 | } | 1192 | } |
934 | - | ||
935 | -## Product | ||
936 | - | ||
937 | -### 热销排行 | ||
938 | -{ | ||
939 | - hotrankPage: true, //引用hotrank.js | ||
940 | - hotrank: [ | ||
941 | - { | ||
942 | - slide: { | ||
943 | - //大图列表 | ||
944 | - list: [ | ||
945 | - { | ||
946 | - 'href': '', | ||
947 | - 'img': '' | ||
948 | - }, | ||
949 | - ... | ||
950 | - ] | ||
951 | - } | ||
952 | - }, | ||
953 | - { | ||
954 | - popular: { //人气单品 | ||
955 | - name: '', //楼层标题 | ||
956 | - list: [ | ||
957 | - { | ||
958 | - href: '', //链接 | ||
959 | - img: '', //图片 | ||
960 | - title: '', //商品名称 | ||
961 | - price: '', //商品原价 | ||
962 | - sPrice: '', //商品现价 | ||
963 | - rank: '' //排行 | ||
964 | - } | ||
965 | - ... | ||
966 | - ] | ||
967 | - } | ||
968 | - } | ||
969 | - { | ||
970 | - hotBrands: { //同上logo品牌 ajax数据 | ||
971 | - name: '' //楼层标题 | ||
972 | - } | ||
973 | - }, | ||
974 | - { | ||
975 | - hotWeek: { //一周热卖 | ||
976 | - name: '' //楼层标题 | ||
977 | - nav: [ //一周热卖导航 | ||
978 | - { | ||
979 | - textCn' => 'TOP100', //导航名称 | ||
980 | - 'url' => '', | ||
981 | - 'sid' => 1 //对应ajax发送id | ||
982 | - } | ||
983 | - ], | ||
984 | - list: [ //同上面商品数据 | ||
985 | - { | ||
986 | - ... | ||
987 | - } | ||
988 | - ... | ||
989 | - ] | ||
990 | - } | ||
991 | - } | ||
992 | - ] | ||
993 | -} |
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | <div class="brand-banner" style="background:{{bgColor}}{{#if bgImg}} url({{bgImg}}){{/if}}"> | 5 | <div class="brand-banner" style="background:{{bgColor}}{{#if bgImg}} url({{bgImg}}){{/if}}"> |
6 | <div class="center-content clearfix"> | 6 | <div class="center-content clearfix"> |
7 | <a class="pull-left" href="{{homeUrl}}"> | 7 | <a class="pull-left" href="{{homeUrl}}"> |
8 | - <img src="{{logo}}" alt="{{alt}}"> | 8 | + <img src="{{logo}}"> |
9 | </a> | 9 | </a> |
10 | 10 | ||
11 | <div class="opt pull-right"> | 11 | <div class="opt pull-right"> |
@@ -97,9 +97,9 @@ | @@ -97,9 +97,9 @@ | ||
97 | <ul class="activity"> | 97 | <ul class="activity"> |
98 | {{#each activity}} | 98 | {{#each activity}} |
99 | <li> | 99 | <li> |
100 | - {{#if sizeImg}} | 100 | + {{#if activityImg}} |
101 | <a class="img-link" href="{{url}}"> | 101 | <a class="img-link" href="{{url}}"> |
102 | - <img src="{{sizeImg}}"> | 102 | + <img src="{{activityImg}}"> |
103 | </a> | 103 | </a> |
104 | {{^}} | 104 | {{^}} |
105 | <span class="ac-type">{{type}}</span> | 105 | <span class="ac-type">{{type}}</span> |
@@ -51,7 +51,7 @@ class ItemController extends AbstractAction | @@ -51,7 +51,7 @@ class ItemController extends AbstractAction | ||
51 | 'activity' => array( | 51 | 'activity' => array( |
52 | array( | 52 | array( |
53 | 'url' => '', | 53 | 'url' => '', |
54 | - 'sizeImg' => 'http://img11.static.yhbimg.com/productbanner/2015/12/11/00/01ba262a2fbac23b022eeace17cf5c3685.jpg' | 54 | + 'activityImg' => 'http://img11.static.yhbimg.com/productbanner/2015/12/11/00/01ba262a2fbac23b022eeace17cf5c3685.jpg' |
55 | ), | 55 | ), |
56 | array( | 56 | array( |
57 | 'type' => '加价购', | 57 | 'type' => '加价购', |
-
Please register or login to post a comment