Showing
8 changed files
with
484 additions
and
858 deletions
@@ -70,6 +70,10 @@ | @@ -70,6 +70,10 @@ | ||
70 | {{#each goods}} | 70 | {{#each goods}} |
71 | {{> product/good}} | 71 | {{> product/good}} |
72 | {{/each}} | 72 | {{/each}} |
73 | + <div class="good-item-wrapper"> | ||
74 | + <div class="good-info-main"></div> | ||
75 | + <div class="good-select-color"></div> | ||
76 | + </div> | ||
73 | </div> | 77 | </div> |
74 | </div> | 78 | </div> |
75 | {{/ brandAbout}} | 79 | {{/ brandAbout}} |
web-static/js/product/filter.js
0 → 100644
1 | +/** | ||
2 | + * 商品筛选逻辑 | ||
3 | + * @author: xuqi<qi.xu@yoho.cn> | ||
4 | + * @date: 2015/12/4 | ||
5 | + */ | ||
6 | + | ||
7 | +var $ = require('yoho.jquery'); | ||
8 | + | ||
9 | +var checkUnicode = { | ||
10 | + unchecked: '', | ||
11 | + checked: '' | ||
12 | +}, | ||
13 | +moreUnicode = { | ||
14 | + up: '', | ||
15 | + down: '' | ||
16 | +}; | ||
17 | + | ||
18 | +//品牌相关变量 | ||
19 | +var $brandDefault = $('.brand .default'), | ||
20 | + $brandPanel = $('.brand .brand-panel'), | ||
21 | + $brandAttrs = $('.brand .attr'), | ||
22 | + $brandMore = $('#brand-more'), | ||
23 | + $brandMulti = $('#brand-multi'); | ||
24 | + | ||
25 | +var $brandMoreTxt, $brandMoreIcon; | ||
26 | + | ||
27 | +//价格相关变量 | ||
28 | +var $udPrice = $('.ud-price-range'), | ||
29 | + interReg = /^\d+$/, | ||
30 | + $limit, $min, $max, $btn; | ||
31 | + | ||
32 | +//分类相关变量 | ||
33 | +var $sortSub = $('.sort-sub-wrap'); | ||
34 | + | ||
35 | +//高级选项相关变量 | ||
36 | +var $seniorSubWrap = $('.senior-sub-wrap'), | ||
37 | + $seniorAttrWrap = $('.senior-attr-wrap'); | ||
38 | + | ||
39 | +var seniorHoverTime, hoveredIndex; | ||
40 | + | ||
41 | +//清除checkbox选中状态 | ||
42 | +function clearChecked($checkbox) { | ||
43 | + $checkbox.removeClass('checked').html(checkUnicode.unchecked); | ||
44 | +} | ||
45 | + | ||
46 | +//显示更多品牌面板 | ||
47 | +function brandShowMore() { | ||
48 | + $brandDefault.addClass('hide'); | ||
49 | + $brandPanel.removeClass('hide'); | ||
50 | +} | ||
51 | + | ||
52 | +//隐藏更多品牌面板 | ||
53 | +function brandHideMore() { | ||
54 | + $brandPanel.addClass('hide'); | ||
55 | + $brandDefault.removeClass('hide'); | ||
56 | +} | ||
57 | + | ||
58 | +//url构造&跳转 | ||
59 | +function uriLoc(attr, val) { | ||
60 | + var href = decodeURIComponent(window.location.search), | ||
61 | + query = attr + '=' + val, | ||
62 | + newHref; | ||
63 | + | ||
64 | + if (href === '') { | ||
65 | + newHref = '?' + query; | ||
66 | + } else { | ||
67 | + newHref = href + '&' + query; | ||
68 | + } | ||
69 | + | ||
70 | + window.location.href = newHref; | ||
71 | +} | ||
72 | + | ||
73 | +//隐藏高级选项面板 | ||
74 | +function hideSeniorPanel(index) { | ||
75 | + $seniorSubWrap.children('.senior-sub:eq(' + hoveredIndex + ')').addClass('hide'); | ||
76 | + $seniorAttrWrap.children('.attr:eq(' + hoveredIndex + ')').removeClass('hover'); | ||
77 | + hoveredIndex = -1; | ||
78 | +} | ||
79 | + | ||
80 | +//屏蔽筛选项双击文字选中 | ||
81 | +$('.filter-box').on('selectstart', '.attr, .brands-index span', function() { | ||
82 | + return false; | ||
83 | +}); | ||
84 | + | ||
85 | +//【分类】 | ||
86 | +$('.sort-pre').on('click', 'li', function() { | ||
87 | + var $this = $(this), | ||
88 | + index = $this.index(); | ||
89 | + | ||
90 | + $this.siblings('.active').removeClass('active'); | ||
91 | + $this.addClass('active'); | ||
92 | + | ||
93 | + $sortSub.children(':not(.hide)').addClass('hide'); | ||
94 | + $sortSub.children(':eq(' + index + ')').removeClass('hide'); | ||
95 | +}); | ||
96 | + | ||
97 | +//【品牌】 | ||
98 | +if ($brandMore.length > 0) { | ||
99 | + $brandMoreTxt = $brandMore.children('em'); | ||
100 | + $brandMoreIcon = $brandMore.children('.iconfont'); | ||
101 | +} | ||
102 | + | ||
103 | +//【品牌】多选 | ||
104 | +$brandMulti.click(function() { | ||
105 | + if ($brandPanel.css('display') === 'none') { | ||
106 | + | ||
107 | + //显示品牌面板 | ||
108 | + brandShowMore(); | ||
109 | + } | ||
110 | + | ||
111 | + $brandPanel.addClass('multi'); //显示出checkbox | ||
112 | + $(this).addClass('hide'); | ||
113 | +}); | ||
114 | + | ||
115 | +//【品牌】更多 | ||
116 | +$brandMore.click(function() { | ||
117 | + var $this = $(this); | ||
118 | + | ||
119 | + if ($this.hasClass('more')) { | ||
120 | + brandHideMore(); | ||
121 | + | ||
122 | + $brandMoreTxt.text('更多'); | ||
123 | + $brandMoreIcon.html(moreUnicode.down); | ||
124 | + } else { | ||
125 | + brandShowMore(); | ||
126 | + | ||
127 | + $brandMoreTxt.text('收起'); | ||
128 | + $brandMoreIcon.html(moreUnicode.up); | ||
129 | + } | ||
130 | + | ||
131 | + $(this).toggleClass('more'); | ||
132 | +}); | ||
133 | + | ||
134 | +//【品牌】索引 | ||
135 | +$('.brands-index').on('click', 'span', function() { | ||
136 | + var $this = $(this), | ||
137 | + index = $this.data('index'); | ||
138 | + | ||
139 | + if ($this.index() === 0) { | ||
140 | + | ||
141 | + //全部 | ||
142 | + $brandAttrs.removeClass('hide'); | ||
143 | + } else { | ||
144 | + $brandAttrs.addClass('hide').filter('[data-index=' + index + ']').removeClass('hide'); | ||
145 | + } | ||
146 | +}); | ||
147 | + | ||
148 | +//【品牌】搜索 | ||
149 | +$('#brand-search-input').keyup(function() { | ||
150 | + var val = $(this).val().toLowerCase(); | ||
151 | + | ||
152 | + if (val === '') { | ||
153 | + $brandAttrs.removeClass('hide'); | ||
154 | + } else { | ||
155 | + $brandAttrs.addClass('hide').filter('[data-key*=' + val + ']').removeClass('hide'); | ||
156 | + } | ||
157 | +}); | ||
158 | + | ||
159 | +//【品牌】多选确定 | ||
160 | +$('#brand-multi-ok').click(function() { | ||
161 | + var val = ''; | ||
162 | + | ||
163 | + if ($(this).hasClass('dis')) { | ||
164 | + return; | ||
165 | + } | ||
166 | + | ||
167 | + $brandPanel.find('.checked').each(function() { | ||
168 | + var id = $(this).data('id'); | ||
169 | + | ||
170 | + val += (val === '') ? id : (',' + id); | ||
171 | + }); | ||
172 | + | ||
173 | + uriLoc('brand', val); | ||
174 | +}); | ||
175 | + | ||
176 | +//【品牌/高级选项】多选取消 | ||
177 | +$('.multi-select-cancel').click(function() { | ||
178 | + var $panel = $(this).closest('.multi'); | ||
179 | + | ||
180 | + if ($panel.hasClass('brand-panel')) { | ||
181 | + brandHideMore(); | ||
182 | + | ||
183 | + $brandMulti.removeClass('hide'); //显示多选按钮 | ||
184 | + } | ||
185 | + | ||
186 | + $panel.removeClass('multi'); | ||
187 | + clearChecked($panel.find('.checkbox.checked')); //清除选中状态 | ||
188 | +}); | ||
189 | + | ||
190 | +//【品牌/高级选项】checkbox | ||
191 | +$('.check-container').on('click', '.attr', function() { | ||
192 | + var $this = $(this), | ||
193 | + $check = $this.find('.checkbox'), | ||
194 | + $btnOk = $this.parent('.check-container').next('.btns').find('.multi-select-ok'); | ||
195 | + | ||
196 | + $check.toggleClass('checked'); | ||
197 | + | ||
198 | + if ($check.hasClass('checked')) { | ||
199 | + $check.html(checkUnicode.checked); | ||
200 | + } else { | ||
201 | + $check.html(checkUnicode.unchecked); | ||
202 | + } | ||
203 | + | ||
204 | + //更新按钮状态 | ||
205 | + if ($check.hasClass('checked') || | ||
206 | + $this.siblings('.attr').find('.checked').length > 0) { | ||
207 | + $btnOk.removeClass('dis'); | ||
208 | + } else { | ||
209 | + $btnOk.addClass('dis'); | ||
210 | + } | ||
211 | +}); | ||
212 | + | ||
213 | +//【品牌/高级选项】当多选时阻止链接默认跳转 | ||
214 | +$('.brand, .senior').on('click', '.attr > a', function(e) { | ||
215 | + if ($(this).closest('.multi').length > 0) { | ||
216 | + e.preventDefault(); | ||
217 | + } | ||
218 | +}); | ||
219 | + | ||
220 | +//【价格】用户定义价格处理 | ||
221 | +if ($udPrice.length > 0) { | ||
222 | + $limit = $udPrice.find('.limit'); | ||
223 | + $min = $limit.filter('.min'); | ||
224 | + $max = $limit.filter('.max'); | ||
225 | + $btn = $udPrice.find('.price-sure'); | ||
226 | + | ||
227 | + //【价格】输入 | ||
228 | + $limit.keyup(function() { | ||
229 | + var min = $.trim($min.val()), | ||
230 | + max = $.trim($max.val()), | ||
231 | + isMinInt = interReg.test(min), | ||
232 | + isMaxInt = interReg.test(max); | ||
233 | + | ||
234 | + if (isMaxInt && (min === '' || isMinInt) || | ||
235 | + isMinInt && (max === '' || isMaxInt) | ||
236 | + ) { | ||
237 | + $btn.removeClass('hide'); | ||
238 | + } else { | ||
239 | + $btn.addClass('hide'); | ||
240 | + } | ||
241 | + }); | ||
242 | + | ||
243 | + //【价格】多项查询 | ||
244 | + $btn.click(function() { | ||
245 | + var min = $.trim($min.val()), | ||
246 | + max = $.trim($max.val()), | ||
247 | + tmp; | ||
248 | + | ||
249 | + //对于min大于max的情况,交换位置 | ||
250 | + if (min !== '' && max !== '' && +min > +max) { | ||
251 | + tmp = max; | ||
252 | + max = min; | ||
253 | + min = tmp; | ||
254 | + } | ||
255 | + | ||
256 | + uriLoc('price', min + ',' + max); | ||
257 | + }); | ||
258 | +} | ||
259 | + | ||
260 | +//【高级选项】鼠标移入显示子项 | ||
261 | +$seniorAttrWrap.on('mouseenter', '.attr', function() { | ||
262 | + var index = $(this).addClass('hover').index(); | ||
263 | + | ||
264 | + $seniorSubWrap.children('.senior-sub:eq(' + index + ')').removeClass('hide'); | ||
265 | +}).on('mouseleave', '.attr', function() { | ||
266 | + var $this = $(this), | ||
267 | + index = $this.index(); | ||
268 | + | ||
269 | + hoveredIndex = index; | ||
270 | + | ||
271 | + seniorHoverTime = setTimeout(function() { | ||
272 | + hideSeniorPanel(); | ||
273 | + }, 100); | ||
274 | +}); | ||
275 | + | ||
276 | +//【高级选项】多选 | ||
277 | +$('.senior-sub').on('click', '.multi-select', function() { | ||
278 | + $(this).closest('.senior-sub').addClass('multi'); | ||
279 | +}).on('click', '.multi-select-ok', function() { | ||
280 | + var $btn = $(this), | ||
281 | + $sub = $btn.closest('.senior-sub'), | ||
282 | + val = ''; | ||
283 | + | ||
284 | + if ($btn.hasClass('dis')) { | ||
285 | + return; | ||
286 | + } | ||
287 | + | ||
288 | + $sub.find('.checked').each(function() { | ||
289 | + var id = $(this).data('id'); | ||
290 | + | ||
291 | + val += (val === '') ? id : (',' + id); | ||
292 | + }); | ||
293 | + | ||
294 | + uriLoc($sub.data('attr'), val); | ||
295 | +}).on('mouseenter', function() { | ||
296 | + clearTimeout(seniorHoverTime); | ||
297 | +}).on('mouseleave', function() { | ||
298 | + hideSeniorPanel(); | ||
299 | +}); |
@@ -4,320 +4,8 @@ | @@ -4,320 +4,8 @@ | ||
4 | * @date: 2015/11/23 | 4 | * @date: 2015/11/23 |
5 | */ | 5 | */ |
6 | 6 | ||
7 | -var $ = require('yoho.jquery'); | 7 | +require('./filter'); |
8 | 8 | ||
9 | -var checkUnicode = { | ||
10 | - unchecked: '', | ||
11 | - checked: '' | ||
12 | -}, | ||
13 | -moreUnicode = { | ||
14 | - up: '', | ||
15 | - down: '' | ||
16 | -}; | 9 | +require('./sort-pager'); |
17 | 10 | ||
18 | -//品牌相关变量 | ||
19 | -var $brandDefault = $('.brand .default'), | ||
20 | - $brandPanel = $('.brand .brand-panel'), | ||
21 | - $brandAttrs = $('.brand .attr'), | ||
22 | - $brandMore = $('#brand-more'), | ||
23 | - $brandMulti = $('#brand-multi'); | ||
24 | - | ||
25 | -var $brandMoreTxt, $brandMoreIcon; | ||
26 | - | ||
27 | -//价格相关变量 | ||
28 | -var $udPrice = $('.ud-price-range'), | ||
29 | - interReg = /^\d+$/, | ||
30 | - $limit, $min, $max, $btn; | ||
31 | - | ||
32 | -//分类相关变量 | ||
33 | -var $sortSub = $('.sort-sub-wrap'); | ||
34 | - | ||
35 | -//高级选项相关变量 | ||
36 | -var $seniorSubWrap = $('.senior-sub-wrap'), | ||
37 | - $seniorAttrWrap = $('.senior-attr-wrap'); | ||
38 | - | ||
39 | -var seniorHoverTime, hoveredIndex; | ||
40 | - | ||
41 | -//清除checkbox选中状态 | ||
42 | -function clearChecked($checkbox) { | ||
43 | - $checkbox.removeClass('checked').html(checkUnicode.unchecked); | ||
44 | -} | ||
45 | - | ||
46 | -//显示更多品牌面板 | ||
47 | -function brandShowMore() { | ||
48 | - $brandDefault.addClass('hide'); | ||
49 | - $brandPanel.removeClass('hide'); | ||
50 | -} | ||
51 | - | ||
52 | -//隐藏更多品牌面板 | ||
53 | -function brandHideMore() { | ||
54 | - $brandPanel.addClass('hide'); | ||
55 | - $brandDefault.removeClass('hide'); | ||
56 | -} | ||
57 | - | ||
58 | -//url构造&跳转 | ||
59 | -function uriLoc(attr, val) { | ||
60 | - var href = decodeURIComponent(window.location.search), | ||
61 | - query = attr + '=' + val, | ||
62 | - newHref; | ||
63 | - | ||
64 | - if (href === '') { | ||
65 | - newHref = '?' + query; | ||
66 | - } else { | ||
67 | - newHref = href + '&' + query; | ||
68 | - } | ||
69 | - | ||
70 | - window.location.href = newHref; | ||
71 | -} | ||
72 | - | ||
73 | -//隐藏高级选项面板 | ||
74 | -function hideSeniorPanel(index) { | ||
75 | - $seniorSubWrap.children('.senior-sub:eq(' + hoveredIndex + ')').addClass('hide'); | ||
76 | - $seniorAttrWrap.children('.attr:eq(' + hoveredIndex + ')').removeClass('hover'); | ||
77 | - hoveredIndex = -1; | ||
78 | -} | ||
79 | - | ||
80 | -//屏蔽筛选项双击文字选中 | ||
81 | -$('.filter-box').on('selectstart', '.attr, .brands-index span', function() { | ||
82 | - return false; | ||
83 | -}); | ||
84 | - | ||
85 | -//【分类】 | ||
86 | -$('.sort-pre').on('click', 'li', function() { | ||
87 | - var $this = $(this), | ||
88 | - index = $this.index(); | ||
89 | - | ||
90 | - $this.siblings('.active').removeClass('active'); | ||
91 | - $this.addClass('active'); | ||
92 | - | ||
93 | - $sortSub.children(':not(.hide)').addClass('hide'); | ||
94 | - $sortSub.children(':eq(' + index + ')').removeClass('hide'); | ||
95 | -}); | ||
96 | - | ||
97 | -//【品牌】 | ||
98 | -if ($brandMore.length > 0) { | ||
99 | - $brandMoreTxt = $brandMore.children('em'); | ||
100 | - $brandMoreIcon = $brandMore.children('.iconfont'); | ||
101 | -} | ||
102 | - | ||
103 | -//【品牌】多选 | ||
104 | -$brandMulti.click(function() { | ||
105 | - if ($brandPanel.css('display') === 'none') { | ||
106 | - | ||
107 | - //显示品牌面板 | ||
108 | - brandShowMore(); | ||
109 | - } | ||
110 | - | ||
111 | - $brandPanel.addClass('multi'); //显示出checkbox | ||
112 | - $(this).addClass('hide'); | ||
113 | -}); | ||
114 | - | ||
115 | -//【品牌】更多 | ||
116 | -$brandMore.click(function() { | ||
117 | - var $this = $(this); | ||
118 | - | ||
119 | - if ($this.hasClass('more')) { | ||
120 | - brandHideMore(); | ||
121 | - | ||
122 | - $brandMoreTxt.text('更多'); | ||
123 | - $brandMoreIcon.html(moreUnicode.down); | ||
124 | - } else { | ||
125 | - brandShowMore(); | ||
126 | - | ||
127 | - $brandMoreTxt.text('收起'); | ||
128 | - $brandMoreIcon.html(moreUnicode.up); | ||
129 | - } | ||
130 | - | ||
131 | - $(this).toggleClass('more'); | ||
132 | -}); | ||
133 | - | ||
134 | -//【品牌】索引 | ||
135 | -$('.brands-index').on('click', 'span', function() { | ||
136 | - var $this = $(this), | ||
137 | - index = $this.data('index'); | ||
138 | - | ||
139 | - if ($this.index() === 0) { | ||
140 | - | ||
141 | - //全部 | ||
142 | - $brandAttrs.removeClass('hide'); | ||
143 | - } else { | ||
144 | - $brandAttrs.addClass('hide').filter('[data-index=' + index + ']').removeClass('hide'); | ||
145 | - } | ||
146 | -}); | ||
147 | - | ||
148 | -//【品牌】搜索 | ||
149 | -$('#brand-search-input').keyup(function() { | ||
150 | - var val = $(this).val().toLowerCase(); | ||
151 | - | ||
152 | - if (val === '') { | ||
153 | - $brandAttrs.removeClass('hide'); | ||
154 | - } else { | ||
155 | - $brandAttrs.addClass('hide').filter('[data-key*=' + val + ']').removeClass('hide'); | ||
156 | - } | ||
157 | -}); | ||
158 | - | ||
159 | -//【品牌】多选确定 | ||
160 | -$('#brand-multi-ok').click(function() { | ||
161 | - var val = ''; | ||
162 | - | ||
163 | - if ($(this).hasClass('dis')) { | ||
164 | - return; | ||
165 | - } | ||
166 | - | ||
167 | - $brandPanel.find('.checked').each(function() { | ||
168 | - var id = $(this).data('id'); | ||
169 | - | ||
170 | - val += (val === '') ? id : (',' + id); | ||
171 | - }); | ||
172 | - | ||
173 | - uriLoc('brand', val); | ||
174 | -}); | ||
175 | - | ||
176 | -//【品牌/高级选项】多选取消 | ||
177 | -$('.multi-select-cancel').click(function() { | ||
178 | - var $panel = $(this).closest('.multi'); | ||
179 | - | ||
180 | - if ($panel.hasClass('brand-panel')) { | ||
181 | - brandHideMore(); | ||
182 | - | ||
183 | - $brandMulti.removeClass('hide'); //显示多选按钮 | ||
184 | - } | ||
185 | - | ||
186 | - $panel.removeClass('multi'); | ||
187 | - clearChecked($panel.find('.checkbox.checked')); //清除选中状态 | ||
188 | -}); | ||
189 | - | ||
190 | -//【品牌/高级选项】checkbox | ||
191 | -$('.check-container').on('click', '.attr', function() { | ||
192 | - var $this = $(this), | ||
193 | - $check = $this.find('.checkbox'), | ||
194 | - $btnOk = $this.parent('.check-container').next('.btns').find('.multi-select-ok'); | ||
195 | - | ||
196 | - $check.toggleClass('checked'); | ||
197 | - | ||
198 | - if ($check.hasClass('checked')) { | ||
199 | - $check.html(checkUnicode.checked); | ||
200 | - } else { | ||
201 | - $check.html(checkUnicode.unchecked); | ||
202 | - } | ||
203 | - | ||
204 | - //更新按钮状态 | ||
205 | - if ($check.hasClass('checked') || | ||
206 | - $this.siblings('.attr').find('.checked').length > 0) { | ||
207 | - $btnOk.removeClass('dis'); | ||
208 | - } else { | ||
209 | - $btnOk.addClass('dis'); | ||
210 | - } | ||
211 | -}); | ||
212 | - | ||
213 | -//【品牌/高级选项】当多选时阻止链接默认跳转 | ||
214 | -$('.brand, .senior').on('click', '.attr > a', function(e) { | ||
215 | - if ($(this).closest('.multi').length > 0) { | ||
216 | - e.preventDefault(); | ||
217 | - } | ||
218 | -}); | ||
219 | - | ||
220 | -//【价格】用户定义价格处理 | ||
221 | -if ($udPrice.length > 0) { | ||
222 | - $limit = $udPrice.find('.limit'); | ||
223 | - $min = $limit.filter('.min'); | ||
224 | - $max = $limit.filter('.max'); | ||
225 | - $btn = $udPrice.find('.price-sure'); | ||
226 | - | ||
227 | - //【价格】输入 | ||
228 | - $limit.keyup(function() { | ||
229 | - var min = $.trim($min.val()), | ||
230 | - max = $.trim($max.val()), | ||
231 | - isMinInt = interReg.test(min), | ||
232 | - isMaxInt = interReg.test(max); | ||
233 | - | ||
234 | - if (isMaxInt && (min === '' || isMinInt) || | ||
235 | - isMinInt && (max === '' || isMaxInt) | ||
236 | - ) { | ||
237 | - $btn.removeClass('hide'); | ||
238 | - } else { | ||
239 | - $btn.addClass('hide'); | ||
240 | - } | ||
241 | - }); | ||
242 | - | ||
243 | - //【价格】多项查询 | ||
244 | - $btn.click(function() { | ||
245 | - var min = $.trim($min.val()), | ||
246 | - max = $.trim($max.val()), | ||
247 | - tmp; | ||
248 | - | ||
249 | - //对于min大于max的情况,交换位置 | ||
250 | - if (min !== '' && max !== '' && +min > +max) { | ||
251 | - tmp = max; | ||
252 | - max = min; | ||
253 | - min = tmp; | ||
254 | - } | ||
255 | - | ||
256 | - uriLoc('price', min + ',' + max); | ||
257 | - }); | ||
258 | -} | ||
259 | - | ||
260 | -//【高级选项】鼠标移入显示子项 | ||
261 | -$seniorAttrWrap.on('mouseenter', '.attr', function() { | ||
262 | - var index = $(this).addClass('hover').index(); | ||
263 | - | ||
264 | - $seniorSubWrap.children('.senior-sub:eq(' + index + ')').removeClass('hide'); | ||
265 | -}).on('mouseleave', '.attr', function() { | ||
266 | - var $this = $(this), | ||
267 | - index = $this.index(); | ||
268 | - | ||
269 | - hoveredIndex = index; | ||
270 | - | ||
271 | - seniorHoverTime = setTimeout(function() { | ||
272 | - hideSeniorPanel(); | ||
273 | - }, 100); | ||
274 | -}); | ||
275 | - | ||
276 | -//【高级选项】多选 | ||
277 | -$('.senior-sub').on('click', '.multi-select', function() { | ||
278 | - $(this).closest('.senior-sub').addClass('multi'); | ||
279 | -}).on('click', '.multi-select-ok', function() { | ||
280 | - var $btn = $(this), | ||
281 | - $sub = $btn.closest('.senior-sub'), | ||
282 | - val = ''; | ||
283 | - | ||
284 | - if ($btn.hasClass('dis')) { | ||
285 | - return; | ||
286 | - } | ||
287 | - | ||
288 | - $sub.find('.checked').each(function() { | ||
289 | - var id = $(this).data('id'); | ||
290 | - | ||
291 | - val += (val === '') ? id : (',' + id); | ||
292 | - }); | ||
293 | - | ||
294 | - uriLoc($sub.data('attr'), val); | ||
295 | -}).on('mouseenter', function() { | ||
296 | - clearTimeout(seniorHoverTime); | ||
297 | -}).on('mouseleave', function() { | ||
298 | - hideSeniorPanel(); | ||
299 | -}); | ||
300 | - | ||
301 | -//操作栏 | ||
302 | -(function() { | ||
303 | - var $countPerPage = $('#count-per-page'), | ||
304 | - $countChose = $countPerPage.next('ul'); | ||
305 | - | ||
306 | - var SLIDETIME = 200; | ||
307 | - | ||
308 | - $(document).click(function(e) { | ||
309 | - if ($(e.target).closest('.page-count').length > 0) { | ||
310 | - return; | ||
311 | - } | ||
312 | - | ||
313 | - $countChose && $countChose.slideUp(SLIDETIME); | ||
314 | - }); | ||
315 | - | ||
316 | - $countPerPage.click(function() { | ||
317 | - if ($countChose.css('display') === 'none') { | ||
318 | - $countChose.slideDown(SLIDETIME); | ||
319 | - } else { | ||
320 | - $countChose.slideUp(SLIDETIME); | ||
321 | - } | ||
322 | - }); | ||
323 | -}()); | 11 | +require('./product'); |
web-static/js/product/sort-pager.js
0 → 100644
1 | +/** | ||
2 | + * 筛选页和列表页操作banner中的每页N个商品选择逻辑 | ||
3 | + * @author: xuqi<qi.xu@yoho.cn> | ||
4 | + * @date: 2015/12/4 | ||
5 | + */ | ||
6 | + | ||
7 | +var $ = require('yoho.jquery'); | ||
8 | + | ||
9 | +var $countPerPage = $('#count-per-page'), | ||
10 | + $countChose = $countPerPage.next('ul'); | ||
11 | + | ||
12 | +var SLIDETIME = 200; | ||
13 | + | ||
14 | +$(document).click(function(e) { | ||
15 | + if ($(e.target).closest('.page-count').length > 0) { | ||
16 | + return; | ||
17 | + } | ||
18 | + | ||
19 | + $countChose && $countChose.slideUp(SLIDETIME); | ||
20 | +}); | ||
21 | + | ||
22 | +$countPerPage.click(function() { | ||
23 | + if ($countChose.css('display') === 'none') { | ||
24 | + $countChose.slideDown(SLIDETIME); | ||
25 | + } else { | ||
26 | + $countChose.slideUp(SLIDETIME); | ||
27 | + } | ||
28 | +}); |
web-static/sass/product/_good.scss
0 → 100644
1 | +.good-info { | ||
2 | + height: 400px; //todo | ||
3 | + margin-bottom: 35px; | ||
4 | + width: 222px; | ||
5 | + margin-right: 10px; | ||
6 | + float: left; | ||
7 | + | ||
8 | + //图片 | ||
9 | + .good-detail-img { | ||
10 | + width: 100%; | ||
11 | + height: 300px; | ||
12 | + position: relative; | ||
13 | + | ||
14 | + .good-thumb, img.lazy { | ||
15 | + display: block; | ||
16 | + overflow: hidden; | ||
17 | + width: 100%; | ||
18 | + height: 100%; | ||
19 | + } | ||
20 | + .few-tag { | ||
21 | + width: 100%; | ||
22 | + position: absolute; | ||
23 | + left: 0; | ||
24 | + height: 16px; | ||
25 | + line-height: 16px; | ||
26 | + background: #ffac5b; | ||
27 | + color: #fff; | ||
28 | + font-size: 12px; | ||
29 | + text-align: center; | ||
30 | + bottom: 0; | ||
31 | + } | ||
32 | + } | ||
33 | + | ||
34 | + //文本 | ||
35 | + .good-detail-text { | ||
36 | + color: #222; | ||
37 | + font-size: 12px; | ||
38 | + text-align: center; | ||
39 | + | ||
40 | + > a { | ||
41 | + margin-top: 16px; | ||
42 | + line-height: 1.5; | ||
43 | + display: block; | ||
44 | + } | ||
45 | + | ||
46 | + > .price { | ||
47 | + margin-top: 10px; | ||
48 | + } | ||
49 | + } | ||
50 | + | ||
51 | + .col-btn { | ||
52 | + position: absolute; | ||
53 | + top: 15px; | ||
54 | + right: 15px; | ||
55 | + color: #ccc; | ||
56 | + font-size: 12px; | ||
57 | + display: none; | ||
58 | + } | ||
59 | + | ||
60 | + .tag-container { | ||
61 | + font-size: 12px; | ||
62 | + height: 22px; | ||
63 | + line-height: 22px; | ||
64 | + | ||
65 | + .good-tag { | ||
66 | + padding: 0 7px; | ||
67 | + display: block; | ||
68 | + float: left; | ||
69 | + margin-right: 3px; | ||
70 | + | ||
71 | + &:nth-last-of-type(1) { | ||
72 | + margin-right: 0; | ||
73 | + } | ||
74 | + | ||
75 | + @each $tag, $tagColor, $tagBackground in (new-tag, #fff, #78dc7d), | ||
76 | + (renew-tag, #fff, #78dc7e), | ||
77 | + (new-festival-tag, #fff, #000000), | ||
78 | + (yep-tag, #fff, #ff565b), | ||
79 | + (ymp-tag, #fff, #ff565b), | ||
80 | + (sale-tag, #fff, #ff565b) { | ||
81 | + &.#{$tag} { | ||
82 | + color: $tagColor; | ||
83 | + background: $tagBackground; | ||
84 | + } | ||
85 | + } | ||
86 | + &.limit-tag { | ||
87 | + color: #4e4e4e; | ||
88 | + border: 1px solid #4e4e4e; | ||
89 | + } | ||
90 | + } | ||
91 | + } | ||
92 | +} | ||
93 | + | ||
94 | +//弹层 | ||
95 | +.good-item-wrapper { | ||
96 | + border: 1px solid #dddddd; | ||
97 | + padding-left: 20px; | ||
98 | + padding-top: 18px; | ||
99 | + padding-right: 20px; | ||
100 | + position: absolute; | ||
101 | + background: #fff; | ||
102 | + display: none; | ||
103 | + | ||
104 | + .good-info-main{ | ||
105 | + float: left; | ||
106 | + | ||
107 | + .col-btn { | ||
108 | + display: block; | ||
109 | + | ||
110 | + &:hover { | ||
111 | + color: #f95b4f; | ||
112 | + cursor: pointer; | ||
113 | + } | ||
114 | + } | ||
115 | + } | ||
116 | + | ||
117 | + .good-select-color { | ||
118 | + float: left; | ||
119 | + margin-top: 22px; | ||
120 | + | ||
121 | + ul { | ||
122 | + display: block; | ||
123 | + float: left; | ||
124 | + margin-left: 15px; | ||
125 | + } | ||
126 | + | ||
127 | + li { | ||
128 | + width: 50px; | ||
129 | + margin-bottom: 15px; | ||
130 | + | ||
131 | + a, img { | ||
132 | + display: block; | ||
133 | + overflow: hidden; | ||
134 | + width: 100%; | ||
135 | + } | ||
136 | + } | ||
137 | + } | ||
138 | + | ||
139 | + .good-info { | ||
140 | + margin-right: 10px; | ||
141 | + } | ||
142 | +} |
1 | -@import "search", "list", "filter-box", "sort-pager"; | ||
2 | -.products-page { | ||
3 | - .filter-box { | ||
4 | - border: 1px solid #dfdfdf; | ||
5 | - } | ||
6 | - | ||
7 | - .section { | ||
8 | - padding: 10px 15px; | ||
9 | - font-size: 14px; | ||
10 | - border-top: 1px solid #dfdfdf; | ||
11 | - | ||
12 | - &:first-child { | ||
13 | - border-top: none; | ||
14 | - background: #eaeceb; | ||
15 | - } | ||
16 | - } | ||
17 | - | ||
18 | - .title { | ||
19 | - float: left; | ||
20 | - width: 90px; | ||
21 | - line-height: 30px; | ||
22 | - } | ||
23 | - | ||
24 | - .attr-content { | ||
25 | - margin-left: 90px; | ||
26 | - } | ||
27 | - | ||
28 | - .multi-select { | ||
29 | - display: inline-block; | ||
30 | - width: 60px; | ||
31 | - height: 18px; | ||
32 | - line-height: 18px; | ||
33 | - border: 1px solid #000; | ||
34 | - text-align: center; | ||
35 | - cursor: pointer; | ||
36 | - } | ||
37 | - | ||
38 | - .attr { | ||
39 | - display: block; | ||
40 | - float: left; | ||
41 | - padding: 0 10px; | ||
42 | - margin-right: 30px; | ||
43 | - line-height: 30px; | ||
44 | - cursor: pointer; | ||
45 | - | ||
46 | - &:first-child { | ||
47 | - margin-left: 0; | ||
48 | - } | ||
49 | - | ||
50 | - -moz-user-select: none; | ||
51 | - } | ||
52 | - | ||
53 | - .checked-conditions { | ||
54 | - line-height: 30px; | ||
55 | - | ||
56 | - .tag { | ||
57 | - display: block; | ||
58 | - float: left; | ||
59 | - padding: 0 10px; | ||
60 | - margin-right: 30px; | ||
61 | - background: #000; | ||
62 | - color: #fff; | ||
63 | - cursor: pointer; | ||
64 | - } | ||
65 | - | ||
66 | - .color-block { | ||
67 | - height: 14px; | ||
68 | - width: 14px; | ||
69 | - border: 1px solid #fff; | ||
70 | - margin-bottom: -3px; | ||
71 | - } | ||
72 | - | ||
73 | - .clear-checked { | ||
74 | - color: #999; | ||
75 | - float: right; | ||
76 | - } | ||
77 | - } | ||
78 | - | ||
79 | - .sort-sub-wrap { | ||
80 | - width: 100%; | ||
81 | - | ||
82 | - .sort-sub { | ||
83 | - padding: 15px 0; | ||
84 | - } | ||
85 | - } | ||
86 | - | ||
87 | - .brand { | ||
88 | - position: relative; | ||
89 | - | ||
90 | - .attr { | ||
91 | - box-sizing: border-box; | ||
92 | - width: 20%; | ||
93 | - margin: 0; | ||
94 | - overflow: hidden; | ||
95 | - white-space: nowrap; | ||
96 | - text-overflow: ellipsis; | ||
97 | - } | ||
98 | - | ||
99 | - .attr-content { | ||
100 | - max-width: 900px; | ||
101 | - } | ||
102 | - | ||
103 | - .brand-opt { | ||
104 | - position: absolute; | ||
105 | - right: 20px; | ||
106 | - top: 15px; | ||
107 | - } | ||
108 | - | ||
109 | - .brand-more { | ||
110 | - margin-right: 20px; | ||
111 | - cursor: pointer; | ||
112 | - } | ||
113 | - | ||
114 | - .brands-index { | ||
115 | - float: left; | ||
116 | - line-height: 30px; | ||
117 | - | ||
118 | - span { | ||
119 | - margin: 0 5px; | ||
120 | - cursor: pointer; | ||
121 | - -moz-user-select: none; | ||
122 | - | ||
123 | - &:first-child { | ||
124 | - margin-left: 10px; | ||
125 | - } | ||
126 | - } | ||
127 | - } | ||
128 | - | ||
129 | - .brand-search { | ||
130 | - float: left; | ||
131 | - height: 18px; | ||
132 | - line-height: 18px; | ||
133 | - border: 1px solid #b0b0b0; | ||
134 | - margin-top: 5px; | ||
135 | - margin-left: 15px; | ||
136 | - | ||
137 | - input { | ||
138 | - float: left; | ||
139 | - border: none; | ||
140 | - width: 100px; | ||
141 | - height: 18px; | ||
142 | - padding: 0; | ||
143 | - } | ||
144 | - | ||
145 | - .btn { | ||
146 | - display: inline-block; | ||
147 | - width: 55px; | ||
148 | - height: 18px; | ||
149 | - background: #b0b0b0; | ||
150 | - color: #fff; | ||
151 | - text-align: center; | ||
152 | - cursor: default; | ||
153 | - } | ||
154 | - } | ||
155 | - | ||
156 | - .panel-body { | ||
157 | - padding: 15px 20px; | ||
158 | - margin-top: 5px; | ||
159 | - background: #f4f7f6; | ||
160 | - min-height: 30px; | ||
161 | - border: 1px solid #000; | ||
162 | - } | ||
163 | - } | ||
164 | - | ||
165 | - .btns { | ||
166 | - display: none; | ||
167 | - margin-top: 10px; | ||
168 | - text-align: center; | ||
169 | - } | ||
170 | - | ||
171 | - .multi .btns { | ||
172 | - display: block; | ||
173 | - } | ||
174 | - | ||
175 | - .multi-select-ok, .multi-select-cancel { | ||
176 | - width: 55px; | ||
177 | - height: 24px; | ||
178 | - border: none; | ||
179 | - background: #000; | ||
180 | - color: #fff; | ||
181 | - font-size: 15px; | ||
182 | - margin-right: 15px; | ||
183 | - cursor: pointer; | ||
184 | - | ||
185 | - &.dis { | ||
186 | - background: #ccc; | ||
187 | - } | ||
188 | - } | ||
189 | - | ||
190 | - .ud-price-range { | ||
191 | - margin-top: 2px; | ||
192 | - } | ||
193 | - | ||
194 | - .limit { | ||
195 | - height: 22px; | ||
196 | - width: 42px; | ||
197 | - border: 1px solid #ccc; | ||
198 | - padding: 0; | ||
199 | - } | ||
200 | - | ||
201 | - .price-sep { | ||
202 | - margin: 0 5px; | ||
203 | - } | ||
204 | - | ||
205 | - .price-sure { | ||
206 | - height: 24px; | ||
207 | - width: 44px; | ||
208 | - border: 1px solid #e0e0e0; | ||
209 | - background: #fff; | ||
210 | - color: #666; | ||
211 | - margin-left: 10px; | ||
212 | - } | ||
213 | - | ||
214 | - .color-block { | ||
215 | - display: inline-block; | ||
216 | - height: 22px; | ||
217 | - width: 22px; | ||
218 | - border: 1px solid #ccc; | ||
219 | - margin-bottom: -6px; | ||
220 | - margin-right: 5px; | ||
221 | - } | ||
222 | - | ||
223 | - .senior { | ||
224 | - padding-bottom: 6px; | ||
225 | - | ||
226 | - .attr-content { | ||
227 | - position: relative; | ||
228 | - } | ||
229 | - } | ||
230 | - | ||
231 | - .senior-attr-wrap { | ||
232 | - position: relative; | ||
233 | - } | ||
234 | - | ||
235 | - .senior-attr-wrap > .attr:hover, | ||
236 | - .senior-attr-wrap > .attr.hover { | ||
237 | - > .iconfont { | ||
238 | - visibility: hidden; | ||
239 | - } | ||
240 | - | ||
241 | - .senior-up-icon { | ||
242 | - visibility: visible; | ||
243 | - } | ||
244 | - } | ||
245 | - | ||
246 | - .senior-sub { | ||
247 | - box-sizing: border-box; | ||
248 | - position: absolute; | ||
249 | - padding: 15px 0; | ||
250 | - left: 0; | ||
251 | - right: 0; | ||
252 | - top: 39px; | ||
253 | - background: #fff; | ||
254 | - border: 1px solid #eaeceb; | ||
255 | - | ||
256 | - ul { | ||
257 | - max-width: 950px; | ||
258 | - } | ||
259 | - | ||
260 | - &.multi .multi-select { | ||
261 | - display: none; | ||
262 | - } | ||
263 | - | ||
264 | - .multi-select { | ||
265 | - position: absolute; | ||
266 | - top: 20px; | ||
267 | - right: 15px; | ||
268 | - } | ||
269 | - } | ||
270 | - | ||
271 | - .senior-up-icon { | ||
272 | - width: 100%; | ||
273 | - height: 9px; | ||
274 | - z-index: 1; | ||
275 | - margin-left: -11px; | ||
276 | - visibility: hidden; | ||
277 | - | ||
278 | - background: image-url('product/senior-up.png') no-repeat; | ||
279 | - background-position-x: 50%; | ||
280 | - } | ||
281 | - | ||
282 | - .checkbox { | ||
283 | - display: none; | ||
284 | - } | ||
285 | - | ||
286 | - .multi .checkbox { | ||
287 | - display: inline; | ||
288 | - } | ||
289 | - .opt-banner { | ||
290 | - height: 48px; | ||
291 | - background: #f5f7f6; | ||
292 | - line-height: 48px; | ||
293 | - margin: 10px 0; | ||
294 | - | ||
295 | - .sort-type, | ||
296 | - .checks { | ||
297 | - color: #ccc; | ||
298 | - font-size: 14px; | ||
299 | - padding: 0 10px; | ||
300 | - | ||
301 | - .iconfont { | ||
302 | - font-size: 14px; | ||
303 | - } | ||
304 | - | ||
305 | - &.active, | ||
306 | - &.checked { | ||
307 | - color: #000; | ||
308 | - } | ||
309 | - } | ||
310 | - | ||
311 | - .pager-wrap { | ||
312 | - float: right; | ||
313 | - padding: 15px 0; | ||
314 | - } | ||
315 | - | ||
316 | - .line-count { | ||
317 | - float: left; | ||
318 | - padding: 3px 1px 3px 3px; | ||
319 | - border: 1px solid #ccc; | ||
320 | - margin-right: 10px; | ||
321 | - | ||
322 | - span { | ||
323 | - float: left; | ||
324 | - width: 5px; | ||
325 | - height: 10px; | ||
326 | - background: #ccc; | ||
327 | - margin-right: 2px; | ||
328 | - } | ||
329 | - | ||
330 | - &.active { | ||
331 | - border-color: #222; | ||
332 | - span { | ||
333 | - background: #222; | ||
334 | - } | ||
335 | - } | ||
336 | - } | ||
337 | - | ||
338 | - .page-count { | ||
339 | - position: relative; | ||
340 | - height: 18px; | ||
341 | - float: left; | ||
342 | - font-size: 12px; | ||
343 | - line-height: 18px; | ||
344 | - | ||
345 | - > span { | ||
346 | - float: left; | ||
347 | - display: block; | ||
348 | - width: 42px; | ||
349 | - height: 10px; | ||
350 | - line-height: 10px; | ||
351 | - padding: 3px; | ||
352 | - border: 1px solid #ccc; | ||
353 | - color: #222; | ||
354 | - cursor: pointer; | ||
355 | - margin-right: 10px; | ||
356 | - } | ||
357 | - | ||
358 | - .iconfont { | ||
359 | - font-size: 14px; | ||
360 | - color: #ccc; | ||
361 | - float: right; | ||
362 | - } | ||
363 | - | ||
364 | - > ul { | ||
365 | - position: absolute; | ||
366 | - display: none; | ||
367 | - width: 42px; | ||
368 | - padding: 0 3px; | ||
369 | - border-left: 1px solid #ccc; | ||
370 | - border-right: 1px solid #ccc; | ||
371 | - } | ||
372 | - | ||
373 | - li { | ||
374 | - border-bottom: 1px solid #ccc; | ||
375 | - } | ||
376 | - | ||
377 | - a { | ||
378 | - display: block; | ||
379 | - width: 100%; | ||
380 | - } | ||
381 | - } | ||
382 | - | ||
383 | - .pager { | ||
384 | - float: left; | ||
385 | - font-size: 14px; | ||
386 | - line-height: 15px; | ||
387 | - margin: 0 20px; | ||
388 | - | ||
389 | - .dis-icon { | ||
390 | - color: #e6e6e6; | ||
391 | - } | ||
392 | - | ||
393 | - i { | ||
394 | - color: #f00; | ||
395 | - } | ||
396 | - } | ||
397 | - } | ||
398 | -} | ||
1 | +@import "search", "list", "filter-box", "sort-pager", "good"; |
@@ -13,150 +13,5 @@ | @@ -13,150 +13,5 @@ | ||
13 | padding: 25px 0 0 0; | 13 | padding: 25px 0 0 0; |
14 | position: relative; | 14 | position: relative; |
15 | width: 1150px + 10px;//每列增加右边距 | 15 | width: 1150px + 10px;//每列增加右边距 |
16 | - | ||
17 | - //标签 | ||
18 | - .tag-container { | ||
19 | - font-size: 12px; | ||
20 | - height: 22px; | ||
21 | - line-height: 22px; | ||
22 | - | ||
23 | - .good-tag { | ||
24 | - padding: 0 7px; | ||
25 | - display: block; | ||
26 | - float: left; | ||
27 | - margin-right: 3px; | ||
28 | - | ||
29 | - &:nth-last-of-type(1) { | ||
30 | - margin-right: 0; | ||
31 | - } | ||
32 | - | ||
33 | - @each $tag, $tagColor, $tagBackground in (new-tag, #fff, #78dc7d), | ||
34 | - (renew-tag, #fff, #78dc7e), | ||
35 | - (new-festival-tag, #fff, #000000), | ||
36 | - (yep-tag, #fff, #ff565b), | ||
37 | - (ymp-tag, #fff, #ff565b), | ||
38 | - (sale-tag, #fff, #ff565b) { | ||
39 | - &.#{$tag} { | ||
40 | - color: $tagColor; | ||
41 | - background: $tagBackground; | ||
42 | - } | ||
43 | - } | ||
44 | - &.limit-tag { | ||
45 | - color: #4e4e4e; | ||
46 | - border: 1px solid #4e4e4e; | ||
47 | - } | ||
48 | - } | ||
49 | - } | ||
50 | - | ||
51 | - //商品列表 | ||
52 | - .good-info { | ||
53 | - height: 400px; //todo | ||
54 | - margin-bottom: 35px; | ||
55 | - width: 222px; | ||
56 | - margin-right: 10px; | ||
57 | - float: left; | ||
58 | - | ||
59 | - //图片 | ||
60 | - .good-detail-img { | ||
61 | - width: 100%; | ||
62 | - height: 300px; | ||
63 | - position: relative; | ||
64 | - | ||
65 | - .good-thumb, img.lazy { | ||
66 | - display: block; | ||
67 | - overflow: hidden; | ||
68 | - width: 100%; | ||
69 | - height: 100%; | ||
70 | - } | ||
71 | - .few-tag { | ||
72 | - width: 100%; | ||
73 | - position: absolute; | ||
74 | - left: 0; | ||
75 | - height: 16px; | ||
76 | - line-height: 16px; | ||
77 | - background: #ffac5b; | ||
78 | - color: #fff; | ||
79 | - font-size: 12px; | ||
80 | - text-align: center; | ||
81 | - bottom: 0; | ||
82 | - } | ||
83 | - } | ||
84 | - | ||
85 | - //文本 | ||
86 | - .good-detail-text { | ||
87 | - color: #222; | ||
88 | - font-size: 12px; | ||
89 | - text-align: center; | ||
90 | - | ||
91 | - > a { | ||
92 | - margin-top: 16px; | ||
93 | - line-height: 1.5; | ||
94 | - display: block; | ||
95 | - } | ||
96 | - | ||
97 | - > .price { | ||
98 | - margin-top: 10px; | ||
99 | - } | ||
100 | - } | ||
101 | - | ||
102 | - .col-btn { | ||
103 | - position: absolute; | ||
104 | - top: 15px; | ||
105 | - right: 15px; | ||
106 | - color: #ccc; | ||
107 | - font-size: 12px; | ||
108 | - display: none; | ||
109 | - } | ||
110 | - } | ||
111 | - | ||
112 | - //弹层 | ||
113 | - .good-item-wrapper { | ||
114 | - border: 1px solid #dddddd; | ||
115 | - padding-left: 20px; | ||
116 | - padding-top: 18px; | ||
117 | - padding-right: 20px; | ||
118 | - position: absolute; | ||
119 | - background: #fff; | ||
120 | - display: none; | ||
121 | - | ||
122 | - .good-info-main{ | ||
123 | - float: left; | ||
124 | - | ||
125 | - .col-btn { | ||
126 | - display: block; | ||
127 | - | ||
128 | - &:hover { | ||
129 | - color: #f95b4f; | ||
130 | - cursor: pointer; | ||
131 | - } | ||
132 | - } | ||
133 | - } | ||
134 | - | ||
135 | - .good-select-color { | ||
136 | - float: left; | ||
137 | - margin-top: 22px; | ||
138 | - | ||
139 | - ul { | ||
140 | - display: block; | ||
141 | - float: left; | ||
142 | - margin-left: 15px; | ||
143 | - } | ||
144 | - | ||
145 | - li { | ||
146 | - width: 50px; | ||
147 | - margin-bottom: 15px; | ||
148 | - | ||
149 | - a, img { | ||
150 | - display: block; | ||
151 | - overflow: hidden; | ||
152 | - width: 100%; | ||
153 | - } | ||
154 | - } | ||
155 | - } | ||
156 | - | ||
157 | - .good-info { | ||
158 | - margin-right: 10px; | ||
159 | - } | ||
160 | - } | ||
161 | } | 16 | } |
162 | } | 17 | } |
-
Please register or login to post a comment