Showing
19 changed files
with
815 additions
and
2 deletions
@@ -38,6 +38,7 @@ exports.index = (req, res) => { | @@ -38,6 +38,7 @@ exports.index = (req, res) => { | ||
38 | limit: 10, | 38 | limit: 10, |
39 | order: 's_t_desc' | 39 | order: 's_t_desc' |
40 | }).then((result) => { | 40 | }).then((result) => { |
41 | + console.log(result); | ||
41 | result = { | 42 | result = { |
42 | headerBanner: { | 43 | headerBanner: { |
43 | list: [ | 44 | list: [ |
@@ -100,7 +101,7 @@ exports.special = (req, res) => { | @@ -100,7 +101,7 @@ exports.special = (req, res) => { | ||
100 | let headerData = headerModel.setNavHeader('折扣专场'); | 101 | let headerData = headerModel.setNavHeader('折扣专场'); |
101 | let renderData = { | 102 | let renderData = { |
102 | module: 'product', | 103 | module: 'product', |
103 | - page: 'sale', | 104 | + page: 'special', |
104 | pageHeader: headerData, | 105 | pageHeader: headerData, |
105 | pageFooter: true | 106 | pageFooter: true |
106 | }; | 107 | }; |
@@ -131,3 +132,40 @@ exports.specialDetail = (req, res) => { | @@ -131,3 +132,40 @@ exports.specialDetail = (req, res) => { | ||
131 | saleLogger(err, res); | 132 | saleLogger(err, res); |
132 | }); | 133 | }); |
133 | }; | 134 | }; |
135 | + | ||
136 | +/** | ||
137 | + * 断码区 | ||
138 | + */ | ||
139 | +exports.breakCode = (req, res) => { | ||
140 | + let headerData = headerModel.setNavHeader('断码区'); | ||
141 | + let renderData = { | ||
142 | + module: 'product', | ||
143 | + page: 'break-code', | ||
144 | + pageHeader: headerData, | ||
145 | + pageFooter: true | ||
146 | + }; | ||
147 | + | ||
148 | + saleModel.getBreakCodeData().then((result) => { | ||
149 | + result = { | ||
150 | + src: 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/0239e814b8121913aa67b9ad509bd4e310.jpg?imageView2/2/w/{width}/h/{height}', | ||
151 | + goods: { | ||
152 | + url: 'http://m.yohobuy.com/product/pro_320421_412063/SYSTAGYuanLingWeiYiSYSA601HC09.html', | ||
153 | + thumb: 'http://img10.static.yhbimg.com/goodsimg/2015/12/07/09/01ced0e2ed6a4f2a6d95be70cd0a6c5a56.jpg?imageView/2/w/235/h/314', | ||
154 | + name: 'NEFF ONE OF US RAGLAN L/S 男款森林风连帽卫衣', | ||
155 | + salePrice: '759.00', | ||
156 | + price: '799.00', | ||
157 | + tags: { | ||
158 | + isNew: true, | ||
159 | + isAdvance: false, | ||
160 | + isDiscount: false, | ||
161 | + isYohoood: false, | ||
162 | + isLimited: false | ||
163 | + }, | ||
164 | + isSoonSoldOut: true | ||
165 | + } | ||
166 | + } | ||
167 | + res.render('break-code', Object.assign(renderData, result)); | ||
168 | + }).catch((err) => { | ||
169 | + saleLogger(err, res); | ||
170 | + }); | ||
171 | +}; |
@@ -95,3 +95,22 @@ exports.getSpecialDetailData = (params) => { | @@ -95,3 +95,22 @@ exports.getSpecialDetailData = (params) => { | ||
95 | } | 95 | } |
96 | }); | 96 | }); |
97 | }; | 97 | }; |
98 | + | ||
99 | +/** | ||
100 | + * 获取断码区数据 | ||
101 | + * @param {[object]} params | ||
102 | + * @return {[object]} | ||
103 | + */ | ||
104 | +exports.getBreakCodeData = (params) => { | ||
105 | + return api.get('', sign.apiSign(Object.assign({ | ||
106 | + method: 'app.activity.get', | ||
107 | + sort: 2, | ||
108 | + plateform: 2 | ||
109 | + }, params))).then((result) => { | ||
110 | + if (result && result.code === 200) { | ||
111 | + return camelCase(result.data); | ||
112 | + } else { | ||
113 | + return Promise.reject('error'); | ||
114 | + } | ||
115 | + }); | ||
116 | +}; |
@@ -21,5 +21,6 @@ router.get('/detail/:id/:gid', detail.index); | @@ -21,5 +21,6 @@ router.get('/detail/:id/:gid', detail.index); | ||
21 | router.get('/sale', sale.index); | 21 | router.get('/sale', sale.index); |
22 | router.get('/special', sale.special); | 22 | router.get('/special', sale.special); |
23 | router.get('/specialDetail', sale.specialDetail); | 23 | router.get('/specialDetail', sale.specialDetail); |
24 | +router.get('/breakCode', sale.breakCode); | ||
24 | 25 | ||
25 | module.exports = router; | 26 | module.exports = router; |
apps/product/views/action/break-code.hbs
0 → 100644
1 | +<div class="break-code-page discount-page yoho-page"> | ||
2 | + <div class="banner"> | ||
3 | + <img src="{{image src 640 200}}"/> | ||
4 | + </div> | ||
5 | + | ||
6 | + <ul id="list-nav" class="list-nav clearfix"> | ||
7 | + <li class="new active"> | ||
8 | + <a href="javascript:void(0);"> | ||
9 | + <span class="span-test">上装</span> | ||
10 | + </a> | ||
11 | + </li> | ||
12 | + <li class="price"> | ||
13 | + <a href="javascript:void(0);"> | ||
14 | + <span class="span-test">夏装</span> | ||
15 | + </a> | ||
16 | + </li> | ||
17 | + <li class="discount"> | ||
18 | + <a href="javascript:void(0);"> | ||
19 | + <span class="span-test">鞋</span> | ||
20 | + </a> | ||
21 | + </li> | ||
22 | + <li class="discount"> | ||
23 | + <a href="javascript:void(0);"> | ||
24 | + <span class="span-test">其他</span> | ||
25 | + </a> | ||
26 | + </li> | ||
27 | + <li class="filter"> | ||
28 | + <a href="javascript:void(0);"> | ||
29 | + <span class="span-test">筛选</span> | ||
30 | + <span class="iconfont cur"></span> | ||
31 | + </a> | ||
32 | + </li> | ||
33 | + </ul> | ||
34 | + <div class="swiper-container" id="size-swiper"> | ||
35 | + <ul class="swiper-wrapper"> | ||
36 | + <li class="swiper-slide on">XS码</li> | ||
37 | + <li class="swiper-slide">S码</li> | ||
38 | + <li class="swiper-slide">M码</li> | ||
39 | + <li class="swiper-slide">L码</li> | ||
40 | + <li class="swiper-slide">XL码</li> | ||
41 | + <li class="swiper-slide">XXL码</li> | ||
42 | + <li class="swiper-slide">S码</li> | ||
43 | + <li class="swiper-slide">M码</li> | ||
44 | + <li class="swiper-slide">L码</li> | ||
45 | + <li class="swiper-slide">XL码</li> | ||
46 | + <li class="swiper-slide">XXL码</li> | ||
47 | + </ul> | ||
48 | + </div> | ||
49 | + | ||
50 | + | ||
51 | + <div id="goods-container" class="goods-container"> | ||
52 | + <div class="new-goods container clearfix"> | ||
53 | + {{# goods}} | ||
54 | + {{> common/good}} | ||
55 | + {{/ goods}} | ||
56 | + </div> | ||
57 | + <div class="price-goods container hide clearfix"></div> | ||
58 | + <div class="discount-goods container hide clearfix"></div> | ||
59 | + | ||
60 | + {{> common/filter}} | ||
61 | + </div> | ||
62 | + | ||
63 | + {{> common/query-param}} | ||
64 | + | ||
65 | + {{> common/suspend-cart}} | ||
66 | +</div> |
@@ -2,5 +2,5 @@ | @@ -2,5 +2,5 @@ | ||
2 | <div class="banner"> | 2 | <div class="banner"> |
3 | <img src="{{image src 640 250}}"/> | 3 | <img src="{{image src 640 250}}"/> |
4 | <span class="activity-time"><i class="iconfont time-ico"></i>{{time}}</span> | 4 | <span class="activity-time"><i class="iconfont time-ico"></i>{{time}}</span> |
5 | - </div> | 5 | + </div> |
6 | </div> | 6 | </div> |
doraemon/views/partial/common/filter.hbs
0 → 100644
1 | +{{# filter}} | ||
2 | + <div class="filter-mask hide"> | ||
3 | + <div class="filter-body"> | ||
4 | + <ul class="classify"> | ||
5 | + {{#each classify}} | ||
6 | + <li class="classify-item{{#if @first}} active{{/if}}" data-bp-id="filter_classify_{{name}}_true"> | ||
7 | + <p class="shower{{#if default}} default{{/if}}"> | ||
8 | + <span class="title">{{title}}:</span> | ||
9 | + {{name}} | ||
10 | + </p> | ||
11 | + <ul class="sub-classify" data-type={{dataType}}> | ||
12 | + {{# subs}} | ||
13 | + <li class="sub-item{{#if chosed}} chosed{{/if}}" data-id={{dataId}} data-bp-id="filter_subclassify_{{name}}_true"> | ||
14 | + {{name}} | ||
15 | + <i class="iconfont chosed-icon"></i> | ||
16 | + </li> | ||
17 | + {{/ subs}} | ||
18 | + </ul> | ||
19 | + </li> | ||
20 | + {{/each}} | ||
21 | + </ul> | ||
22 | + </div> | ||
23 | + </div> | ||
24 | +{{/ filter}} |
doraemon/views/partial/common/good.hbs
0 → 100644
1 | +{{#if .}} {{!-- 剔除值为false的项 --}} | ||
2 | + <div class="good-info" data-id="{{id}}" data-bp-id="guang_goodList_{{name}}_false"> | ||
3 | + <div class="tag-container clearfix"> | ||
4 | + {{# tags}} | ||
5 | + {{# isNew}} | ||
6 | + <p class="good-tag new-tag">NEW</p> | ||
7 | + {{/ isNew}} | ||
8 | + {{# isAdvance}} | ||
9 | + <p class="good-tag renew-tag">再到着</p> | ||
10 | + {{/ isAdvance}} | ||
11 | + {{# isDiscount}} | ||
12 | + <p class="good-tag sale-tag">SALE</p> | ||
13 | + {{/ isDiscount}} | ||
14 | + {{# isYohoood}} | ||
15 | + <p class="good-tag running-man-tag">跑男同款</p> | ||
16 | + {{/ isYohoood}} | ||
17 | + {{# isLimited}} | ||
18 | + <p class="good-tag limit-tag">限量商品</p> | ||
19 | + {{/ isLimited}} | ||
20 | + {{/ tags}} | ||
21 | + </div> | ||
22 | + <div class="good-detail-img"> | ||
23 | + <a class="good-thumb" href="{{url}}"> | ||
24 | + <img class="lazy" data-original="{{thumb}}"> | ||
25 | + </a> | ||
26 | + {{# isSoonSoldOut}} | ||
27 | + <p class="few-tag">即将售罄</p> | ||
28 | + {{/ isSoonSoldOut}} | ||
29 | + </div> | ||
30 | + <div class="good-detail-text"> | ||
31 | + <div class="name"> | ||
32 | + <a href="{{url}}">{{name}}</a> | ||
33 | + </div> | ||
34 | + <div class="price"> | ||
35 | + <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span> | ||
36 | + {{#price}} | ||
37 | + <span class="market-price">¥{{.}}</span> | ||
38 | + {{/price}} | ||
39 | + </div> | ||
40 | + </div> | ||
41 | + </div> | ||
42 | +{{/if}} |
1 | +{{#if brand}} | ||
2 | + <input class="query-param" type="hidden" data-attr="brand" value="{{brand}}"> | ||
3 | +{{/if}} | ||
4 | + | ||
5 | +{{#if gender}} | ||
6 | + <input class="query-param" type="hidden" data-attr="gender" value="{{gender}}"> | ||
7 | +{{/if}} | ||
8 | + | ||
9 | +{{#if sort}} | ||
10 | + <input class="query-param" type="hidden" data-attr="sort" value="{{sort}}"> | ||
11 | +{{/if}} | ||
12 | + | ||
13 | +{{#if msort}} | ||
14 | + <input class="query-param" type="hidden" data-attr="msort" value="{{msort}}"> | ||
15 | +{{/if}} | ||
16 | + | ||
17 | +{{#if misort}} | ||
18 | + <input class="query-param" type="hidden" data-attr="misort" value="{{misort}}"> | ||
19 | +{{/if}} | ||
20 | + | ||
21 | +{{#if color}} | ||
22 | + <input class="query-param" type="hidden" data-attr="color" value="{{color}}"> | ||
23 | +{{/if}} | ||
24 | + | ||
25 | +{{#if size}} | ||
26 | + <input class="query-param" type="hidden" data-attr="size" value="{{size}}"> | ||
27 | +{{/if}} | ||
28 | + | ||
29 | +{{#if price}} | ||
30 | + <input class="query-param" type="hidden" data-attr="price" value="{{price}}"> | ||
31 | +{{/if}} | ||
32 | + | ||
33 | +{{#if discount}} | ||
34 | + <input class="query-param" type="hidden" data-attr="discount" value="{{discount}}"> | ||
35 | +{{/if}} | ||
36 | + | ||
37 | +{{#if specialsaleId}} | ||
38 | + <input class="query-param" type="hidden" data-attr="specialsale_id" value="{{specialsaleId}}"> | ||
39 | +{{/if}} | ||
40 | + | ||
41 | +{{#if promotion}} | ||
42 | + <input class="query-param" type="hidden" data-attr="promotion" value="{{promotion}}"> | ||
43 | +{{/if}} | ||
44 | + | ||
45 | +{{#if query}} | ||
46 | + <input class="query-param" type="hidden" data-attr="query" value="{{query}}"> | ||
47 | +{{/if}} | ||
48 | + | ||
49 | +{{#if style}} | ||
50 | + <input class="query-param" type="hidden" data-attr="style" value="{{style}}"> | ||
51 | +{{/if}} | ||
52 | + | ||
53 | +{{#if pD}} | ||
54 | + <input class="query-param" type="hidden" data-attr="p_d" value="{{pD}}"> | ||
55 | +{{/if}} | ||
56 | + | ||
57 | +{{#if channel}} | ||
58 | + <input class="query-param" type="hidden" data-attr="channel" value="{{channel}}"> | ||
59 | +{{/if}} | ||
60 | + | ||
61 | +{{#if dayLimit}} | ||
62 | + <input class="query-param" type="hidden" data-attr="dayLimit" value="{{dayLimit}}"> | ||
63 | +{{/if}} | ||
64 | + | ||
65 | +{{#if limit}} | ||
66 | + <input class="query-param" type="hidden" data-attr="limit" value="{{limit}}"> | ||
67 | +{{/if}} |
public/js/plugin/filter.js
0 → 100644
1 | +/** | ||
2 | + * 筛选JS | ||
3 | + * 暴露三个接口:注册回调、显示filter、隐藏filter | ||
4 | + * @author: xuqi<qi.xu@yoho.cn> | ||
5 | + * @date: 2015/10/19 | ||
6 | + */ | ||
7 | + | ||
8 | +var $ = require('yoho-jquery'), | ||
9 | + Hammer = require('yoho-hammer'); | ||
10 | + | ||
11 | +var $filter; | ||
12 | + | ||
13 | +var fCbFn, hCbFn; //筛选和关闭的回调 | ||
14 | + | ||
15 | +var missStatus; //是否忽略选中状态 | ||
16 | + | ||
17 | +//隐藏筛选界面 | ||
18 | +function hideFilter() { | ||
19 | + $filter.addClass('hide'); | ||
20 | +} | ||
21 | + | ||
22 | +//显示筛选界面 | ||
23 | +function showFilter() { | ||
24 | + $filter.removeClass('hide'); | ||
25 | +} | ||
26 | + | ||
27 | +// 一级菜单点击时背景高亮 | ||
28 | +function highlightMainItem() { | ||
29 | + var $mainItem = $('.filter-body .classify'); | ||
30 | + | ||
31 | + $mainItem.on('touchstart', '.shower', function() { | ||
32 | + $mainItem.removeClass('highlight'); | ||
33 | + $(this).addClass('highlight'); | ||
34 | + }).on('touchend touchcancel', '.shower', function() { | ||
35 | + $(this).removeClass('highlight'); | ||
36 | + }); | ||
37 | +} | ||
38 | + | ||
39 | +// 子菜单点击时背景高亮 | ||
40 | +function highlightSubItem() { | ||
41 | + var $subItem = $('.filter-body .sub-item'); | ||
42 | + | ||
43 | + $subItem.on('touchstart', function() { | ||
44 | + $subItem.removeClass('highlight'); | ||
45 | + $(this).addClass('highlight'); | ||
46 | + }).on('touchend touchcancel', function() { | ||
47 | + $(this).removeClass('highlight'); | ||
48 | + }); | ||
49 | +} | ||
50 | + | ||
51 | +//主筛选项Tap事件句柄 | ||
52 | +function classifyTapEvt($this) { | ||
53 | + if ($this.hasClass('active')) { | ||
54 | + return; | ||
55 | + } | ||
56 | + | ||
57 | + $this.siblings('.active').removeClass('active'); | ||
58 | + | ||
59 | + $this.addClass('active'); | ||
60 | +} | ||
61 | + | ||
62 | +//子筛选项选中处理 | ||
63 | +function setSubClassify($this) { | ||
64 | + var $sub = $this.closest('.sub-classify'); | ||
65 | + | ||
66 | + var $shower = $sub.siblings('.shower'); | ||
67 | + | ||
68 | + var html, shower; | ||
69 | + | ||
70 | + if ($this.hasClass('chosed')) { | ||
71 | + return $sub; | ||
72 | + } | ||
73 | + | ||
74 | + $sub.children('.chosed').removeClass('chosed'); | ||
75 | + $this.addClass('chosed'); | ||
76 | + | ||
77 | + html = $.trim($this.html()); | ||
78 | + | ||
79 | + shower = $.trim($shower.html()); | ||
80 | + | ||
81 | + $shower.html( | ||
82 | + shower.substring(0, shower.indexOf('</span>') + 7) + //拆分出shower的title | ||
83 | + html.substring(0, html.indexOf('<i')) //拆分选中筛选值 | ||
84 | + ); | ||
85 | + | ||
86 | + if ($this.index() === 0) { | ||
87 | + $shower.addClass('default'); | ||
88 | + } else { | ||
89 | + $shower.removeClass('default'); | ||
90 | + } | ||
91 | + | ||
92 | + return $sub; | ||
93 | +} | ||
94 | + | ||
95 | +//子筛选项Tap句柄 | ||
96 | +function subClassifyTapEvt($this) { | ||
97 | + var id = $this.data('id'); | ||
98 | + | ||
99 | + var $sub; | ||
100 | + | ||
101 | + $sub = setSubClassify($this); | ||
102 | + | ||
103 | + if (fCbFn) { | ||
104 | + fCbFn({ | ||
105 | + type: $sub.data('type'), | ||
106 | + id: id | ||
107 | + }); | ||
108 | + } | ||
109 | + | ||
110 | + hideFilter(); | ||
111 | +} | ||
112 | + | ||
113 | +//初始化筛选 | ||
114 | +function initFilter(opt) { | ||
115 | + var filterHammer; | ||
116 | + | ||
117 | + //注册回调 | ||
118 | + fCbFn = opt.fCbFn; | ||
119 | + hCbFn = opt.hCbFn; | ||
120 | + | ||
121 | + missStatus = opt.missStatus; | ||
122 | + | ||
123 | + highlightMainItem(); | ||
124 | + highlightSubItem(); | ||
125 | + | ||
126 | + $filter = $('.filter-mask'); | ||
127 | + | ||
128 | + filterHammer = new Hammer($filter[0]); | ||
129 | + filterHammer.on('tap', function(e) { | ||
130 | + var $this = $(e.target), | ||
131 | + $cur; | ||
132 | + | ||
133 | + e.preventDefault();//防止透点 | ||
134 | + | ||
135 | + if ($this.closest('.filter-body').length > 0) { | ||
136 | + $cur = $this.closest('.sub-item'); | ||
137 | + if ($cur.length > 0) { | ||
138 | + | ||
139 | + //tap subclassify | ||
140 | + $cur = $this.closest('li'); | ||
141 | + | ||
142 | + subClassifyTapEvt($cur); | ||
143 | + } else { | ||
144 | + | ||
145 | + //tap classify | ||
146 | + $cur = $this.closest('.classify-item'); | ||
147 | + | ||
148 | + e.srcEvent.stopPropagation(); | ||
149 | + | ||
150 | + classifyTapEvt($cur); | ||
151 | + } | ||
152 | + } else { | ||
153 | + hideFilter(); | ||
154 | + | ||
155 | + if (hCbFn) { | ||
156 | + hCbFn(); | ||
157 | + } | ||
158 | + } | ||
159 | + }); | ||
160 | + | ||
161 | +} | ||
162 | + | ||
163 | +//重置筛选面板 | ||
164 | +function resetFilter() { | ||
165 | + if (typeof $filter === 'undefined') { | ||
166 | + return; | ||
167 | + } | ||
168 | + | ||
169 | + //重置子筛选项 | ||
170 | + $('.sub-classify').each(function() { | ||
171 | + setSubClassify($(this).children(':first-child')); | ||
172 | + }); | ||
173 | + | ||
174 | + //重置主筛选项 | ||
175 | + classifyTapEvt($('.classify > :first-child')); | ||
176 | +} | ||
177 | + | ||
178 | +exports.initFilter = initFilter; | ||
179 | + | ||
180 | +exports.showFilter = showFilter; | ||
181 | + | ||
182 | +exports.hideFilter = hideFilter; | ||
183 | + | ||
184 | +exports.resetFilter = resetFilter; |
public/js/product/break-code.js
0 → 100644
1 | +/** | ||
2 | + * 断码区 | ||
3 | + * @author: wsl<shuiling.wang@yoho.cn> | ||
4 | + * @date: 2016/5/20 | ||
5 | + */ | ||
6 | + | ||
7 | +var $ = require('yoho-jquery'), | ||
8 | + Swiper = require('yoho-swiper'), | ||
9 | + ellipsis = require('yoho-mlellipsis'), | ||
10 | + lazyLoad = require('yoho-jquery-lazyload'), | ||
11 | + tip = require('../plugin/tip'), | ||
12 | + filter = require('../plugin/filter'), | ||
13 | + loading = require('../plugin/loading'); | ||
14 | + | ||
15 | +var $listNav = $('#list-nav'); | ||
16 | + | ||
17 | +new Swiper('.swiper-container', { | ||
18 | + slidesPerView: 'auto' | ||
19 | +}); | ||
20 | + | ||
21 | +$listNav.on('touchstart', 'li', function() { | ||
22 | + $(this).addClass('bytouch'); | ||
23 | +}).on('touchend touchcancel', function() { | ||
24 | + $listNav.find('li').removeClass('bytouch'); | ||
25 | +}); |
public/js/product/break-code.page.js
0 → 100644
1 | +require('./break-code'); |
public/js/product/query-param.js
0 → 100644
public/js/product/special.page.js
0 → 100644
public/js/product/suspend-cart.js
0 → 100644
1 | +/** | ||
2 | + * 悬浮购物车 | ||
3 | + * @author: xuqi<qi.xu@yoho.cn> | ||
4 | + * @date: 2015/11/1 | ||
5 | + */ | ||
6 | + | ||
7 | +var $ = require('yoho-jquery'); | ||
8 | + | ||
9 | +var $cart = $('#suspend-cart'); | ||
10 | + | ||
11 | +$.ajax({ | ||
12 | + type: 'GET', | ||
13 | + url: '/cart/index/count', | ||
14 | + success: function(data) { | ||
15 | + var count; | ||
16 | + | ||
17 | + if (data.code === 200) { | ||
18 | + count = data.data.cart_goods_count; | ||
19 | + if (count > 99) { | ||
20 | + count = '99+'; | ||
21 | + } | ||
22 | + if (count === 0) { | ||
23 | + $('.cart-count').remove(); | ||
24 | + } | ||
25 | + $cart.find('.cart-count').html(count).removeClass('hide'); | ||
26 | + } | ||
27 | + } | ||
28 | +}); |
@@ -12,6 +12,7 @@ | @@ -12,6 +12,7 @@ | ||
12 | @import "product/recommend-for-you"; | 12 | @import "product/recommend-for-you"; |
13 | @import "product/sale"; | 13 | @import "product/sale"; |
14 | @import "product/special"; | 14 | @import "product/special"; |
15 | +@import "product/break-code"; | ||
15 | @import "product/discount"; | 16 | @import "product/discount"; |
16 | @import "product/good"; | 17 | @import "product/good"; |
17 | @import "product/filter"; | 18 | @import "product/filter"; |
public/scss/product/_break-code.css
0 → 100644
1 | +.break-code-page { | ||
2 | + max-width: 640px; | ||
3 | + margin: 0 auto; | ||
4 | + | ||
5 | + .banner { | ||
6 | + width: 640px; | ||
7 | + | ||
8 | + img { | ||
9 | + width: 100%; | ||
10 | + height: 100%; | ||
11 | + } | ||
12 | + } | ||
13 | + | ||
14 | + #size-swiper { | ||
15 | + width: 100%; | ||
16 | + line-height: 50px; | ||
17 | + color: #999; | ||
18 | + font-size: 28px; | ||
19 | + height: 50px; | ||
20 | + border-bottom: 1px solid #e6e6e6; | ||
21 | + background: #f0f0f0; | ||
22 | + padding: 0 22px; | ||
23 | + box-sizing: border-box; | ||
24 | + | ||
25 | + ul { | ||
26 | + width: 100%; | ||
27 | + height: 50px; | ||
28 | + } | ||
29 | + | ||
30 | + li { | ||
31 | + width: auto; | ||
32 | + margin: 0 22px; | ||
33 | + float: left; | ||
34 | + white-space: nowrap; | ||
35 | + | ||
36 | + &.on { | ||
37 | + color: #000; | ||
38 | + } | ||
39 | + } | ||
40 | + } | ||
41 | + | ||
42 | + #list-nav > li { | ||
43 | + width: 20%; | ||
44 | + font-size: 28px; | ||
45 | + | ||
46 | + &.active a { | ||
47 | + border-bottom: 4px solid #000; | ||
48 | + } | ||
49 | + | ||
50 | + a { | ||
51 | + width: 106px; | ||
52 | + margin: 0 auto; | ||
53 | + display: block; | ||
54 | + } | ||
55 | + } | ||
56 | +} |
public/scss/product/_filter.css
0 → 100644
1 | +.filter-mask, .filter-body { | ||
2 | + position: absolute; | ||
3 | + left: 0; | ||
4 | + right: 0; | ||
5 | + top: 0; | ||
6 | +} | ||
7 | + | ||
8 | +.filter-mask { | ||
9 | + height: 100%; | ||
10 | + background: rgba(0,0,0,0.1); | ||
11 | +} | ||
12 | + | ||
13 | +.filter-body { | ||
14 | + background: #fff; | ||
15 | + color: #000; | ||
16 | + cursor: pointer; | ||
17 | + font-size: 28px; | ||
18 | + height: 880px; | ||
19 | + | ||
20 | + .classify { | ||
21 | + width: 50%; | ||
22 | + height: 100%; | ||
23 | + background: #f8f8f8; | ||
24 | + | ||
25 | + > li { | ||
26 | + height: 120px; | ||
27 | + line-height: 120px; | ||
28 | + | ||
29 | + > * { | ||
30 | + box-sizing: border-box; | ||
31 | + } | ||
32 | + | ||
33 | + &.active { | ||
34 | + background: #fff; | ||
35 | + } | ||
36 | + | ||
37 | + .shower { | ||
38 | + padding-left: 40px; | ||
39 | + width: 100%; | ||
40 | + overflow: hidden; | ||
41 | + white-space: nowrap; | ||
42 | + text-overflow: ellipsis; | ||
43 | + color: #333; | ||
44 | + | ||
45 | + &.highlight { | ||
46 | + background: #eee; | ||
47 | + } | ||
48 | + } | ||
49 | + | ||
50 | + .default { | ||
51 | + color: #999; | ||
52 | + } | ||
53 | + | ||
54 | + .title { | ||
55 | + float: left; | ||
56 | + color: #000; | ||
57 | + } | ||
58 | + | ||
59 | + } | ||
60 | + } | ||
61 | + | ||
62 | + .sub-classify { | ||
63 | + position: absolute; | ||
64 | + display: none; | ||
65 | + width: 50%; | ||
66 | + height: 880px; | ||
67 | + left: 50%; | ||
68 | + top: 0; | ||
69 | + overflow: auto; | ||
70 | + -webkit-overflow-scrolling: touch; | ||
71 | + | ||
72 | + > li { | ||
73 | + height: 160px; | ||
74 | + line-height: 120px; | ||
75 | + padding-left: 30px; | ||
76 | + border-bottom: 1px solid #e6e6e6; | ||
77 | + overflow: hidden; | ||
78 | + white-space: nowrap; | ||
79 | + text-overflow: ellipsis; | ||
80 | + | ||
81 | + &.highlight { | ||
82 | + background: #eee; | ||
83 | + } | ||
84 | + } | ||
85 | + | ||
86 | + .chosed-icon { | ||
87 | + display: none; | ||
88 | + } | ||
89 | + | ||
90 | + .chosed .chosed-icon { | ||
91 | + display: inline; | ||
92 | + } | ||
93 | + } | ||
94 | + | ||
95 | + .active > .sub-classify { | ||
96 | + display: block; | ||
97 | + } | ||
98 | +} |
public/scss/product/_good.css
0 → 100644
1 | +.good-info { | ||
2 | + float: left; | ||
3 | + width: 276px; | ||
4 | + height: 506px; | ||
5 | + margin: 10px 15px 40px 15px; | ||
6 | + | ||
7 | + .tag-container { | ||
8 | + height: 28px; | ||
9 | + width: 100%; | ||
10 | + overflow: hidden; | ||
11 | + | ||
12 | + .good-tag { | ||
13 | + display: block; | ||
14 | + float: left; | ||
15 | + height: 28px; | ||
16 | + font-size: 18px; | ||
17 | + text-align: center; | ||
18 | + line-height: 28px; | ||
19 | + box-sizing: border-box; | ||
20 | + margin-right: 4px; | ||
21 | + | ||
22 | + &:last-child { | ||
23 | + margin-right: 0; | ||
24 | + } | ||
25 | + } | ||
26 | + | ||
27 | + .new-tag { | ||
28 | + width: 60px; | ||
29 | + background-color: #78dc7e; | ||
30 | + color: #fff; | ||
31 | + } | ||
32 | + | ||
33 | + .renew-tag { | ||
34 | + width: 90px; | ||
35 | + background-color: #78dc7e; | ||
36 | + color: #fff; | ||
37 | + } | ||
38 | + | ||
39 | + .sale-tag { | ||
40 | + width: 60px; | ||
41 | + background-color: #ff575c; | ||
42 | + color: #fff; | ||
43 | + } | ||
44 | + | ||
45 | + .new-festival-tag { | ||
46 | + width: 90px; | ||
47 | + background-color: #000; | ||
48 | + color: #fff; | ||
49 | + } | ||
50 | + | ||
51 | + .limit-tag { | ||
52 | + width: 100px; | ||
53 | + border: 1px solid #000; | ||
54 | + color: #000; | ||
55 | + } | ||
56 | + } | ||
57 | +} | ||
58 | + | ||
59 | +.good-detail-img { | ||
60 | + position: relative; | ||
61 | + height: 368px; | ||
62 | + | ||
63 | + .good-islike { | ||
64 | + position: absolute; | ||
65 | + width: 60px; | ||
66 | + height: 60px; | ||
67 | + top: 0px; | ||
68 | + right: 0px; | ||
69 | + line-height: 60px; | ||
70 | + font-size: 30px; | ||
71 | + text-align: center; | ||
72 | + color: #b0b0b0; | ||
73 | + text-decoration: none; | ||
74 | + } | ||
75 | + | ||
76 | + .good-like { | ||
77 | + color: #d72928; | ||
78 | + } | ||
79 | + | ||
80 | + img { | ||
81 | + display: block; | ||
82 | + width: 100%; | ||
83 | + height: 368px; | ||
84 | + } | ||
85 | + | ||
86 | + .few-tag { | ||
87 | + position: absolute; | ||
88 | + bottom: 0; | ||
89 | + width: 100%; | ||
90 | + height: 28px; | ||
91 | + background: #ffac5b; | ||
92 | + font-size: 18px; | ||
93 | + color: #fff; | ||
94 | + line-height: 28px; | ||
95 | + text-align: center; | ||
96 | + } | ||
97 | +} | ||
98 | + | ||
99 | +.good-detail-text { | ||
100 | + .name a { | ||
101 | + display: block; | ||
102 | + min-height: 60px; | ||
103 | +/* line-height: 29px;*/ | ||
104 | + /*overflow: hidden;*/ | ||
105 | +/* white-space: nowrap; | ||
106 | + text-overflow: ellipsis; | ||
107 | + text-decoration: none;*/ | ||
108 | + font-size: 22px; | ||
109 | + color: #444; | ||
110 | + margin: 20px 0; | ||
111 | + } | ||
112 | + | ||
113 | + .price { | ||
114 | + line-height: 22px; | ||
115 | + font-size: 22px; | ||
116 | + | ||
117 | + .sale-price { | ||
118 | + color: #d62927; | ||
119 | + } | ||
120 | + | ||
121 | + .sale-price.no-price { | ||
122 | + color: #000; | ||
123 | + } | ||
124 | + | ||
125 | + .market-price { | ||
126 | + margin: 0 0 0 5px; | ||
127 | + color: #b0b0b0; | ||
128 | + text-decoration: line-through; | ||
129 | + } | ||
130 | + } | ||
131 | +} |
-
Please register or login to post a comment