Showing
1 changed file
with
195 additions
and
1 deletions
1 | -# WEB数据结构定义 | ||
1 | +# WEB数据结构定义 | ||
2 | + | ||
3 | +## 公共定义 | ||
4 | + | ||
5 | +### 商品 | ||
6 | + | ||
7 | + | ||
8 | +## 搜索页 | ||
9 | + | ||
10 | + { | ||
11 | + products: { | ||
12 | + //筛选相关 | ||
13 | + filters: { | ||
14 | + checkedConditions: { | ||
15 | + clearUrl: '', //清空筛选链接 | ||
16 | + conditions: [ | ||
17 | + //正常情况下文字显示 | ||
18 | + { | ||
19 | + href: '', | ||
20 | + name: '暗黑' | ||
21 | + }, | ||
22 | + //特殊情况下颜色显示 | ||
23 | + { | ||
24 | + href: '', | ||
25 | + 'color': '#f00' | ||
26 | + }, | ||
27 | + ... | ||
28 | + ] | ||
29 | + }, | ||
30 | + //-- 筛选项数据Start(需要显示就传,不显示不传) -- | ||
31 | + channel: [ | ||
32 | + { | ||
33 | + href: '', | ||
34 | + name: 'Boys' | ||
35 | + }, | ||
36 | + ... | ||
37 | + ], | ||
38 | + sort: [ | ||
39 | + { | ||
40 | + name: '上衣', | ||
41 | + sub: [ | ||
42 | + { | ||
43 | + href: '', | ||
44 | + name: 'T恤' | ||
45 | + }, | ||
46 | + ... | ||
47 | + ] | ||
48 | + }, | ||
49 | + ... | ||
50 | + ], | ||
51 | + brand: { | ||
52 | + default: [ | ||
53 | + { | ||
54 | + href: '', | ||
55 | + name: '' | ||
56 | + }, | ||
57 | + ... | ||
58 | + ], | ||
59 | + //索引:index为索引键值(字母转化为小写) | ||
60 | + brandIndex: [ | ||
61 | + { | ||
62 | + index: 'all', | ||
63 | + name: '全部' | ||
64 | + }, | ||
65 | + { | ||
66 | + index: '0-9', | ||
67 | + name: '0 ~ 9' | ||
68 | + }, | ||
69 | + { | ||
70 | + index: 'a', | ||
71 | + name: 'A' | ||
72 | + }, | ||
73 | + ... | ||
74 | + ], | ||
75 | + brandShow: [ | ||
76 | + { | ||
77 | + id: 1, | ||
78 | + href: '', | ||
79 | + index:'0-9', //与brandIndex中索引一致 | ||
80 | + name: '5cm', | ||
81 | + key: '5cm' //key为品牌关键字,用于搜索和索引,保持小写 | ||
82 | + }, | ||
83 | + { | ||
84 | + id: 2, | ||
85 | + href: '', | ||
86 | + index: 'k', | ||
87 | + name: 'KTZ', | ||
88 | + key: 'ktz' | ||
89 | + }, | ||
90 | + ... | ||
91 | + ], | ||
92 | + price: [ | ||
93 | + { | ||
94 | + href: '', | ||
95 | + name: '0-239' | ||
96 | + }, | ||
97 | + ... | ||
98 | + ], | ||
99 | + color: [ | ||
100 | + { | ||
101 | + href: '', | ||
102 | + name: '黑色', | ||
103 | + rgb: '#000' //此处若为彩色和银色,需要传图片路径字符串:url('path/to/img') | ||
104 | + }, | ||
105 | + ... | ||
106 | + ], | ||
107 | + size: [ | ||
108 | + { | ||
109 | + href: '', | ||
110 | + name: '' | ||
111 | + }, | ||
112 | + ... | ||
113 | + ], | ||
114 | + seniorChose: [ | ||
115 | + { | ||
116 | + attr: 'style', //查找的键值 | ||
117 | + name: '风格', | ||
118 | + showMulti: true, //是否显示多选按钮 | ||
119 | + sub: [ | ||
120 | + { | ||
121 | + id: '', | ||
122 | + href: '', | ||
123 | + name: '' | ||
124 | + }, | ||
125 | + ... | ||
126 | + ] | ||
127 | + }, | ||
128 | + ... | ||
129 | + ] | ||
130 | + } | ||
131 | + }, | ||
132 | + //操作Banner相关 | ||
133 | + opts: { | ||
134 | + sortType: [ | ||
135 | + { | ||
136 | + href: '', | ||
137 | + name: '默认' | ||
138 | + }, | ||
139 | + { | ||
140 | + active: true, //当前选中 | ||
141 | + href: '', | ||
142 | + name: '最新', | ||
143 | + hasSortOrient: true, //是否有正逆序 | ||
144 | + desc: true //逆序排序(默认不传为正序) | ||
145 | + }, | ||
146 | + { | ||
147 | + href: '', | ||
148 | + name: '价格', | ||
149 | + hasSortOrient: true | ||
150 | + }, | ||
151 | + { | ||
152 | + href: '', | ||
153 | + name: '折扣', | ||
154 | + hasSortOrient: true | ||
155 | + } | ||
156 | + ], | ||
157 | + checks: [ | ||
158 | + { | ||
159 | + name: '新品', | ||
160 | + checked: true, | ||
161 | + href: '' | ||
162 | + }, | ||
163 | + { | ||
164 | + name: '打折', | ||
165 | + href: '' | ||
166 | + }, | ||
167 | + { | ||
168 | + name: '限量', | ||
169 | + href: '' | ||
170 | + } | ||
171 | + ], | ||
172 | + fivePerLine: true, | ||
173 | + sixPerLineHref: '', | ||
174 | + //or | ||
175 | + sixPerLine: true, | ||
176 | + fivePerLineHref: '', | ||
177 | + | ||
178 | + countPerPage => 120, | ||
179 | + pageCounts => [ | ||
180 | + { | ||
181 | + href: '', | ||
182 | + count: 60 | ||
183 | + }, | ||
184 | + ... | ||
185 | + ], | ||
186 | + | ||
187 | + | ||
188 | + curPage: 1, | ||
189 | + pageCount: 30, | ||
190 | + preHref: '', //若当前为第一页,不传此参数 | ||
191 | + nexHref: '' //若当前为最后一页,不传此参数 | ||
192 | + }, | ||
193 | + //商品列表 | ||
194 | + } | ||
195 | + } |
-
Please register or login to post a comment