Authored by ccbikai(👎🏻🍜)

Merge remote-tracking branch 'origin/feature/brandsTree' into release/5.4.1

@@ -20,28 +20,32 @@ const index = (req, res, next) => { @@ -20,28 +20,32 @@ const index = (req, res, next) => {
20 let categoryTab = req.query.tab || ''; 20 let categoryTab = req.query.tab || '';
21 let gender = req.query.gender || req.cookies._Channel && channels[req.cookies._Channel] || 1; 21 let gender = req.query.gender || req.cookies._Channel && channels[req.cookies._Channel] || 1;
22 let brandCode; 22 let brandCode;
23 - let cateCode;  
24 let isCate = categoryTab === 'category' ? true : false; 23 let isCate = categoryTab === 'category' ? true : false;
  24 + let appType = req.query.app_type || 1;
25 25
26 if (parseInt(gender, 10) === 1) { 26 if (parseInt(gender, 10) === 1) {
27 brandCode = '7317a4701a1d3ddc8d93a5df77a63b75'; 27 brandCode = '7317a4701a1d3ddc8d93a5df77a63b75';
28 - cateCode = '7f885e9cab53231cff34ea236f3f1120';  
29 } else { 28 } else {
30 brandCode = '84313c4b293a1c0aea985aa16a42a6b5'; 29 brandCode = '84313c4b293a1c0aea985aa16a42a6b5';
31 - cateCode = 'a6f9dc00219eb7d08520a18864929a30';  
32 } 30 }
33 31
34 - brandModel.indexData(gender, brandCode, cateCode).then(result => { 32 + brandModel.indexData(gender, brandCode, req.yoho.channel, appType).then(result => {
35 33
36 res.render('brand/brand', { 34 res.render('brand/brand', {
37 module: 'guang', 35 module: 'guang',
38 page: 'brand-list', 36 page: 'brand-list',
39 width750: true, 37 width750: true,
  38 + pageHeader: headerModel.setNav({
  39 + navTitle: ''
  40 + }),
40 categoryTab: isCate, 41 categoryTab: isCate,
41 channel: result.channel ? result.channel : '', 42 channel: result.channel ? result.channel : '',
42 brandList: result.brandList, 43 brandList: result.brandList,
43 list: result.list ? result.list : '', 44 list: result.list ? result.list : '',
44 - categoryData: result.categoryData 45 + category: {
  46 + nav: result.categoryData.nav,
  47 + list: result.categoryData.list
  48 + }
45 }); 49 });
46 }).catch(next); 50 }).catch(next);
47 }; 51 };
@@ -64,52 +68,7 @@ const brandList = (req, res, next) => { @@ -64,52 +68,7 @@ const brandList = (req, res, next) => {
64 }).catch(next); 68 }).catch(next);
65 }; 69 };
66 70
67 -const categoryData = (req, res, next) => {  
68 - let code;  
69 - let gender = req.query.gender || req.cookies._Channel && channels[req.cookies._Channel] || 1;  
70 -  
71 - if (parseInt(gender, 10) === 1) {  
72 - code = '7f885e9cab53231cff34ea236f3f1120';  
73 - } else {  
74 - code = 'a6f9dc00219eb7d08520a18864929a30';  
75 - }  
76 -  
77 - brandModel.categoryData(code).then(result => {  
78 - res.render('brand/category', {  
79 - layout: false,  
80 - categoryData: result.categoryData  
81 - });  
82 - }).catch(next);  
83 -};  
84 -  
85 -// 全部分类  
86 -const cateAll = (req, res, next) => {  
87 - let appType = req.query.app_type || 1;  
88 -  
89 - brandModel.getCateData(req.yoho.channel, appType).then((result) => {  
90 - res.render('brand/cate-all', {  
91 - module: 'guang',  
92 - page: 'cate-all',  
93 - title: '全部分类',  
94 - pageHeader: headerModel.setNav({  
95 - navTitle: '全部分类'  
96 - }),  
97 - pageFooter: false,  
98 - category: {  
99 - nav: result.nav,  
100 - list: result.list  
101 -  
102 - // searchUrl: helpers.urlFormat('/search', null, 'search')  
103 - }  
104 -  
105 - // showFooterTab: footerModel.getUrlData('category')  
106 - });  
107 - }).catch(next);  
108 -};  
109 -  
110 module.exports = { 71 module.exports = {
111 index, 72 index,
112 - brandList,  
113 - categoryData,  
114 - cateAll 73 + brandList
115 }; 74 };
@@ -6,13 +6,13 @@ const helpers = global.yoho.helpers; @@ -6,13 +6,13 @@ const helpers = global.yoho.helpers;
6 6
7 const yhChannel = { 7 const yhChannel = {
8 1: { 8 1: {
9 - channel: '301' 9 + channel: '1'
10 }, 10 },
11 2: { 11 2: {
12 - channel: '302' 12 + channel: '2'
13 }, 13 },
14 4: { 14 4: {
15 - channel: '303' 15 + channel: '3'
16 } 16 }
17 }; 17 };
18 18
@@ -219,20 +219,25 @@ const _processCateData = (list, channel, appType) => { @@ -219,20 +219,25 @@ const _processCateData = (list, channel, appType) => {
219 }; 219 };
220 }; 220 };
221 221
222 -// const _dealBrandUrl = (list) => {  
223 -// var domain;  
224 -  
225 -// _.forEach(list.data, function(val) {  
226 -// domain = val.url.substring(val.url.indexOf('shop/') + 5, val.url.indexOf('?'));  
227 -  
228 -// val.url = '//m.yohobuy.com/product/index/brand?domain=' + domain;  
229 -// }); 222 +const _getCateData = (channel, appType) => {
  223 + return api.get('', {
  224 + method: 'app.sort.get',
  225 + app_type: 1
  226 + }, {
  227 + cache: true
  228 + }).then((result) => {
  229 + if (!result.code || result.code !== 200 || !result.data) {
  230 + return [];
  231 + }
230 232
231 -// return list;  
232 -// }; 233 + return result.data;
  234 + }).then((list) => {
  235 + return _processCateData(list, channel, appType);
  236 + });
  237 +};
233 238
234 -const indexData = (gender, brandCode, cateCode) => {  
235 - return Promise.all([_getChannelData(gender), _getResourcesData(brandCode), _getBrandListOriginData(gender), _getResourcesData(cateCode)]).then(result => { 239 +const indexData = (gender, brandCode, channel, appType) => {
  240 + return Promise.all([_getChannelData(gender), _getResourcesData(brandCode), _getBrandListOriginData(gender), _getCateData(channel, appType)]).then(result => {
236 let brandList = {}; 241 let brandList = {};
237 let list = {}; 242 let list = {};
238 let categoryData = {}; 243 let categoryData = {};
@@ -245,10 +250,8 @@ const indexData = (gender, brandCode, cateCode) => { @@ -245,10 +250,8 @@ const indexData = (gender, brandCode, cateCode) => {
245 if (result[1]) { 250 if (result[1]) {
246 _.forEach(result[1], function(data) { 251 _.forEach(result[1], function(data) {
247 if (data.focus_type && data.focus_type === '1') { 252 if (data.focus_type && data.focus_type === '1') {
248 - // brandList.bannerTop = _dealBrandUrl(data);  
249 brandList.bannerTop = data; 253 brandList.bannerTop = data;
250 } else if (data.focus_type && data.focus_type === '2') { 254 } else if (data.focus_type && data.focus_type === '2') {
251 - // brandList.focusData = _dealBrandUrl(data).data;  
252 brandList.focusData = data.data; 255 brandList.focusData = data.data;
253 } else if (data.template_name === 'single_image') { 256 } else if (data.template_name === 'single_image') {
254 brandList.bannerTop = data; 257 brandList.bannerTop = data;
@@ -263,26 +266,12 @@ const indexData = (gender, brandCode, cateCode) => { @@ -263,26 +266,12 @@ const indexData = (gender, brandCode, cateCode) => {
263 } 266 }
264 267
265 if (result[3]) { 268 if (result[3]) {
266 - _.forEach(result[3], function(data) {  
267 - if (data.template_name === 'recommend_content_five') {  
268 - // _.forEach(data.data.list, function(val) {  
269 - // var param = val.url.substring(val.url.indexOf('list?') + 5);  
270 -  
271 - // val.url = '//list.m.yohobuy.com/?' + param;  
272 - // });  
273 - categoryData.list = data.data.list;  
274 - } else if (data.template_name === 'focus') {  
275 - // _.forEach(data.data, function(val) {  
276 -  
277 - // val.url = '//m.yohobuy.com/guang/cate-all';  
278 - // });  
279 - categoryData.focusData = data;  
280 - }  
281 - }); 269 +
  270 + list.categoryData = result[3];
282 } 271 }
283 272
284 list.brandList = brandList; 273 list.brandList = brandList;
285 - list.categoryData = categoryData; 274 +
286 return list; 275 return list;
287 }); 276 });
288 }; 277 };
@@ -295,10 +284,8 @@ const brandListData = (code, gender) => { @@ -295,10 +284,8 @@ const brandListData = (code, gender) => {
295 if (result[0]) { 284 if (result[0]) {
296 _.forEach(result[0], function(data) { 285 _.forEach(result[0], function(data) {
297 if (data.focus_type && data.focus_type === '1') { 286 if (data.focus_type && data.focus_type === '1') {
298 - // brandList.bannerTop = _dealBrandUrl(data);  
299 brandList.bannerTop = data; 287 brandList.bannerTop = data;
300 } else if (data.focus_type && data.focus_type === '2') { 288 } else if (data.focus_type && data.focus_type === '2') {
301 - // brandList.focusData = _dealBrandUrl(data).data;  
302 brandList.focusData = data.data; 289 brandList.focusData = data.data;
303 } else if (data.template_name === 'single_image') { 290 } else if (data.template_name === 'single_image') {
304 brandList.bannerTop = data; 291 brandList.bannerTop = data;
@@ -316,64 +303,9 @@ const brandListData = (code, gender) => { @@ -316,64 +303,9 @@ const brandListData = (code, gender) => {
316 }); 303 });
317 }; 304 };
318 305
319 -const categoryData = (code) => {  
320 306
321 - return _getResourcesData(code).then(result => {  
322 - let category = {};  
323 - let list = {};  
324 -  
325 - if (result) {  
326 - _.forEach(result, function(data) {  
327 - if (data.template_name === 'recommend_content_five') {  
328 - // _.forEach(data.data.list, function(val) {  
329 - // var param = val.url.substring(val.url.indexOf('list?') + 5);  
330 -  
331 - // val.url = '//list.m.yohobuy.com/?' + param;  
332 - // });  
333 - category.list = data.data.list;  
334 - } else if (data.template_name === 'focus') {  
335 - // _.forEach(data.data, function(val) {  
336 -  
337 - // val.url = '//m.yohobuy.com/guang/cate-all';  
338 - // });  
339 -  
340 - category.focusData = data;  
341 - }  
342 - });  
343 - }  
344 -  
345 - list.categoryData = category;  
346 - return list;  
347 - });  
348 -};  
349 -  
350 -const getCateData = (channel, appType) => {  
351 - return api.get('', {  
352 - method: 'app.sort.get',  
353 - app_type: 1  
354 - }, {  
355 - cache: true  
356 - }).then((result) => {  
357 - if (!result.code || result.code !== 200 || !result.data) {  
358 - return [];  
359 - }  
360 -  
361 - // 统一频道名称  
362 - // result.data.boys = result.data.boy;  
363 - // result.data.girls = result.data.girl;  
364 - // _.unset(result.data, 'boy');  
365 - // _.unset(result.data, 'girl');  
366 -  
367 -  
368 - return result.data;  
369 - }).then((list) => {  
370 - return _processCateData(list, channel, appType);  
371 - });  
372 -};  
373 307
374 module.exports = { 308 module.exports = {
375 indexData, 309 indexData,
376 - brandListData,  
377 - categoryData,  
378 - getCateData 310 + brandListData
379 }; 311 };
@@ -63,9 +63,7 @@ router.get(/^\/rss(\/\w+)?(\/\w+)?/, rss.index); // 订阅资讯 @@ -63,9 +63,7 @@ router.get(/^\/rss(\/\w+)?(\/\w+)?/, rss.index); // 订阅资讯
63 router.get('/info/listData', index.listDynamicData); 63 router.get('/info/listData', index.listDynamicData);
64 router.get('/info/detailData', index.detailDynamicData); 64 router.get('/info/detailData', index.detailDynamicData);
65 65
66 -router.get('/brand', brand.index);  
67 -router.get('/brandList', brand.brandList);  
68 -router.get('/category', brand.categoryData);  
69 -router.get('/cate-all', brand.cateAll); 66 +router.get('/plusstar/cate', brand.index);
  67 +router.get('/plusstar/brandList', brand.brandList);
70 68
71 module.exports = router; 69 module.exports = router;
@@ -9,16 +9,8 @@ @@ -9,16 +9,8 @@
9 <li class="cate {{# categoryTab}}active{{/ categoryTab}}">鍝佺被</li> 9 <li class="cate {{# categoryTab}}active{{/ categoryTab}}">鍝佺被</li>
10 </ul> 10 </ul>
11 11
12 - <div class="channel-tab">  
13 - <ul class="brand-cha{{# categoryTab}} hide{{/ categoryTab}}">  
14 - {{#each channel}}  
15 - <li class='{{#if focus}} focus {{/if}}' data-code='{{code}}'>  
16 - <span>{{mame}}</span>  
17 - </li>  
18 - {{/each}}  
19 - </ul>  
20 -  
21 - <ul class="cate-cha{{#unless categoryTab}} hide{{/unless}}"> 12 + <div class="channel-tab{{# categoryTab}} hide{{/ categoryTab}}">
  13 + <ul class="brand-cha">
22 {{#each channel}} 14 {{#each channel}}
23 <li class='{{#if focus}} focus {{/if}}' data-code='{{code}}'> 15 <li class='{{#if focus}} focus {{/if}}' data-code='{{code}}'>
24 <span>{{mame}}</span> 16 <span>{{mame}}</span>
@@ -33,7 +25,7 @@ @@ -33,7 +25,7 @@
33 {{> brand/brand-list}} 25 {{> brand/brand-list}}
34 </div> 26 </div>
35 <div class="category-content content{{#unless categoryTab}} hide{{/ unless}}"> 27 <div class="category-content content{{#unless categoryTab}} hide{{/ unless}}">
36 - {{> brand/category}} 28 + {{> brand/cate-all}}
37 </div> 29 </div>
38 </div> 30 </div>
39 </div> 31 </div>
1 -{{# categoryData}}  
2 - <div class="resources">  
3 - <div class="recommend-content-five">  
4 - {{# list}}  
5 - <a href="{{url}}">  
6 - <img src="{{image src 375 375}}">  
7 - </a>  
8 - {{/ list}}  
9 - </div>  
10 -  
11 - <div class="focus-floor">  
12 - {{# focusData}}  
13 - {{> resources/banner-top}}  
14 - {{/ focusData}}  
15 - </div>  
16 - </div>  
17 -{{/ categoryData}}  
@@ -13,9 +13,6 @@ var $nav = $('.category-nav'), @@ -13,9 +13,6 @@ var $nav = $('.category-nav'),
13 $contents = $categoryContainer.children('.content'), 13 $contents = $categoryContainer.children('.content'),
14 $subLevelItem = $categoryContainer.find('.sub-level li'); 14 $subLevelItem = $categoryContainer.find('.sub-level li');
15 15
16 - // $primaryItem = $categoryContainer.find('.primary-level li');  
17 -  
18 -require('../common');  
19 16
20 $(function() { 17 $(function() {
21 FastClick.attach(document.body); 18 FastClick.attach(document.body);
@@ -92,23 +89,9 @@ $categoryContainer.on('click', function(e) { @@ -92,23 +89,9 @@ $categoryContainer.on('click', function(e) {
92 } 89 }
93 }); 90 });
94 91
95 -// $categoryContainer.find('.primary-level').on('touchstart touchend touchcancel', 'li', function() {  
96 -// $primaryItem.removeClass('highlight');  
97 -// $(this).addClass('highlight');  
98 -// }).on('touchend touchcancel', 'li', function() {  
99 -// $(this).removeClass('highlight');  
100 -// });  
101 -  
102 $categoryContainer.find('.sub-level').on('touchstart', 'li', function() { 92 $categoryContainer.find('.sub-level').on('touchstart', 'li', function() {
103 $subLevelItem.removeClass('highlight'); 93 $subLevelItem.removeClass('highlight');
104 $(this).addClass('highlight'); 94 $(this).addClass('highlight');
105 }).on('touchend touchcancel', 'li', function() { 95 }).on('touchend touchcancel', 'li', function() {
106 $(this).removeClass('highlight'); 96 $(this).removeClass('highlight');
107 }); 97 });
108 -  
109 -$nav.on('touchstart', 'li', function() {  
110 - $nav.find('li').removeClass('bytouch');  
111 - $(this).addClass('bytouch');  
112 -}).on('touchend touchcancel', 'li', function() {  
113 - $nav.find('li').removeClass('bytouch');  
114 -});  
@@ -2,13 +2,15 @@ var $ = require('yoho-jquery'), @@ -2,13 +2,15 @@ var $ = require('yoho-jquery'),
2 Swiper = require('yoho-swiper2'); 2 Swiper = require('yoho-swiper2');
3 3
4 var categoryHeight = $('.tab-box').height(), 4 var categoryHeight = $('.tab-box').height(),
5 - gender,  
6 - isBrand; 5 + gender;
7 6
8 var $intercept = $('.no-intercept'), 7 var $intercept = $('.no-intercept'),
9 $list = $('.brand-list-box'), 8 $list = $('.brand-list-box'),
10 $listBox = $('.list-box'); 9 $listBox = $('.list-box');
11 10
  11 +require('../common');
  12 +require('./brand-cate/cate-all');
  13 +
12 function channels(key) { 14 function channels(key) {
13 var channel = { 15 var channel = {
14 men: 1, 16 men: 1,
@@ -37,40 +39,28 @@ function initialize() { @@ -37,40 +39,28 @@ function initialize() {
37 }); 39 });
38 } 40 }
39 41
40 -function loadData(channel, isBrand) {  
41 - var preUrl;  
42 -  
43 - if (isBrand) {  
44 - preUrl = '/guang/brandList';  
45 - } else {  
46 - preUrl = '/guang/category';  
47 - } 42 +function loadData(channel) {
48 43
49 $.ajax({ 44 $.ajax({
50 method: 'get', 45 method: 'get',
51 - url: preUrl, 46 + url: '/guang/plusstar/brandList',
52 data: { 47 data: {
53 gender: channel 48 gender: channel
54 }, 49 },
55 success: function(data) { 50 success: function(data) {
56 - if (isBrand) {  
57 - $('.brand-content').html(data);  
58 - } else {  
59 - $('.category-content').html(data);  
60 - } 51 + $('.brand-content').html(data);
61 52
62 initialize(); 53 initialize();
63 } 54 }
64 }); 55 });
65 } 56 }
66 57
67 -$('.channel-tab').find('li').click(function() { 58 +$('.brand-cha').find('li').click(function() {
68 gender = $(this).find('span').text().replace(/[^A-Za-z]+/g, '').toLowerCase(); 59 gender = $(this).find('span').text().replace(/[^A-Za-z]+/g, '').toLowerCase();
69 - isBrand = $('.brand-tab').find('.brand').hasClass('active');  
70 60
71 $(this).addClass('focus').siblings().removeClass('focus'); 61 $(this).addClass('focus').siblings().removeClass('focus');
72 62
73 - loadData(channels(gender), isBrand); 63 + loadData(channels(gender));
74 }); 64 });
75 65
76 // 点击字母,页面滚动到相关区域 66 // 点击字母,页面滚动到相关区域
@@ -90,10 +80,11 @@ $('.brand-tab').find('li').click(function() { @@ -90,10 +80,11 @@ $('.brand-tab').find('li').click(function() {
90 80
91 if ($(this).hasClass('brand')) { 81 if ($(this).hasClass('brand')) {
92 $('.brand-content').removeClass('hide').siblings().addClass('hide'); 82 $('.brand-content').removeClass('hide').siblings().addClass('hide');
  83 + $('.channel-tab').removeClass('hide');
93 $('.brand-cha').removeClass('hide').siblings().addClass('hide'); 84 $('.brand-cha').removeClass('hide').siblings().addClass('hide');
94 } else { 85 } else {
95 $('.category-content').removeClass('hide').siblings().addClass('hide'); 86 $('.category-content').removeClass('hide').siblings().addClass('hide');
96 - $('.cate-cha').removeClass('hide').siblings().addClass('hide'); 87 + $('.channel-tab').addClass('hide');
97 } 88 }
98 89
99 initialize(); 90 initialize();
@@ -103,6 +94,32 @@ if ($listBox.find('li').length <= 0) { @@ -103,6 +94,32 @@ if ($listBox.find('li').length <= 0) {
103 $listBox.hide(); 94 $listBox.hide();
104 } 95 }
105 96
  97 +$(window).scroll(function() {
  98 + var totalHeight = $('#yoho-header').height() + $('.tab-box').height();
  99 +
  100 + if (!$('.brand-content').hasClass('hide')) {
  101 + if ($(this).scrollTop() >= $('#yoho-header').height()) {
  102 + $('.tab-box').addClass('fastening');
  103 + $('.content-index').addClass('distance');
  104 + $('.list-box').css('top', $('.tab-box').height());
  105 + } else {
  106 + $('.tab-box').removeClass('fastening');
  107 + $('.content-index').removeClass('distance');
  108 + $('.list-box').css('top', totalHeight - $(this).scrollTop());
  109 + }
  110 + } else {
  111 + if ($(this).scrollTop() >= $('#yoho-header').height()) {
  112 + $('.tab-box').addClass('fastening');
  113 + $('.category-nav').addClass('loca');
  114 + $('.blk-cate-all .content').addClass('living');
  115 + } else {
  116 + $('.tab-box').removeClass('fastening');
  117 + $('.category-nav').removeClass('loca');
  118 + $('.blk-cate-all .content').removeClass('living');
  119 + }
  120 + }
  121 +});
  122 +
106 $(function() { 123 $(function() {
107 $('.banner-swiper').each(function() { 124 $('.banner-swiper').each(function() {
108 if (!$(this).parents('.content').hasClass('hide') && $(this).hasClass('swiper-container-horizontal') === false && $(this).find('li').length > 1) { 125 if (!$(this).parents('.content').hasClass('hide') && $(this).hasClass('swiper-container-horizontal') === false && $(this).find('li').length > 1) {
@@ -2,8 +2,11 @@ @@ -2,8 +2,11 @@
2 font-size: 15PX; 2 font-size: 15PX;
3 3
4 .category-nav { 4 .category-nav {
5 - height: 70px; 5 + height: 80px;
6 border-bottom: 1px solid #e6e6e6; 6 border-bottom: 1px solid #e6e6e6;
  7 + width: 100%;
  8 + background: #fff;
  9 + z-index: 10;
7 10
8 li { 11 li {
9 display: block; 12 display: block;
@@ -33,13 +36,13 @@ @@ -33,13 +36,13 @@
33 width: 100%; 36 width: 100%;
34 height: 30px; 37 height: 30px;
35 line-height: 30px; 38 line-height: 30px;
36 - font-size: 15PX;  
37 - border-right: 1px solid #e6e6e6; 39 + font-size: 80%;
38 } 40 }
  41 + }
39 42
40 - li:last-child span {  
41 - border-right: 0;  
42 - } 43 + .loca {
  44 + position: fixed;
  45 + top: 88px;
43 } 46 }
44 47
45 .content { 48 .content {
@@ -51,6 +54,10 @@ @@ -51,6 +54,10 @@
51 } 54 }
52 } 55 }
53 56
  57 + .living {
  58 + margin-top: 160px;
  59 + }
  60 +
54 .primary-level { 61 .primary-level {
55 float: left; 62 float: left;
56 box-sizing: border-box; 63 box-sizing: border-box;
@@ -12,5 +12,4 @@ @@ -12,5 +12,4 @@
12 @import "info-list"; 12 @import "info-list";
13 @import "detail"; 13 @import "detail";
14 @import "star-classroom"; 14 @import "star-classroom";
15 -@import "brand";  
16 -@import "cate-all"; 15 +@import "brand-cate/index";
1 .brand-blk-page { 1 .brand-blk-page {
2 .tab-box { 2 .tab-box {
3 - position: fixed;  
4 top: 0; 3 top: 0;
5 z-index: 9; 4 z-index: 9;
6 width: 100%; 5 width: 100%;
7 } 6 }
8 7
  8 + .fastening {
  9 + position: fixed;
  10 + }
  11 +
  12 + .distance {
  13 + margin-top: 170px;
  14 + }
  15 +
9 .brand-tab { 16 .brand-tab {
10 max-width: inherit; 17 max-width: inherit;
11 height: 80px; 18 height: 80px;
@@ -63,7 +70,6 @@ @@ -63,7 +70,6 @@
63 } 70 }
64 71
65 .content-index { 72 .content-index {
66 - margin-top: 170px;  
67 73
68 .search { 74 .search {
69 width: 100%; 75 width: 100%;
@@ -190,7 +196,7 @@ @@ -190,7 +196,7 @@
190 right: 0; 196 right: 0;
191 background: #fff; 197 background: #fff;
192 opacity: 0.8; 198 opacity: 0.8;
193 - top: 170px; 199 + top: 270px;
194 overflow-y: auto; 200 overflow-y: auto;
195 z-index: 10; 201 z-index: 10;
196 202
@@ -250,7 +256,7 @@ @@ -250,7 +256,7 @@
250 display: none; 256 display: none;
251 } 257 }
252 258
253 - .category-content { 259 + /*.category-content {
254 .category-container { 260 .category-container {
255 margin-bottom: 100px; 261 margin-bottom: 100px;
256 } 262 }
@@ -327,15 +333,15 @@ @@ -327,15 +333,15 @@
327 color: #000; 333 color: #000;
328 } 334 }
329 } 335 }
330 - } 336 + }*/
331 337
332 .resources { 338 .resources {
333 .recommend-content-five { 339 .recommend-content-five {
334 margin-top: -1px; 340 margin-top: -1px;
335 width: 100%; 341 width: 100%;
  342 + overflow: hidden;
336 343
337 a { 344 a {
338 - height: 218px;  
339 width: 50%; 345 width: 50%;
340 outline: none; 346 outline: none;
341 color: #000; 347 color: #000;
  1 +.blk-cate-all {
  2 + font-size: 15PX;
  3 +
  4 + .category-nav {
  5 + height: 80px;
  6 + border-bottom: 1px solid #e6e6e6;
  7 + width: 100%;
  8 + background: #fff;
  9 + z-index: 10;
  10 +
  11 + li {
  12 + display: block;
  13 + box-sizing: border-box;
  14 + float: left;
  15 + height: 100%;
  16 + padding: 20px 0;
  17 + width: 50%;
  18 + text-align: center;
  19 + color: #999;
  20 +
  21 + &:last-child {
  22 + border-right: none;
  23 + }
  24 +
  25 + &.focus {
  26 + color: #000;
  27 + }
  28 +
  29 + &.bytouch {
  30 + background: #eee;
  31 + }
  32 + }
  33 +
  34 + span {
  35 + display: block;
  36 + width: 100%;
  37 + height: 30px;
  38 + line-height: 35px;
  39 + font-size: 90%;
  40 + }
  41 + }
  42 +
  43 + .loca {
  44 + position: fixed;
  45 + top: 88px;
  46 + }
  47 +
  48 + .content {
  49 + overflow: hidden;
  50 + position: relative;
  51 +
  52 + &.hide {
  53 + display: none;
  54 + }
  55 + }
  56 +
  57 + .living {
  58 + margin-top: 160px;
  59 + }
  60 +
  61 + .primary-level {
  62 + float: left;
  63 + box-sizing: border-box;
  64 + width: 45%;
  65 +
  66 + > li {
  67 + height: 89px;
  68 + line-height: 89px;
  69 + padding: 0 32px;
  70 + white-space: nowrap;
  71 + overflow: hidden;
  72 + text-overflow: ellipsis;
  73 + border-bottom: 1px solid #e6e6e6;
  74 +
  75 + &.focus {
  76 + background-color: #fff;
  77 + }
  78 +
  79 + &.highlight {
  80 + background-color: #eee;
  81 + }
  82 + }
  83 + }
  84 +
  85 + .trilanglefont {
  86 + font-family: "iconfont" !important;
  87 + font-size: 30px;
  88 + font-style: normal;
  89 + text-decoration: none;
  90 + -webkit-font-smoothing: antialiased;
  91 + -webkit-text-stroke-width: 0.2px;
  92 + -moz-osx-font-smoothing: grayscale;
  93 + color: #f4f4f4;
  94 + }
  95 +
  96 + .primary-level-trilangle {
  97 + float: right;
  98 + background-image: url(/product/arrow.png) no-repeat;
  99 + margin-top: 22px;
  100 + width: 20px;
  101 + height: 46px;
  102 + position: relative;
  103 + right: -32px;
  104 + }
  105 +
  106 + .sub-level-container {
  107 + float: left;
  108 + overflow-x: auto;
  109 + box-sizing: border-box;
  110 + background: #fff;
  111 + width: 55%;
  112 + height: 100%;
  113 + background: #f4f4f4;
  114 + }
  115 +
  116 + .sub-level {
  117 + width: 100%;
  118 + height: 100%;
  119 +
  120 + &.hide {
  121 + display: none;
  122 + }
  123 +
  124 + > li {
  125 + box-sizing: border-box;
  126 + height: 79px;
  127 + line-height: 79px;
  128 + border-bottom: 1px solid #e6e6e6;
  129 + padding-left: 20px;
  130 +
  131 + &.highlight {
  132 + background: #eee;
  133 + }
  134 +
  135 + &:last-child {
  136 + border-bottom: none;
  137 + }
  138 + }
  139 +
  140 + a {
  141 + display: block;
  142 + height: 100%;
  143 + width: 100%;
  144 + color: #afafaf;
  145 + }
  146 + }
  147 +}
  1 +@import "brand";
  2 +@import "cate-all";