list.hbs
2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<div id="product-list">
<filter-sub :data="brand" :value="3" type="brand"></filter-sub>
<Sort :config.once="sortConfig" :val="sort">
</Sort>
<List :data="productList"></List>
<Drawer v-ref:drawer>
<Filter :config.once="filterConfig"></Filter>
</Drawer>
</div>
<script>
var sortConfig = [{
txt: '默认',
val: 1
}, {
txt: '最新',
val: 2
}, {
type: 'updown',
txt: '价格',
val: [3, 4]
}, //[up, down]
{
type: 'updown',
txt: '折扣',
val: [5, 6]
}
];
var filterConfig = {
"color": [{
"id": 11,
"name": "红色",
"value": "",
"code": "ee0000"
}, {
"id": 3,
"name": "灰色",
"value": "",
"code": "b9b7af"
}, {
"id": 7,
"name": "蓝色",
"value": "",
"code": "0000fe"
}],
"gender": [{
name: 'BOYS',
id: '1,3'
}, {
name: 'GIRLS',
id: '2,3'
}],
"size": [{
"name": "110",
"id": 326
}, {
"name": "120",
"id": 327
}, {
"name": "90",
"id": 186
}, {
"name": "100",
"id": 255
}, {
"name": "130",
"id": 333
}],
"discount": [{
count: 2,
name: '7~9',
id: '0.7,0.999'
}, {
count: 3,
name: '4~6',
id: '0.4,0.699'
}],
"brand": [{
"hotKeyword": "",
"domain": "smileyworldkids",
"dlif": "S",
"isHot": "Y",
"dco": "http://img10.static.yhbimg.com/brandLogo/2015/12/23/17/01088824d9ca36f91bb9265a3cc0cc25eb.jpg",
"name": "Smiley World Kids",
"keyword": "童装",
"id": 1069,
"nameEn": "Smiley World kids",
"nameCn": "Smiley World Kids"
},
{
"hotKeyword": "",
"domain": "smileyworldkids",
"alif": "S",
"isHot": "Y",
"ico": "http://img10.static.yhbimg.com/brandLogo/2015/12/23/17/01088824d9ca36f91bb9265a3cc0cc25eb.jpg",
"name": "Smiley World Kids",
"keyword": "童装",
"id": 1069,
"nameEn": "Smiley World kids",
"nameCn": "Smiley World Kids"
}
]
};
</script>