Showing
26 changed files
with
399 additions
and
310 deletions
@@ -75,7 +75,7 @@ app.use(compression()); | @@ -75,7 +75,7 @@ app.use(compression()); | ||
75 | 75 | ||
76 | app.use(session({ | 76 | app.use(session({ |
77 | requestKey: 'session', | 77 | requestKey: 'session', |
78 | - cookieName: 'yohoblk-session', | 78 | + cookieName: 'yohobuy_session_cookie', |
79 | secret: '82dd7e724f2c6870472c89dfa43cf48d', | 79 | secret: '82dd7e724f2c6870472c89dfa43cf48d', |
80 | domain: config.cookieDomain | 80 | domain: config.cookieDomain |
81 | })); | 81 | })); |
@@ -99,6 +99,7 @@ app.use((req, res, next) => { | @@ -99,6 +99,7 @@ app.use((req, res, next) => { | ||
99 | // dispatcher | 99 | // dispatcher |
100 | try { | 100 | try { |
101 | const user = require('./doraemon/middleware/user'); | 101 | const user = require('./doraemon/middleware/user'); |
102 | + const reqParamsFilter = require('./doraemon/middleware/req-params-filter'); | ||
102 | const subDomain = require('./doraemon/middleware/sub-domain'); | 103 | const subDomain = require('./doraemon/middleware/sub-domain'); |
103 | const itemNameHandler = require('./doraemon/middleware/item-name-handler'); | 104 | const itemNameHandler = require('./doraemon/middleware/item-name-handler'); |
104 | const setYohoData = require('./doraemon/middleware/set-yoho-data'); | 105 | const setYohoData = require('./doraemon/middleware/set-yoho-data'); |
@@ -110,6 +111,7 @@ try { | @@ -110,6 +111,7 @@ try { | ||
110 | const pageCache = require('./doraemon/middleware/page-cache'); | 111 | const pageCache = require('./doraemon/middleware/page-cache'); |
111 | 112 | ||
112 | // YOHO 前置中间件 | 113 | // YOHO 前置中间件 |
114 | + app.use(reqParamsFilter()); | ||
113 | app.use(subDomain()); | 115 | app.use(subDomain()); |
114 | app.use(itemNameHandler); | 116 | app.use(itemNameHandler); |
115 | app.use(setYohoData()); | 117 | app.use(setYohoData()); |
@@ -28,6 +28,9 @@ const list = (req, res, next) => { | @@ -28,6 +28,9 @@ const list = (req, res, next) => { | ||
28 | if (params.shop_id) { | 28 | if (params.shop_id) { |
29 | params.shopId = params.shop_id; | 29 | params.shopId = params.shop_id; |
30 | } | 30 | } |
31 | + | ||
32 | + params.isApp = req.yoho.isApp; | ||
33 | + | ||
31 | return searchModel.searchKeyActivity(params.query || '').then(activityResult => { | 34 | return searchModel.searchKeyActivity(params.query || '').then(activityResult => { |
32 | let activity = _.get(activityResult, 'urlobj.appUrl', ''); | 35 | let activity = _.get(activityResult, 'urlobj.appUrl', ''); |
33 | 36 | ||
@@ -117,7 +120,8 @@ const list = (req, res, next) => { | @@ -117,7 +120,8 @@ const list = (req, res, next) => { | ||
117 | title: title, | 120 | title: title, |
118 | goodList: params, | 121 | goodList: params, |
119 | firstPageGoodsList: result[2].list || [], | 122 | firstPageGoodsList: result[2].list || [], |
120 | - pageFooter: true | 123 | + pageFooter: true, |
124 | + shopId: params.shop_id || '' | ||
121 | }); | 125 | }); |
122 | }).catch(next); | 126 | }).catch(next); |
123 | } | 127 | } |
@@ -182,7 +186,8 @@ const search = (req, res, next) => { | @@ -182,7 +186,8 @@ const search = (req, res, next) => { | ||
182 | params.limit = 24; | 186 | params.limit = 24; |
183 | searchModel.getSearchData(params).then((result) => { | 187 | searchModel.getSearchData(params).then((result) => { |
184 | 188 | ||
185 | - if (result && result.list && parseInt(params.page) === 1 && parseInt(params.start) > 0) { | 189 | + if (result && result.list && result.list.length > params.start && |
190 | + parseInt(params.page) === 1 && parseInt(params.start) > 0) { | ||
186 | // 首屏渲染时,使用 'start' 参数裁减已渲染数据 | 191 | // 首屏渲染时,使用 'start' 参数裁减已渲染数据 |
187 | result.list = result.list.slice(params.start || 0); | 192 | result.list = result.list.slice(params.start || 0); |
188 | } | 193 | } |
@@ -1525,9 +1525,11 @@ let getNewProductAsyncData = (data) => { | @@ -1525,9 +1525,11 @@ let getNewProductAsyncData = (data) => { | ||
1525 | 1525 | ||
1526 | params.is_student = data.isStudent ? 1 : 0; | 1526 | params.is_student = data.isStudent ? 1 : 0; |
1527 | 1527 | ||
1528 | - if (!params.is_student) { | ||
1529 | - params.current_vip_level = data.vipLevel; | ||
1530 | - } | 1528 | + params.current_vip_level = data.vipLevel; |
1529 | + | ||
1530 | + // if (!params.is_student) { | ||
1531 | + // params.current_vip_level = data.vipLevel; | ||
1532 | + // } | ||
1531 | 1533 | ||
1532 | return api.get('', params, { | 1534 | return api.get('', params, { |
1533 | code: 200, | 1535 | code: 200, |
@@ -43,8 +43,13 @@ const _processBrandNames = (list) => { | @@ -43,8 +43,13 @@ const _processBrandNames = (list) => { | ||
43 | brandName: obj.brandDomain && obj.brandName.toLowerCase() | 43 | brandName: obj.brandDomain && obj.brandName.toLowerCase() |
44 | }); | 44 | }); |
45 | 45 | ||
46 | - brandDomainMap[obj.brandDomain.toLowerCase()] = obj.brandDomain.toLowerCase(); | ||
47 | - brandNameMap[obj.brandName.toLowerCase()] = obj.brandDomain.toLowerCase(); | 46 | + if (obj && obj.brandDomain) { |
47 | + brandDomainMap[obj.brandDomain.toLowerCase()] = obj.brandDomain.toLowerCase(); | ||
48 | + } | ||
49 | + | ||
50 | + if (obj && obj.brandName && obj.brandDomain) { | ||
51 | + brandNameMap[obj.brandName.toLowerCase()] = obj.brandDomain.toLowerCase(); | ||
52 | + } | ||
48 | }); | 53 | }); |
49 | }); | 54 | }); |
50 | 55 |
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | <i class="search-icon iconfont"></i> | 5 | <i class="search-icon iconfont"></i> |
6 | <input type="text" value="{{default}}" name="query" class="buriedpoint" data-bp-id="shop-search_input_1" autocomplete="off"> | 6 | <input type="text" value="{{default}}" name="query" class="buriedpoint" data-bp-id="shop-search_input_1" autocomplete="off"> |
7 | <input type="hidden" value="search" name="from"> | 7 | <input type="hidden" value="search" name="from"> |
8 | + <input type="hidden" name="shop_id" value="{{@root.shopId}}"> | ||
8 | <i class="clear-input iconfont hide"></i> | 9 | <i class="clear-input iconfont hide"></i> |
9 | <span id="search" class="search buriedpoint" type="submit" data-bp-id="shop-search_btn_0">搜索</span> | 10 | <span id="search" class="search buriedpoint" type="submit" data-bp-id="shop-search_btn_0">搜索</span> |
10 | </form> | 11 | </form> |
doraemon/middleware/req-params-filter.js
0 → 100644
1 | +const _ = require('lodash'); | ||
2 | + | ||
3 | +// 黑名单参数 | ||
4 | +const BLACK_LIST = [ | ||
5 | + 'client_secret', | ||
6 | + 'method' | ||
7 | +]; | ||
8 | + | ||
9 | +module.exports = () => { | ||
10 | + return (req, res, next) => { | ||
11 | + if (req.query) { | ||
12 | + _.forEach(BLACK_LIST, (key) => { | ||
13 | + if (req.query[key]) { | ||
14 | + delete req.query[key]; | ||
15 | + } | ||
16 | + }); | ||
17 | + } | ||
18 | + | ||
19 | + next(); | ||
20 | + }; | ||
21 | +}; |
@@ -28,6 +28,14 @@ | @@ -28,6 +28,14 @@ | ||
28 | (function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=640){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/640)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window); | 28 | (function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=640){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/640)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window); |
29 | </script> | 29 | </script> |
30 | {{/if}} | 30 | {{/if}} |
31 | + | ||
32 | + {{#if isWechat}} | ||
33 | + {{!--Android机器页面不再受到用户字体缩放强制改变大小 http://m.blog.csdn.net/article/details?id=51275080 --}} | ||
34 | + <script type="text/javascript"> | ||
35 | + (function(){if(typeof(WeixinJSBridge)=="undefined"){document.addEventListener("WeixinJSBridgeReady",function(a){setTimeout(function(){WeixinJSBridge.invoke("setFontSizeCallback",{fontSize:0},function(b){})},0)})}else{setTimeout(function(){WeixinJSBridge.invoke("setFontSizeCallback",{fontSize:0},function(a){})},0)}})(); | ||
36 | + </script> | ||
37 | + {{/if}} | ||
38 | + | ||
31 | {{#if devEnv}} | 39 | {{#if devEnv}} |
32 | {{#if localCss}} | 40 | {{#if localCss}} |
33 | <link rel="stylesheet" media="all" href="//{{devHost}}:5001/bundle/common.css"> | 41 | <link rel="stylesheet" media="all" href="//{{devHost}}:5001/bundle/common.css"> |
1 | { | 1 | { |
2 | "name": "m-yohobuy-node", | 2 | "name": "m-yohobuy-node", |
3 | - "version": "5.2.12", | 3 | + "version": "5.2.14", |
4 | "private": true, | 4 | "private": true, |
5 | "description": "A New Yohobuy Project With Express", | 5 | "description": "A New Yohobuy Project With Express", |
6 | "repository": { | 6 | "repository": { |
@@ -72,6 +72,7 @@ | @@ -72,6 +72,7 @@ | ||
72 | "postcss-center": "^1.0.0", | 72 | "postcss-center": "^1.0.0", |
73 | "postcss-clearfix": "^1.0.0", | 73 | "postcss-clearfix": "^1.0.0", |
74 | "postcss-crip": "^2.0.1", | 74 | "postcss-crip": "^2.0.1", |
75 | + "postcss-loader": "^1.1.1", | ||
75 | "postcss-position": "^0.5.0", | 76 | "postcss-position": "^0.5.0", |
76 | "postcss-pxtorem": "^3.3.1", | 77 | "postcss-pxtorem": "^3.3.1", |
77 | "postcss-scss": "^0.3.1", | 78 | "postcss-scss": "^0.3.1", |
@@ -77,6 +77,10 @@ $categoryContainer.on('touchend', function(e) { | @@ -77,6 +77,10 @@ $categoryContainer.on('touchend', function(e) { | ||
77 | if ($this[0] && $this[0].tagName === 'LI' && $this.find('a').attr('href')) { | 77 | if ($this[0] && $this[0].tagName === 'LI' && $this.find('a').attr('href')) { |
78 | location.href = $this.find('a').attr('href'); | 78 | location.href = $this.find('a').attr('href'); |
79 | } | 79 | } |
80 | + | ||
81 | + if ($this[0] && $this[0].tagName === 'A' && $this.attr('href')) { | ||
82 | + location.href = $this.attr('href'); | ||
83 | + } | ||
80 | }); | 84 | }); |
81 | 85 | ||
82 | $categoryContainer.find('.primary-level').on('touchstart touchend touchcancel', 'li', function() { | 86 | $categoryContainer.find('.primary-level').on('touchstart touchend touchcancel', 'li', function() { |
@@ -168,11 +168,11 @@ var installment = { | @@ -168,11 +168,11 @@ var installment = { | ||
168 | }); | 168 | }); |
169 | }, | 169 | }, |
170 | setCookies: function() { | 170 | setCookies: function() { |
171 | - window.setCookie('installmentUid', window.queryString.uid); | ||
172 | - window.setCookie('yhChannel', window.queryString.yh_channel); | ||
173 | - window.setCookie('udid', window.queryString.udid); | ||
174 | - window.setCookie('clientType', window.queryString.client_type); | ||
175 | - window.setCookie('appVersion', window.queryString.app_version); | 171 | + // window.setCookie('installmentUid', window.queryString.uid); |
172 | + // window.setCookie('yhChannel', window.queryString.yh_channel); | ||
173 | + // window.setCookie('udid', window.queryString.udid); | ||
174 | + // window.setCookie('clientType', window.queryString.client_type); | ||
175 | + // window.setCookie('appVersion', window.queryString.app_version); | ||
176 | } | 176 | } |
177 | }; | 177 | }; |
178 | 178 |
@@ -131,6 +131,8 @@ function search() { | @@ -131,6 +131,8 @@ function search() { | ||
131 | }), | 131 | }), |
132 | }, true); | 132 | }, true); |
133 | }); | 133 | }); |
134 | + | ||
135 | + window.rePosFooter && window.rePosFooter(); | ||
134 | }, | 136 | }, |
135 | error: function() { | 137 | error: function() { |
136 | tip.show('网络断开连接了~'); | 138 | tip.show('网络断开连接了~'); |
@@ -66,7 +66,7 @@ function render(data) { | @@ -66,7 +66,7 @@ function render(data) { | ||
66 | } | 66 | } |
67 | if (data.studentPrice) { | 67 | if (data.studentPrice) { |
68 | $('.price-date').removeClass(dbClass); | 68 | $('.price-date').removeClass(dbClass); |
69 | - $('.student-value').text('¥' + Math.round(studentPrice)); | 69 | + $('.student-value').text(data.studentPrice); |
70 | } else if (data.vipLevel) { | 70 | } else if (data.vipLevel) { |
71 | var li = $('.vip-level>li').first().remove(); | 71 | var li = $('.vip-level>li').first().remove(); |
72 | for (var i = 0; i < data.vipLevel.list.length; i++) { | 72 | for (var i = 0; i < data.vipLevel.list.length; i++) { |
@@ -77,6 +77,8 @@ function request() { | @@ -77,6 +77,8 @@ function request() { | ||
77 | // return false; | 77 | // return false; |
78 | }); | 78 | }); |
79 | 79 | ||
80 | + window.rePosFooter && window.rePosFooter(); | ||
81 | + | ||
80 | }).fail(function() { | 82 | }).fail(function() { |
81 | $recommendForYou.hide(); | 83 | $recommendForYou.hide(); |
82 | }); | 84 | }); |
@@ -16,6 +16,8 @@ require('./detail/desc'); | @@ -16,6 +16,8 @@ require('./detail/desc'); | ||
16 | // 喂你优选 | 16 | // 喂你优选 |
17 | require('./detail/recommend-for-you-product-desc'); | 17 | require('./detail/recommend-for-you-product-desc'); |
18 | 18 | ||
19 | +window.rePosFooter && window.rePosFooter(); | ||
20 | + | ||
19 | setTimeout(() => { | 21 | setTimeout(() => { |
20 | var Swiper = require('yoho-swiper'); | 22 | var Swiper = require('yoho-swiper'); |
21 | 23 | ||
@@ -175,6 +177,8 @@ setTimeout(() => { | @@ -175,6 +177,8 @@ setTimeout(() => { | ||
175 | }); | 177 | }); |
176 | } | 178 | } |
177 | }); | 179 | }); |
180 | + | ||
181 | + window.rePosFooter && window.rePosFooter(); | ||
178 | } | 182 | } |
179 | }); | 183 | }); |
180 | }, 150); | 184 | }, 150); |
@@ -274,6 +278,7 @@ setTimeout(() => { | @@ -274,6 +278,7 @@ setTimeout(() => { | ||
274 | require('./detail/comments-consults'); | 278 | require('./detail/comments-consults'); |
275 | require('./detail/consultform'); // TODO | 279 | require('./detail/consultform'); // TODO |
276 | promotionInit(); | 280 | promotionInit(); |
281 | + window.rePosFooter && window.rePosFooter(); | ||
277 | }); | 282 | }); |
278 | }, 200); | 283 | }, 200); |
279 | }(productSkn, productId, brandId)); | 284 | }(productSkn, productId, brandId)); |
@@ -92,6 +92,13 @@ var C_ID, RES_QTY, argument, optype, filext = {}; | @@ -92,6 +92,13 @@ var C_ID, RES_QTY, argument, optype, filext = {}; | ||
92 | 92 | ||
93 | var category = $('#category-point').val(); | 93 | var category = $('#category-point').val(); |
94 | 94 | ||
95 | +var noResult = '<p class="no-result">未找到相关搜索结果</p>'; | ||
96 | + | ||
97 | +// 首屏无数据 | ||
98 | +if ($fsgc.children().length === 0) { | ||
99 | + $goodsContainer.html(noResult); | ||
100 | +} | ||
101 | + | ||
95 | require('../../common'); | 102 | require('../../common'); |
96 | 103 | ||
97 | ellipsis.init(); | 104 | ellipsis.init(); |
@@ -467,6 +474,9 @@ function search(opt, filtering) { | @@ -467,6 +474,9 @@ function search(opt, filtering) { | ||
467 | 474 | ||
468 | if (filtering) { | 475 | if (filtering) { |
469 | $fsgc.addClass('hide'); | 476 | $fsgc.addClass('hide'); |
477 | + if (params.start) { | ||
478 | + delete setting.start; | ||
479 | + } | ||
470 | } | 480 | } |
471 | 481 | ||
472 | $.ajax({ | 482 | $.ajax({ |
@@ -474,8 +484,7 @@ function search(opt, filtering) { | @@ -474,8 +484,7 @@ function search(opt, filtering) { | ||
474 | url: location.protocol + '//m.yohobuy.com/product/search/search', | 484 | url: location.protocol + '//m.yohobuy.com/product/search/search', |
475 | data: setting, | 485 | data: setting, |
476 | success: function(data) { | 486 | success: function(data) { |
477 | - var noResult = '<p class="no-result">未找到相关搜索结果</p>', | ||
478 | - num, | 487 | + var num, |
479 | $container, | 488 | $container, |
480 | goodIds = [], | 489 | goodIds = [], |
481 | yasparm, | 490 | yasparm, |
@@ -810,6 +819,8 @@ $newList.on('touchstart', 'li', function(e) { | @@ -810,6 +819,8 @@ $newList.on('touchstart', 'li', function(e) { | ||
810 | $firstLiDom = $listNav.find('li.first-li-more'); | 819 | $firstLiDom = $listNav.find('li.first-li-more'); |
811 | 820 | ||
812 | e.preventDefault(); | 821 | e.preventDefault(); |
822 | + | ||
823 | + | ||
813 | if ($(this).hasClass('new')) { | 824 | if ($(this).hasClass('new')) { |
814 | navType = 'new'; | 825 | navType = 'new'; |
815 | } else if ($(this).hasClass('default')) { | 826 | } else if ($(this).hasClass('default')) { |
@@ -826,6 +837,14 @@ $newList.on('touchstart', 'li', function(e) { | @@ -826,6 +837,14 @@ $newList.on('touchstart', 'li', function(e) { | ||
826 | $(document).trigger('shouldSendBpData', [bpIdData]); | 837 | $(document).trigger('shouldSendBpData', [bpIdData]); |
827 | newListHide(); | 838 | newListHide(); |
828 | 839 | ||
840 | + if (navType !== 'default') { | ||
841 | + $fsgc.addClass('hide'); | ||
842 | + } | ||
843 | + | ||
844 | + if ($(this).hasClass('active')) { | ||
845 | + return; | ||
846 | + } | ||
847 | + | ||
829 | // 切换container显示 | 848 | // 切换container显示 |
830 | $goodsContainer.children('.container:not(.hide)').addClass('hide'); | 849 | $goodsContainer.children('.container:not(.hide)').addClass('hide'); |
831 | 850 |
public/scss/channel/_home-main.css
0 → 100644
1 | +.mobile-container { | ||
2 | + margin-left: auto; | ||
3 | + margin-right: auto; | ||
4 | + width: 100%; | ||
5 | + max-width: 640px; | ||
6 | + overflow: hidden; | ||
7 | +} | ||
8 | + | ||
9 | +.mobile-wrap { | ||
10 | + position: relative; | ||
11 | + z-index: 2; | ||
12 | + background: #f0f0f0; | ||
13 | + transition: transform 0.3s; | ||
14 | + | ||
15 | + .creative-life .classify-name { | ||
16 | + display: none; | ||
17 | + } | ||
18 | + | ||
19 | + .banner-top .banner-swiper:first-child { | ||
20 | + height: 312px; | ||
21 | + } | ||
22 | +} | ||
23 | + | ||
24 | +.mobile-wrap.menu-open { | ||
25 | + transform: translateX(540px); | ||
26 | +} | ||
27 | + | ||
28 | +.overlay { | ||
29 | + display: none; | ||
30 | + position: absolute; | ||
31 | + top: 0; | ||
32 | + left: 0; | ||
33 | + right: 0; | ||
34 | + bottom: 0; | ||
35 | + background: #000; | ||
36 | + z-index: 4; | ||
37 | + transition: opacity 1s; | ||
38 | +} | ||
39 | + | ||
40 | +.overlay.show { | ||
41 | + display: block; | ||
42 | + opacity: 0.3; | ||
43 | +} |
@@ -33,47 +33,5 @@ | @@ -33,47 +33,5 @@ | ||
33 | @import "shop-recommand"; | 33 | @import "shop-recommand"; |
34 | @import "sale-floor"; | 34 | @import "sale-floor"; |
35 | @import "divide-image"; | 35 | @import "divide-image"; |
36 | +@import "home-main"; | ||
36 | 37 | ||
37 | -.mobile-container { | ||
38 | - margin-left: auto; | ||
39 | - margin-right: auto; | ||
40 | - width: 100%; | ||
41 | - max-width: 640px; | ||
42 | - overflow: hidden; | ||
43 | -} | ||
44 | - | ||
45 | -.mobile-wrap { | ||
46 | - position: relative; | ||
47 | - z-index: 2; | ||
48 | - background: #f0f0f0; | ||
49 | - transition: transform 0.3s; | ||
50 | - | ||
51 | - .creative-life .classify-name { | ||
52 | - display: none; | ||
53 | - } | ||
54 | - | ||
55 | - .banner-top .banner-swiper:first-child { | ||
56 | - height: 312px; | ||
57 | - } | ||
58 | -} | ||
59 | - | ||
60 | -.mobile-wrap.menu-open { | ||
61 | - transform: translateX(540px); | ||
62 | -} | ||
63 | - | ||
64 | -.overlay { | ||
65 | - display: none; | ||
66 | - position: absolute; | ||
67 | - top: 0; | ||
68 | - left: 0; | ||
69 | - right: 0; | ||
70 | - bottom: 0; | ||
71 | - background: #000; | ||
72 | - z-index: 4; | ||
73 | - transition: opacity 1s; | ||
74 | -} | ||
75 | - | ||
76 | -.overlay.show { | ||
77 | - display: block; | ||
78 | - opacity: 0.3; | ||
79 | -} |
public/scss/channel/_index-main.css
0 → 100644
1 | +.index-page { | ||
2 | + overflow: hidden; | ||
3 | + margin: 0 auto; | ||
4 | + width: 100%; | ||
5 | + | ||
6 | + #double11 { | ||
7 | + display: block; | ||
8 | + width: 432px; | ||
9 | + height: 100px; | ||
10 | + margin: 0 auto; | ||
11 | + background-color: transparent; | ||
12 | + background-image: resolve("channel/11.11.png"); | ||
13 | + background-size: 100%; | ||
14 | + | ||
15 | + &:active { | ||
16 | + background-image: resolve("channel/11.11-touch.png"); | ||
17 | + } | ||
18 | + } | ||
19 | + | ||
20 | + #yohood { | ||
21 | + border: none; | ||
22 | + border-bottom: 8px solid #fff; | ||
23 | + background-color: transparent; | ||
24 | + background-image: resolve("channel/yohood.png"); | ||
25 | + background-position-x: 26%; | ||
26 | + background-position-y: 36%; | ||
27 | + background-size: 40%; | ||
28 | + background-repeat: no-repeat; | ||
29 | + } | ||
30 | + | ||
31 | + #yohood:active { | ||
32 | + border-bottom-color: #000; | ||
33 | + background-color: rgba(255, 255, 255, 0.4); | ||
34 | + background-image: resolve("channel/yohood-tapped.png"); | ||
35 | + | ||
36 | + .right-icon { | ||
37 | + color: #000; | ||
38 | + } | ||
39 | + } | ||
40 | + | ||
41 | + .index-header { | ||
42 | + box-sizing: border-box; | ||
43 | + padding: 0 20px; | ||
44 | + width: 100%; | ||
45 | + height: 96px; | ||
46 | + line-height: 96px; | ||
47 | + | ||
48 | + .index-logo { | ||
49 | + float: left; | ||
50 | + width: 288px; | ||
51 | + height: 96px; | ||
52 | + background: resolve("channel/yohologo.png") left center no-repeat; | ||
53 | + background-size: 280px 60px; | ||
54 | + opacity: 1; | ||
55 | + transition: all 400ms; | ||
56 | + | ||
57 | + img { | ||
58 | + width: 207px; | ||
59 | + height: 49px; | ||
60 | + vertical-align: middle; | ||
61 | + } | ||
62 | + | ||
63 | + &.action { | ||
64 | + width: 0; | ||
65 | + opacity: 0; | ||
66 | + } | ||
67 | + } | ||
68 | + | ||
69 | + .box { | ||
70 | + position: relative; | ||
71 | + z-index: 1; | ||
72 | + overflow: hidden; | ||
73 | + | ||
74 | + &.action { | ||
75 | + .no-search, | ||
76 | + .clear-text { | ||
77 | + display: block; | ||
78 | + } | ||
79 | + } | ||
80 | + } | ||
81 | + | ||
82 | + .index-search { | ||
83 | + overflow: hidden; | ||
84 | + height: 96px; | ||
85 | + background: #fff; | ||
86 | + transition: width 0.4s; | ||
87 | + | ||
88 | + .search-box { | ||
89 | + position: relative; | ||
90 | + top: 20px; | ||
91 | + overflow: hidden; | ||
92 | + box-sizing: border-box; | ||
93 | + padding-right: 80px; | ||
94 | + height: 56px; | ||
95 | + border: 1px solid #ccc; | ||
96 | + transition: width 400ms; | ||
97 | + transition: margin-left 0.4s; | ||
98 | + } | ||
99 | + | ||
100 | + input { | ||
101 | + float: left; | ||
102 | + overflow: hidden; | ||
103 | + padding: 10px; | ||
104 | + width: 96%; | ||
105 | + border: none; | ||
106 | + color: #999; | ||
107 | + font-size: 28px; | ||
108 | + -webkit-appearance: none; | ||
109 | + } | ||
110 | + | ||
111 | + .iconfont { | ||
112 | + position: absolute; | ||
113 | + top: 8px; | ||
114 | + z-index: 1; | ||
115 | + width: 40px; | ||
116 | + font-size: 28px; | ||
117 | + line-height: 40px; | ||
118 | + } | ||
119 | + | ||
120 | + .clear-text { | ||
121 | + right: 50px; | ||
122 | + display: none; | ||
123 | + color: #ccc; | ||
124 | + } | ||
125 | + | ||
126 | + .search-icon { | ||
127 | + right: 10px; | ||
128 | + color: #666; | ||
129 | + | ||
130 | + &.empty { | ||
131 | + color: #e6e6e6; | ||
132 | + } | ||
133 | + } | ||
134 | + } | ||
135 | + | ||
136 | + .no-search { | ||
137 | + display: none; | ||
138 | + float: left; | ||
139 | + margin-right: 10px; | ||
140 | + color: #999; | ||
141 | + font-size: 28px; | ||
142 | + } | ||
143 | + } | ||
144 | + | ||
145 | + .index-container { | ||
146 | + position: relative; | ||
147 | + background-color: white; | ||
148 | + transition: transform 0.5s; | ||
149 | + | ||
150 | + .index-channel { | ||
151 | + position: relative; | ||
152 | + min-height: 800px; | ||
153 | + background-color: #000; | ||
154 | + color: #fff; | ||
155 | + text-align: center; | ||
156 | + | ||
157 | + img { | ||
158 | + width: 100%; | ||
159 | + } | ||
160 | + | ||
161 | + .index-channel-list { | ||
162 | + position: absolute; | ||
163 | + top: 50%; | ||
164 | + margin-top: -300px; | ||
165 | + width: 100%; | ||
166 | + | ||
167 | + .list-item { | ||
168 | + position: relative; | ||
169 | + display: block; | ||
170 | + margin: 0 auto 40px; | ||
171 | + width: 432px; | ||
172 | + height: 100px; | ||
173 | + border: 8px solid #fff; | ||
174 | + background-color: #000; | ||
175 | + color: #fff; | ||
176 | + text-align: center; | ||
177 | + font-weight: bold; | ||
178 | + font-size: 32px; | ||
179 | + line-height: 82px; | ||
180 | + } | ||
181 | + | ||
182 | + .list-item:last-child { | ||
183 | + margin-bottom: 0; | ||
184 | + } | ||
185 | + | ||
186 | + .lighter { | ||
187 | + font-weight: lighter; | ||
188 | + } | ||
189 | + | ||
190 | + .right-icon { | ||
191 | + position: absolute; | ||
192 | + top: 0; | ||
193 | + right: 10px; | ||
194 | + font-weight: bold; | ||
195 | + } | ||
196 | + | ||
197 | + .homestyle { | ||
198 | + margin-bottom: 50px; | ||
199 | + width: 287.3px; | ||
200 | + } | ||
201 | + } | ||
202 | + } | ||
203 | + } | ||
204 | +} |
1 | -.index-page { | ||
2 | - overflow: hidden; | ||
3 | - margin: 0 auto; | ||
4 | - width: 100%; | ||
5 | 1 | ||
6 | - #double11 { | ||
7 | - display: block; | ||
8 | - width: 432px; | ||
9 | - height: 100px; | ||
10 | - margin: 0 auto; | ||
11 | - background-color: transparent; | ||
12 | - background-image: resolve("channel/11.11.png"); | ||
13 | - background-size: 100%; | ||
14 | - | ||
15 | - &:active { | ||
16 | - background-image: resolve("channel/11.11-touch.png"); | ||
17 | - } | ||
18 | - } | ||
19 | - | ||
20 | - #yohood { | ||
21 | - border: none; | ||
22 | - border-bottom: 8px solid #fff; | ||
23 | - background-color: transparent; | ||
24 | - background-image: resolve("channel/yohood.png"); | ||
25 | - background-position-x: 26%; | ||
26 | - background-position-y: 36%; | ||
27 | - background-size: 40%; | ||
28 | - background-repeat: no-repeat; | ||
29 | - } | ||
30 | - | ||
31 | - #yohood:active { | ||
32 | - border-bottom-color: #000; | ||
33 | - background-color: rgba(255, 255, 255, 0.4); | ||
34 | - background-image: resolve("channel/yohood-tapped.png"); | ||
35 | - | ||
36 | - .right-icon { | ||
37 | - color: #000; | ||
38 | - } | ||
39 | - } | ||
40 | - | ||
41 | - .index-header { | ||
42 | - box-sizing: border-box; | ||
43 | - padding: 0 20px; | ||
44 | - width: 100%; | ||
45 | - height: 96px; | ||
46 | - line-height: 96px; | ||
47 | - | ||
48 | - .index-logo { | ||
49 | - float: left; | ||
50 | - width: 288px; | ||
51 | - height: 96px; | ||
52 | - background: resolve("channel/yohologo.png") left center no-repeat; | ||
53 | - background-size: 280px 60px; | ||
54 | - opacity: 1; | ||
55 | - transition: all 400ms; | ||
56 | - | ||
57 | - img { | ||
58 | - width: 207px; | ||
59 | - height: 49px; | ||
60 | - vertical-align: middle; | ||
61 | - } | ||
62 | - | ||
63 | - &.action { | ||
64 | - width: 0; | ||
65 | - opacity: 0; | ||
66 | - } | ||
67 | - } | ||
68 | - | ||
69 | - .box { | ||
70 | - position: relative; | ||
71 | - z-index: 1; | ||
72 | - overflow: hidden; | ||
73 | - | ||
74 | - &.action { | ||
75 | - .no-search, | ||
76 | - .clear-text { | ||
77 | - display: block; | ||
78 | - } | ||
79 | - } | ||
80 | - } | ||
81 | - | ||
82 | - .index-search { | ||
83 | - overflow: hidden; | ||
84 | - height: 96px; | ||
85 | - background: #fff; | ||
86 | - transition: width 0.4s; | ||
87 | - | ||
88 | - .search-box { | ||
89 | - position: relative; | ||
90 | - top: 20px; | ||
91 | - overflow: hidden; | ||
92 | - box-sizing: border-box; | ||
93 | - padding-right: 80px; | ||
94 | - height: 56px; | ||
95 | - border: 1px solid #ccc; | ||
96 | - transition: width 400ms; | ||
97 | - transition: margin-left 0.4s; | ||
98 | - } | ||
99 | - | ||
100 | - input { | ||
101 | - float: left; | ||
102 | - overflow: hidden; | ||
103 | - padding: 10px; | ||
104 | - width: 96%; | ||
105 | - border: none; | ||
106 | - color: #999; | ||
107 | - font-size: 28px; | ||
108 | - -webkit-appearance: none; | ||
109 | - } | ||
110 | - | ||
111 | - .iconfont { | ||
112 | - position: absolute; | ||
113 | - top: 8px; | ||
114 | - z-index: 1; | ||
115 | - width: 40px; | ||
116 | - font-size: 28px; | ||
117 | - line-height: 40px; | ||
118 | - } | ||
119 | - | ||
120 | - .clear-text { | ||
121 | - right: 50px; | ||
122 | - display: none; | ||
123 | - color: #ccc; | ||
124 | - } | ||
125 | - | ||
126 | - .search-icon { | ||
127 | - right: 10px; | ||
128 | - color: #666; | ||
129 | - | ||
130 | - &.empty { | ||
131 | - color: #e6e6e6; | ||
132 | - } | ||
133 | - } | ||
134 | - } | ||
135 | - | ||
136 | - .no-search { | ||
137 | - display: none; | ||
138 | - float: left; | ||
139 | - margin-right: 10px; | ||
140 | - color: #999; | ||
141 | - font-size: 28px; | ||
142 | - } | ||
143 | - } | ||
144 | - | ||
145 | - .index-container { | ||
146 | - position: relative; | ||
147 | - background-color: white; | ||
148 | - transition: transform 0.5s; | ||
149 | - | ||
150 | - .index-channel { | ||
151 | - position: relative; | ||
152 | - min-height: 800px; | ||
153 | - background-color: #000; | ||
154 | - color: #fff; | ||
155 | - text-align: center; | ||
156 | - | ||
157 | - img { | ||
158 | - width: 100%; | ||
159 | - } | ||
160 | - | ||
161 | - .index-channel-list { | ||
162 | - position: absolute; | ||
163 | - top: 50%; | ||
164 | - margin-top: -300px; | ||
165 | - width: 100%; | ||
166 | - | ||
167 | - .list-item { | ||
168 | - position: relative; | ||
169 | - display: block; | ||
170 | - margin: 0 auto 40px; | ||
171 | - width: 432px; | ||
172 | - height: 100px; | ||
173 | - border: 8px solid #fff; | ||
174 | - background-color: #000; | ||
175 | - color: #fff; | ||
176 | - text-align: center; | ||
177 | - font-weight: bold; | ||
178 | - font-size: 32px; | ||
179 | - line-height: 82px; | ||
180 | - } | ||
181 | - | ||
182 | - .list-item:last-child { | ||
183 | - margin-bottom: 0; | ||
184 | - } | ||
185 | - | ||
186 | - .lighter { | ||
187 | - font-weight: lighter; | ||
188 | - } | ||
189 | - | ||
190 | - .right-icon { | ||
191 | - position: absolute; | ||
192 | - top: 0; | ||
193 | - right: 10px; | ||
194 | - font-weight: bold; | ||
195 | - } | ||
196 | - | ||
197 | - .homestyle { | ||
198 | - margin-bottom: 50px; | ||
199 | - width: 287.3px; | ||
200 | - } | ||
201 | - } | ||
202 | - } | ||
203 | - } | ||
204 | -} | 2 | +@import "index-main"; |
205 | @import "brand"; | 3 | @import "brand"; |
206 | @import "home"; | 4 | @import "home"; |
1 | - @import "../layout/_loading.css"; | ||
2 | - @import "../layout/_swiper.css"; | 1 | +@import "../layout/_loading.css"; |
2 | +@import "../layout/_swiper.css"; | ||
3 | 3 | ||
4 | - @import "../common/_filter.css"; | ||
5 | - @import "../common/_good.css"; | ||
6 | - @import "../common/_loading.css"; | ||
7 | - @import "../common/_suspend-home.css"; | 4 | +@import "../common/_filter.css"; |
5 | +@import "../common/_good.css"; | ||
6 | +@import "../common/_loading.css"; | ||
7 | +@import "../common/_suspend-home.css"; | ||
8 | 8 | ||
9 | - @import "_banner-bottom.css"; | ||
10 | - @import "_banner-center.css"; | ||
11 | - @import "_banner-top.css"; | ||
12 | - @import "_brand.css"; | ||
13 | - @import "_cate.css"; | ||
14 | - @import "_creative-life.css"; | ||
15 | - @import "_divide-image.css"; | ||
16 | - @import "_fine-brands.css"; | ||
17 | - @import "_floor-header.css"; | ||
18 | - @import "_footer-tab.css"; | ||
19 | - @import "_fresh-only.css"; | ||
20 | - @import "_goods-category.css"; | ||
21 | - @import "_home-header.css"; | ||
22 | - @import "_home.css"; | ||
23 | - @import "_hot-brands.css"; | ||
24 | - @import "_hot-category.css"; | ||
25 | - @import "_hot-single.css"; | ||
26 | - @import "_icons-enter.css"; | ||
27 | - @import "_index.css"; | ||
28 | - @import "_left-right.css"; | ||
29 | - @import "_maybe-like.css"; | ||
30 | - @import "_new-first.css"; | ||
31 | - @import "_new-user-floor.css"; | ||
32 | - @import "_notice.css"; | ||
33 | - @import "_plus-star.css"; | ||
34 | - @import "_sale-floor.css"; | ||
35 | - @import "_search-input.css"; | ||
36 | - @import "_search.css"; | ||
37 | - @import "_seckill.css"; | ||
38 | - @import "_shop-recommand.css"; | ||
39 | - @import "_side-nav.css"; | ||
40 | - @import "_six-lines-floor.css"; | ||
41 | - @import "_three-picture.css"; | ||
42 | - @import "_thumb-row.css"; | ||
43 | - @import "_trend-topics.css"; | ||
44 | - @import "_trend-tops.css"; | ||
45 | - @import "_trendsetter-collocation.css"; | ||
46 | - @import "_two-column-goods.css"; | ||
47 | - @import "_vip-only.css"; | 9 | +@import "_index-main.css"; |
10 | +@import "_brand.css"; | ||
11 | +@import "_banner-bottom.css"; | ||
12 | +@import "_banner-center.css"; | ||
13 | +@import "_banner-top.css"; | ||
14 | +@import "_cate.css"; | ||
15 | +@import "_creative-life.css"; | ||
16 | +@import "_divide-image.css"; | ||
17 | +@import "_fine-brands.css"; | ||
18 | +@import "_floor-header.css"; | ||
19 | +@import "_footer-tab.css"; | ||
20 | +@import "_fresh-only.css"; | ||
21 | +@import "_goods-category.css"; | ||
22 | +@import "_hot-brands.css"; | ||
23 | +@import "_hot-category.css"; | ||
24 | +@import "_home-header.css"; | ||
25 | +@import "_hot-single.css"; | ||
26 | +@import "_icons-enter.css"; | ||
27 | +@import "_left-right.css"; | ||
28 | +@import "_maybe-like.css"; | ||
29 | +@import "_new-first.css"; | ||
30 | +@import "_new-user-floor.css"; | ||
31 | +@import "_notice.css"; | ||
32 | +@import "_plus-star.css"; | ||
33 | +@import "_sale-floor.css"; | ||
34 | +@import "_search.css"; | ||
35 | +@import "_seckill.css"; | ||
36 | +@import "_shop-recommand.css"; | ||
37 | +@import "_side-nav.css"; | ||
38 | +@import "_six-lines-floor.css"; | ||
39 | +@import "_three-picture.css"; | ||
40 | +@import "_thumb-row.css"; | ||
41 | +@import "_trend-topics.css"; | ||
42 | +@import "_trend-tops.css"; | ||
43 | +@import "_trendsetter-collocation.css"; | ||
44 | +@import "_two-column-goods.css"; | ||
45 | +@import "_vip-only.css"; | ||
46 | +@import "_home-main.css"; |
@@ -317,8 +317,9 @@ | @@ -317,8 +317,9 @@ | ||
317 | font-size: 26px; | 317 | font-size: 26px; |
318 | margin: 13px 30px 0 0; | 318 | margin: 13px 30px 0 0; |
319 | border: none; | 319 | border: none; |
320 | - float: right; | ||
321 | border-radius: 8px; | 320 | border-radius: 8px; |
321 | + position: absolute; | ||
322 | + right: 0; | ||
322 | } | 323 | } |
323 | 324 | ||
324 | .repayment-btn:active { | 325 | .repayment-btn:active { |
1 | @import "../../channel/banner-top"; | 1 | @import "../../channel/banner-top"; |
2 | @import "../../common/good"; | 2 | @import "../../common/good"; |
3 | @import "../../common/filter"; | 3 | @import "../../common/filter"; |
4 | +@import "../../common/_suspend-home.css"; | ||
4 | @import "search"; | 5 | @import "search"; |
5 | @import "list"; | 6 | @import "list"; |
6 | @import "search-index"; | 7 | @import "search-index"; |
-
Please register or login to post a comment