Authored by 郭成尧

Merge branch 'release/5.7' of git.yoho.cn:fe/yohobuywap-node into release/5.7

@@ -223,7 +223,7 @@ const category = (req, res, next) => { @@ -223,7 +223,7 @@ const category = (req, res, next) => {
223 type: 'default', 223 type: 'default',
224 order: '0', 224 order: '0',
225 page: 1, 225 page: 1,
226 - limit: 12, 226 + limit: 24,
227 isApp: params.app_version 227 isApp: params.app_version
228 }, params); 228 }, params);
229 229
@@ -256,6 +256,10 @@ const shop = { @@ -256,6 +256,10 @@ const shop = {
256 shopId + '","shop_name":"' + shopInfo.shop_name + '"}}'; 256 shopId + '","shop_name":"' + shopInfo.shop_name + '"}}';
257 } 257 }
258 258
  259 + if (shopId) {
  260 + baseShop.shopId = shopId;
  261 + }
  262 +
259 res.render('newshop/shop-base', { 263 res.render('newshop/shop-base', {
260 module: 'product', 264 module: 'product',
261 page: 'shop.base', 265 page: 'shop.base',
@@ -45,7 +45,7 @@ const list = (req, res, next) => { @@ -45,7 +45,7 @@ const list = (req, res, next) => {
45 type: 'default', 45 type: 'default',
46 order: '0', 46 order: '0',
47 page: 1, 47 page: 1,
48 - limit: 12 48 + limit: 24
49 }, params); 49 }, params);
50 50
51 if (uid) { 51 if (uid) {
@@ -29,7 +29,8 @@ const typeCont = { @@ -29,7 +29,8 @@ const typeCont = {
29 new: ['s_t_desc', 's_t_asc'], 29 new: ['s_t_desc', 's_t_asc'],
30 stock: ['s_s_desc', 's_s_asc'], 30 stock: ['s_s_desc', 's_s_asc'],
31 all: ['d_s_desc', 'd_s_asc'], 31 all: ['d_s_desc', 'd_s_asc'],
32 - category: ['s_t_desc', 's_t_asc'] 32 + category: ['s_t_desc', 's_t_asc'],
  33 + popularity: ['h_v_desc', 'h_v_asc']
33 }; 34 };
34 35
35 const channelType = { 36 const channelType = {
@@ -241,7 +241,6 @@ const getSearchData = (params) => { @@ -241,7 +241,6 @@ const getSearchData = (params) => {
241 let newList = {}; 241 let newList = {};
242 let suggestion = {}; 242 let suggestion = {};
243 243
244 -  
245 if (result.data.shopList && result.data.shopList.length !== 0) { 244 if (result.data.shopList && result.data.shopList.length !== 0) {
246 newList.brandWay = _processBrandShops(result.data.shopList); 245 newList.brandWay = _processBrandShops(result.data.shopList);
247 } 246 }
@@ -250,6 +249,17 @@ const getSearchData = (params) => { @@ -250,6 +249,17 @@ const getSearchData = (params) => {
250 isApp: params.isApp || (params.appVersion && params.appVersion !== 'false'), 249 isApp: params.isApp || (params.appVersion && params.appVersion !== 'false'),
251 gender: _coverChannel[params.coverChannel] 250 gender: _coverChannel[params.coverChannel]
252 }); 251 });
  252 +
  253 + if (result.data.rec_shop_list && result.data.rec_shop_list.length > 0 &&
  254 + !params.shop_id && !params.brand) {
  255 +
  256 + for (let i = 0; i < result.data.rec_shop_list.length; i++) {
  257 + result.data.rec_shop_list[i].is_shop = true;
  258 + newList.list.splice(parseInt(result.data.rec_shop_list[i].insert_index, 10), 0,
  259 + result.data.rec_shop_list[i]);
  260 + }
  261 + }
  262 +
253 params.page = parseInt(params.page, 10); 263 params.page = parseInt(params.page, 10);
254 result.data.total = parseInt(result.data && result.data.total || 0, 10); 264 result.data.total = parseInt(result.data && result.data.total || 0, 10);
255 265
@@ -2,5 +2,5 @@ @@ -2,5 +2,5 @@
2 {{> search/search-word-content}} 2 {{> search/search-word-content}}
3 <div class="total" data-id="{{total}}"></div> 3 <div class="total" data-id="{{total}}"></div>
4 {{# new}} 4 {{# new}}
5 - {{> common/goods}} 5 + {{> product/recommend-goods}}
6 {{/ new}} 6 {{/ new}}
@@ -126,7 +126,7 @@ @@ -126,7 +126,7 @@
126 {{> search/search-word-content}} 126 {{> search/search-word-content}}
127 127
128 {{#@root.firstPageGoods.list}} 128 {{#@root.firstPageGoods.list}}
129 - {{> common/goods}} 129 + {{> product/recommend-goods}}
130 {{/@root.firstPageGoods.list}} 130 {{/@root.firstPageGoods.list}}
131 </div> 131 </div>
132 <div class="search-divide">正在加载...</div> 132 <div class="search-divide">正在加载...</div>
@@ -13,7 +13,6 @@ const isTest = process.env.NODE_ENV === 'test'; @@ -13,7 +13,6 @@ const isTest = process.env.NODE_ENV === 'test';
13 const domains = { 13 const domains = {
14 api: 'http://api-test3.yohops.com:9999/', 14 api: 'http://api-test3.yohops.com:9999/',
15 service: 'http://service-test3.yohops.com:9999/', 15 service: 'http://service-test3.yohops.com:9999/',
16 -  
17 singleApi: 'http://api-test3.yohops.com:9999/', 16 singleApi: 'http://api-test3.yohops.com:9999/',
18 global: 'http://global-test-soa.yohops.com:9999', 17 global: 'http://global-test-soa.yohops.com:9999',
19 liveApi: 'http://testapi.live.yohops.com:9999/', 18 liveApi: 'http://testapi.live.yohops.com:9999/',
1 <div class='list-nav-layer'> 1 <div class='list-nav-layer'>
2 <ul id="list-nav" class="list-nav filter-nav clearfix"> 2 <ul id="list-nav" class="list-nav filter-nav clearfix">
3 - <li class="default active first-li-more" {{#if firstOrderValue}}data-order="s_t_desc"{{/if}}> 3 + <li class="default active first-li-more">
4 <a href="javascript:void(0);"> 4 <a href="javascript:void(0);">
5 - <span class="span-test">{{#if firstOrderName}}{{firstOrderName}}{{else}}默认{{/if}}</span>  
6 - <span class="iconfont up cur hide">&#xe615;</span>  
7 - <span class="iconfont down cur">&#xe616;</span> 5 + <span class="span-test">默认</span>
  6 + <span class="iconfont drop">&#xe613;</span>
  7 + </a>
  8 + </li>
  9 + <li class="new" data-order="s_t_desc">
  10 + <a href="javascript:void(0);">
  11 + <span class="span-test">最新</span>
8 </a> 12 </a>
9 </li> 13 </li>
10 <li class="price"> 14 <li class="price">
@@ -33,5 +37,10 @@ @@ -33,5 +37,10 @@
33 </li> 37 </li>
34 </ul> 38 </ul>
35 <!--搜索默认排序列表--> 39 <!--搜索默认排序列表-->
36 - {{> product/search-default-sort-list}} 40 + <div class='new-list hide'>
  41 + <ul>
  42 + <li class='active default' data-bp-id='shop_listnav_default_1'>默认</li>
  43 + <li class='popularity' data-bp-id='shop_listnav_popularity_1'>人气</li>
  44 + </ul>
  45 +</div>
37 </div> 46 </div>
1 <div class="filter-tab"> 1 <div class="filter-tab">
2 <ul id="list-nav" class="list-nav clearfix"> 2 <ul id="list-nav" class="list-nav clearfix">
3 - <li class="default active buriedpoint" data-bp-id="shop_listnav_default_1"> 3 + <li class="default active buriedpoint first-li-more" data-bp-id="shop_listnav_default_1">
4 <a href="javascript:void(0);"> 4 <a href="javascript:void(0);">
5 <span class="nav-txt">默认</span> 5 <span class="nav-txt">默认</span>
  6 + {{#unless shopId}}
  7 + <span class="iconfont drop">&#xe613;</span>
  8 + {{/unless}}
6 </a> 9 </a>
7 </li> 10 </li>
8 <li class="new buriedpoint" data-bp-id="shop_listnav_new_1"> 11 <li class="new buriedpoint" data-bp-id="shop_listnav_new_1">
@@ -35,4 +38,15 @@ @@ -35,4 +38,15 @@
35 </a> 38 </a>
36 </li> 39 </li>
37 </ul> 40 </ul>
  41 +
  42 + <ul class="drop-list hide">
  43 + <li class="default active" data-bp-id="shop_listnav_default_1">
  44 + <span>默认</span>
  45 + <span class="chose"></span>
  46 + </li>
  47 + <li class="popularity" data-bp-id="shop_listnav_popularity_1">
  48 + <span>人气</span>
  49 + <span class="chose"></span>
  50 + </li>
  51 + </ul>
38 </div> 52 </div>
  1 +{{#if this}} {{!-- 剔除值为false的项 --}}
  2 + {{#if is_shop}}
  3 + <div class="good-info brand-info" data-type="hot-shop" data-brand="" data-shop="">
  4 + <div class="brand-info-box">
  5 + <img src="{{image shop_logo 240 85}}" alt="LALABOBO">
  6 + <h5 class="bname">{{shop_name}}</h5>
  7 + <p class="summary">
  8 + <span class="summary-info">
  9 + <b>{{new_product_num}}</b>
  10 + <b>上新</b>
  11 + </span>
  12 + <span class="summary-info">
  13 + <b>{{favorite_num}}</b>
  14 + <b>收藏</b>
  15 + </span>
  16 + </p>
  17 + <a href="//m.yohobuy.com/product/index/brand?domain={{shop_domain}}" class="entry">进入店铺<span></span></a>
  18 + </div>
  19 + </div>
  20 + {{else}}
  21 + <div class="good-info {{#if @root.sale_vip_login}}sale-vip{{/if}}" data-good-id="{{product_id}}"
  22 + data-id="{{product_skn}}" data-bp-id="guang_goodList_{{product_name}}_false">
  23 + <div class="tag-container clearfix">
  24 + {{# tags}}
  25 + {{# is_new}}
  26 + <p class="good-tag new-tag">NEW</p>
  27 + {{/ is_new}}
  28 + {{# is_hot}}
  29 + <p class="good-tag hot-tag">HOT</p>
  30 + {{/ is_hot}}
  31 + {{# is_advance}}
  32 + <p class="good-tag renew-tag">再到着</p>
  33 + {{/ is_advance}}
  34 + {{# is_discount}}
  35 + <p class="good-tag sale-tag">SALE</p>
  36 + {{/ is_discount}}
  37 + {{# is_yohood}}
  38 + <p class="good-tag new-festival-tag">新品节</p>
  39 + {{/ is_yohood}}
  40 + {{# is_limited}}
  41 + <p class="good-tag limit-tag">限量</p>
  42 + {{/ is_limited}}
  43 + {{# is_presell}}
  44 + <p class="good-tag is-presell">预售</p>
  45 + {{/ is_presell}}
  46 + {{# is_global}}
  47 + <p class="good-tag is-global">
  48 + <span>{{../tbl_country_name}}</span>
  49 + </p>
  50 + {{/ is_global}}
  51 + {{/ tags}}
  52 + </div>
  53 + <div class="good-detail-img">
  54 + <a class="good-thumb" href="{{url}}">
  55 + {{#if @root._noLazy}}
  56 + <img src="{{image2 default_images w=235 h=314 q=60}}"/>
  57 + {{else}}
  58 + <img class="lazy" data-original="{{image2 default_images w=235 h=314 q=60}}"/>
  59 + {{/if}}
  60 + </a>
  61 + {{# is_soon_sold_out}}
  62 + <p class="few-tag">即将售罄</p>
  63 + {{/ is_soon_sold_out}}
  64 +
  65 + {{# is_solded}}
  66 + <p class="out-tag">已售罄</p>
  67 + {{/ is_solded}}
  68 +
  69 + {{!-- {{# noStorage}}
  70 + <div class="no-storage">
  71 + <div class="no-storage-img"></div>
  72 + </div>
  73 + {{/ noStorage}} --}}
  74 + </div>
  75 + <div class="good-detail-text">
  76 + <div class="name">
  77 + <a href="{{url}}">{{product_name}}</a>
  78 + </div>
  79 + <div class="price">
  80 + {{#if @root.saleViplogin}}
  81 + <i class="vip-grade vip-grade-{{@root.vipLevel}}"></i>
  82 + <span class="sale-price {{^market_price}}no-price{{/market_price}}">¥
  83 + {{#if @root.vipPrice1}}{{round vip1_price}}{{/if}}
  84 + {{#if @root.vipPrice2}}{{round vip2_price}}{{/if}}
  85 + {{#if @root.vipPrice3}}{{round vip3_price}}{{/if}}
  86 + </span>
  87 + {{else}}
  88 + <span class="sale-price {{^market_price}}no-price{{/market_price}}">¥{{round sales_price}}</span>
  89 + {{/if}}
  90 + {{#market_price}}
  91 + <span class="market-price">¥{{round .}}</span>
  92 + {{/market_price}}
  93 + </div>
  94 + {{#if @root.saleVip}}
  95 + <div class="vip-info">
  96 + <i class="vip-icon"></i>更优惠
  97 + </div>
  98 + {{/if}}
  99 + </div>
  100 + </div>
  101 + {{/if}}
  102 +{{/if}}
@@ -266,22 +266,25 @@ let searchView = function() { @@ -266,22 +266,25 @@ let searchView = function() {
266 $navBox.on('click', 'li', function(event) { 266 $navBox.on('click', 'li', function(event) {
267 let $curNav = $(event.currentTarget); 267 let $curNav = $(event.currentTarget);
268 268
269 - // 处理新添加的默认,最新排序  
270 - // if ($curNav.hasClass('first-li-more')) {  
271 - // filter.hideFilter();  
272 -  
273 - // if ($newList.hasClass('hide')) {  
274 - // $curNav.find('.up').removeClass('hide');  
275 - // $curNav.find('.down').addClass('hide');  
276 - // $newList.removeClass('hide');  
277 - // } else {  
278 - // $curNav.find('.up').addClass('hide');  
279 - // $curNav.find('.down').removeClass('hide');  
280 - // $newList.addClass('hide');  
281 - // }  
282 - // switchNav($curNav);  
283 - // return;  
284 - // } 269 + // 处理新添加的默认,人气排序
  270 + if ($curNav.hasClass('first-li-more')) {
  271 + filter.hideFilter();
  272 +
  273 + if ($newList.hasClass('hide')) {
  274 + // $curNav.find('.up').removeClass('hide');
  275 + // $curNav.find('.down').addClass('hide');
  276 +
  277 + $newList.removeClass('hide');
  278 + } else {
  279 + // $curNav.find('.up').addClass('hide');
  280 + // $curNav.find('.down').removeClass('hide');
  281 +
  282 + $newList.addClass('hide');
  283 + }
  284 +
  285 + switchNav($curNav);
  286 + return;
  287 + }
285 288
286 $newList.addClass('hide'); 289 $newList.addClass('hide');
287 290
@@ -298,35 +301,36 @@ let searchView = function() { @@ -298,35 +301,36 @@ let searchView = function() {
298 }); 301 });
299 }); 302 });
300 303
301 - // 单独处理默认、最新排序条件  
302 - // $newList.on('click', 'li', function(event) {  
303 - // let $defaultCurNav = $(event.currentTarget);  
304 - // let $firstMore = $('.first-li-more');  
305 -  
306 - // $newList.addClass('hide');  
307 - // $firstMore.find('.up').addClass('hide');  
308 - // $firstMore.find('.down').removeClass('hide');  
309 -  
310 - // if ($defaultCurNav.hasClass('new')) {  
311 - // $firstMore.attr('data-order', 's_t_desc').find('.span-test').text('最新');  
312 - // $defaultCurNav.addClass('active');  
313 - // $newList.find('.default').removeClass('active');  
314 - // } else {  
315 - // $firstMore.attr('data-order', '').find('.span-test').text('默认');  
316 - // $defaultCurNav.addClass('active');  
317 - // $newList.find('.new').removeClass('active');  
318 - // }  
319 -  
320 - // checkOrderChange($firstMore, function() {  
321 - // fetchNew({ // eslint-disable-line  
322 - // $box: $goodBox,  
323 - // before: $box => {  
324 - // fetchXhr.abort();  
325 - // $box.html('');  
326 - // }  
327 - // });  
328 - // });  
329 - // }); 304 + // 单独处理默认、人气排序条件
  305 + $newList.on('click', 'li', function(event) {
  306 + let $defaultCurNav = $(event.currentTarget);
  307 + let $firstMore = $('.first-li-more');
  308 +
  309 + $newList.addClass('hide');
  310 +
  311 + // $firstMore.find('.up').addClass('hide');
  312 + // $firstMore.find('.down').removeClass('hide');
  313 +
  314 + if ($defaultCurNav.hasClass('popularity')) {
  315 + $firstMore.attr('data-order', 'h_v_desc').find('.span-test').text('人气');
  316 + $defaultCurNav.addClass('active');
  317 + $newList.find('.default').removeClass('active');
  318 + } else {
  319 + $firstMore.attr('data-order', '').find('.span-test').text('默认');
  320 + $defaultCurNav.addClass('active');
  321 + $newList.find('.popularity').removeClass('active');
  322 + }
  323 +
  324 + checkOrderChange($firstMore, function() {
  325 + fetchNew({ // eslint-disable-line
  326 + $box: $goodBox,
  327 + before: $box => {
  328 + fetchXhr.abort();
  329 + $box.html('');
  330 + }
  331 + });
  332 + });
  333 + });
330 334
331 }); 335 });
332 336
@@ -74,9 +74,9 @@ $(function() { @@ -74,9 +74,9 @@ $(function() {
74 } 74 }
75 }); 75 });
76 76
77 - $saleNavWrap.css({  
78 - height: $saleNavWrap.height()  
79 - }); 77 + // $saleNavWrap.css({
  78 + // height: $('.list-nav').height()
  79 + // });
80 80
81 $(window).on('scroll', function() { 81 $(window).on('scroll', function() {
82 if (!$filterMask.length) { 82 if (!$filterMask.length) {
@@ -73,6 +73,12 @@ let $listNav = $('#list-nav'), @@ -73,6 +73,12 @@ let $listNav = $('#list-nav'),
73 reload: true, 73 reload: true,
74 page: 0, 74 page: 0,
75 end: false 75 end: false
  76 + },
  77 + popularity: {
  78 + order: 0,
  79 + reload: true,
  80 + page: 0,
  81 + end: false
76 } 82 }
77 }, 83 },
78 $pre = $listNav.find('.active'), // 纪录进入筛选前的active项,初始为选中项 84 $pre = $listNav.find('.active'), // 纪录进入筛选前的active项,初始为选中项
@@ -126,6 +132,8 @@ function judgeType(dom) { @@ -126,6 +132,8 @@ function judgeType(dom) {
126 navType = 'category'; 132 navType = 'category';
127 } else if (dom.hasClass('default')) { 133 } else if (dom.hasClass('default')) {
128 navType = 'default'; 134 navType = 'default';
  135 + } else if (dom.hasClass('popularity')) {
  136 + navType = 'popularity';
129 } 137 }
130 138
131 return navType; 139 return navType;
@@ -383,6 +391,76 @@ $listNav.bind('contextmenu', function() { @@ -383,6 +391,76 @@ $listNav.bind('contextmenu', function() {
383 return false; 391 return false;
384 }); 392 });
385 393
  394 +
  395 +$('.drop-list').on('touchend', 'li', function(e) {
  396 + let navType,
  397 + nav,
  398 + bpIdData = $(this).attr('data-bp-id') || '',
  399 + $firstLiDom = $listNav.find('li.first-li-more');
  400 +
  401 + e.preventDefault();
  402 +
  403 + if ($(this).hasClass('default')) {
  404 + navType = 'default';
  405 + } else {
  406 + navType = 'popularity';
  407 + }
  408 +
  409 + $(this).addClass('active').siblings().removeClass('active');
  410 + $firstLiDom.find('.nav-txt').text($(this).find('span').eq(0).text());
  411 + $firstLiDom.attr('data-bp-id', bpIdData).addClass('active').siblings().removeClass('active');
  412 + $listNav.find('.first-li-more').removeClass('new default sale').addClass(navType);
  413 +
  414 + nav = navInfo[navType];
  415 +
  416 + // $defaultgc.removeClass('hide');
  417 + // $fsgc.removeClass('hide');
  418 +
  419 + $defaultgc.removeClass('hide');
  420 +
  421 + $goodsContainer.children('.container:not(.hide)').addClass('hide');
  422 +
  423 + switch (navType) {
  424 + case 'new':
  425 + $ngc.removeClass('hide');
  426 + break;
  427 +
  428 + case 'price':
  429 + $pgc.removeClass('hide');
  430 + break;
  431 +
  432 + case 'discount':
  433 + $dgc.removeClass('hide');
  434 + break;
  435 +
  436 + case 'sale':
  437 + $sgc.removeClass('hide');
  438 + break;
  439 +
  440 + case 'all':
  441 + $agc.removeClass('hide');
  442 + break;
  443 +
  444 + case 'default':
  445 + $defaultgc.removeClass('hide');
  446 + break;
  447 + case 'popularity':
  448 + $defaultgc.removeClass('hide');
  449 + break;
  450 + default:
  451 + break;
  452 + }
  453 +
  454 + $pre = $firstLiDom;
  455 +
  456 + if (nav.reload) {
  457 + $(document).trigger('shouldSendBpData', [bpIdData]);
  458 + search({filtering: true});
  459 + }
  460 +
  461 + $('.drop-list').addClass('hide');
  462 +});
  463 +
386 $listNav.on('touchend touchcancel', function(e) { 464 $listNav.on('touchend touchcancel', function(e) {
387 let $this = $(e.target).closest('li'), 465 let $this = $(e.target).closest('li'),
388 nav, 466 nav,
@@ -395,6 +473,14 @@ $listNav.on('touchend touchcancel', function(e) { @@ -395,6 +473,14 @@ $listNav.on('touchend touchcancel', function(e) {
395 return; 473 return;
396 } 474 }
397 475
  476 + if ($this.hasClass('first-li-more')) {
  477 + $('.drop-list').toggleClass('hide');
  478 +
  479 + $this.addClass('active').siblings().removeClass('active');
  480 +
  481 + return true;
  482 + }
  483 +
398 if ($this.hasClass('filter')) { 484 if ($this.hasClass('filter')) {
399 485
400 // 筛选面板切换状态 486 // 筛选面板切换状态
@@ -82,6 +82,12 @@ let $listNav = $('#list-nav'), @@ -82,6 +82,12 @@ let $listNav = $('#list-nav'),
82 reload: true, 82 reload: true,
83 page: 0, 83 page: 0,
84 end: false 84 end: false
  85 + },
  86 + popularity: {
  87 + order: 0,
  88 + reload: true,
  89 + page: 0,
  90 + end: false
85 } 91 }
86 }, 92 },
87 $pre = $listNav.find('.active'), // 纪录进入筛选前的active项,初始为选中项 93 $pre = $listNav.find('.active'), // 纪录进入筛选前的active项,初始为选中项
@@ -404,6 +410,8 @@ function search(opt) { @@ -404,6 +410,8 @@ function search(opt) {
404 navType = 'default'; 410 navType = 'default';
405 } else if ($pre.hasClass('sale')) { 411 } else if ($pre.hasClass('sale')) {
406 navType = 'sale'; 412 navType = 'sale';
  413 + } else if ($pre.hasClass('popularity')) {
  414 + navType = 'popularity';
407 } 415 }
408 416
409 nav = navInfo[navType]; 417 nav = navInfo[navType];
@@ -578,6 +586,9 @@ function search(opt) { @@ -578,6 +586,9 @@ function search(opt) {
578 case 'default': 586 case 'default':
579 $container = $defaultgc; 587 $container = $defaultgc;
580 break; 588 break;
  589 + case 'popularity':
  590 + $container = $defaultgc;
  591 + break;
581 case 'sale': 592 case 'sale':
582 $container = $sgc; 593 $container = $sgc;
583 break; 594 break;
@@ -911,6 +922,72 @@ $listNav.bind('contextmenu', function() { @@ -911,6 +922,72 @@ $listNav.bind('contextmenu', function() {
911 return false; 922 return false;
912 }); 923 });
913 924
  925 +$('.drop-list').on('touchend', 'li', function(e) {
  926 + let navType,
  927 + nav,
  928 + bpIdData = $(this).attr('data-bp-id') || '',
  929 + $firstLiDom = $listNav.find('li.first-li-more');
  930 +
  931 + e.preventDefault();
  932 +
  933 + if ($(this).hasClass('default')) {
  934 + navType = 'default';
  935 + } else {
  936 + navType = 'popularity';
  937 + }
  938 +
  939 + $(this).addClass('active').siblings().removeClass('active');
  940 + $firstLiDom.find('.nav-txt').text($(this).find('span').eq(0).text());
  941 + $firstLiDom.attr('data-bp-id', bpIdData).addClass('active').siblings().removeClass('active');
  942 + $listNav.find('.first-li-more').removeClass('new default sale').addClass(navType);
  943 +
  944 + nav = navInfo[navType];
  945 +
  946 + $defaultgc.removeClass('hide');
  947 + $fsgc.removeClass('hide');
  948 +
  949 + $goodsContainer.children('.container:not(.hide)').addClass('hide');
  950 +
  951 + switch (navType) {
  952 + case 'new':
  953 + $ngc.removeClass('hide');
  954 + break;
  955 +
  956 + case 'price':
  957 + $pgc.removeClass('hide');
  958 + break;
  959 +
  960 + case 'discount':
  961 + $dgc.removeClass('hide');
  962 + break;
  963 +
  964 + case 'default':
  965 + $defaultgc.removeClass('hide');
  966 + $fsgc.removeClass('hide');
  967 + break;
  968 +
  969 + case 'popularity':
  970 + $defaultgc.removeClass('hide');
  971 + $fsgc.removeClass('hide');
  972 + break;
  973 +
  974 + case 'sale':
  975 + $sgc.removeClass('hide');
  976 + break;
  977 + default:
  978 + break;
  979 + }
  980 +
  981 + $pre = $firstLiDom;
  982 +
  983 + if (nav.reload) {
  984 + $(document).trigger('shouldSendBpData', [bpIdData]);
  985 + search({filtering: true});
  986 + }
  987 +
  988 + $('.drop-list').addClass('hide');
  989 +});
  990 +
914 $listNav.on('touchend touchcancel', function(e) { 991 $listNav.on('touchend touchcancel', function(e) {
915 let $this = $(e.target).closest('li'), 992 let $this = $(e.target).closest('li'),
916 nav, 993 nav,
@@ -918,6 +995,14 @@ $listNav.on('touchend touchcancel', function(e) { @@ -918,6 +995,14 @@ $listNav.on('touchend touchcancel', function(e) {
918 $active; 995 $active;
919 let bpIdData = $(this).find('.buriedpoint').attr('data-bp-id') || ''; 996 let bpIdData = $(this).find('.buriedpoint').attr('data-bp-id') || '';
920 997
  998 + if ($this.hasClass('first-li-more')) {
  999 + $('.drop-list').toggleClass('hide');
  1000 +
  1001 + $this.addClass('active').siblings().removeClass('active');
  1002 +
  1003 + return true;
  1004 + }
  1005 +
921 if ($this.hasClass('filter')) { 1006 if ($this.hasClass('filter')) {
922 1007
923 // 筛选面板切换状态 1008 // 筛选面板切换状态
@@ -36,6 +36,10 @@ @@ -36,6 +36,10 @@
36 &.cur { 36 &.cur {
37 color: #000; 37 color: #000;
38 } 38 }
  39 +
  40 + &.drop {
  41 + color: #000;
  42 + }
39 } 43 }
40 44
41 .filter .iconfont { 45 .filter .iconfont {
@@ -25,6 +25,48 @@ body { @@ -25,6 +25,48 @@ body {
25 width: 100%; 25 width: 100%;
26 } 26 }
27 27
  28 +.list-nav {
  29 + li {
  30 + width: 20%;
  31 + }
  32 +}
  33 +
  34 +.drop-list {
  35 + padding-left: 30px;
  36 + position: absolute;
  37 + z-index: 10;
  38 + background: #fff;
  39 + width: 100%;
  40 +
  41 + li {
  42 + width: 100%;
  43 + height: 88px;
  44 + font-size: 28px;
  45 + color: #b0b0b0;
  46 + line-height: 88px;
  47 + border-bottom: 1px solid #e0e0e0;
  48 + }
  49 +
  50 + li:last-child {
  51 + border-bottom: none;
  52 + }
  53 +
  54 + .active {
  55 + color: #444;
  56 +
  57 + .chose {
  58 + display: inline-block;
  59 + width: 30px;
  60 + height: 22px;
  61 + background-image: resolve("product/chose.png");
  62 + background-size: 100%;
  63 + float: right;
  64 + margin-top: 33px;
  65 + margin-right: 30px;
  66 + }
  67 + }
  68 +}
  69 +
28 .new-list { 70 .new-list {
29 width: 100%; 71 width: 100%;
30 background-color: #fff; 72 background-color: #fff;
@@ -137,6 +179,10 @@ body { @@ -137,6 +179,10 @@ body {
137 color: inherit; 179 color: inherit;
138 } 180 }
139 181
  182 +.filter-nav .iconfont.drop {
  183 + color: inherit;
  184 +}
  185 +
140 .banner-top { 186 .banner-top {
141 border-bottom: 1PX solid #dededf; 187 border-bottom: 1PX solid #dededf;
142 margin-bottom: 30px; 188 margin-bottom: 30px;
@@ -149,9 +195,3 @@ body { @@ -149,9 +195,3 @@ body {
149 .brand-news-count h5 { 195 .brand-news-count h5 {
150 display: none; 196 display: none;
151 } 197 }
152 -  
153 -.first-li-more {  
154 - .iconfont {  
155 - display: none;  
156 - }  
157 -}  
@@ -40,6 +40,10 @@ @@ -40,6 +40,10 @@
40 &.cur { 40 &.cur {
41 color: #000; 41 color: #000;
42 } 42 }
  43 +
  44 + &.drop {
  45 + color: #000;
  46 + }
43 } 47 }
44 } 48 }
45 49
@@ -74,6 +78,46 @@ @@ -74,6 +78,46 @@
74 top: -8px; 78 top: -8px;
75 } 79 }
76 } 80 }
  81 +
  82 + .drop {
  83 + font-size: 12PX;
  84 + }
  85 + }
  86 +
  87 + .drop-list {
  88 + padding-left: 30px;
  89 + position: absolute;
  90 + z-index: 10;
  91 + background: #fff;
  92 + width: 100%;
  93 +
  94 + li {
  95 + width: 100%;
  96 + height: 88px;
  97 + font-size: 28px;
  98 + color: #b0b0b0;
  99 + line-height: 88px;
  100 + border-bottom: 1px solid #e0e0e0;
  101 + }
  102 +
  103 + li:last-child {
  104 + border-bottom: none;
  105 + }
  106 +
  107 + .active {
  108 + color: #444;
  109 +
  110 + .chose {
  111 + display: inline-block;
  112 + width: 30px;
  113 + height: 22px;
  114 + background-image: resolve("product/chose.png");
  115 + background-size: 100%;
  116 + float: right;
  117 + margin-top: 33px;
  118 + margin-right: 30px;
  119 + }
  120 + }
77 } 121 }
78 122
79 .no-result { 123 .no-result {
@@ -263,6 +263,7 @@ @@ -263,6 +263,7 @@
263 .list-nav { 263 .list-nav {
264 border-top: 2px solid #fff; 264 border-top: 2px solid #fff;
265 border-bottom: 1px solid #e6e6e6; 265 border-bottom: 1px solid #e6e6e6;
  266 + position: relative;
266 267
267 > li { 268 > li {
268 float: left; 269 float: left;
@@ -300,6 +301,10 @@ @@ -300,6 +301,10 @@
300 &.cur { 301 &.cur {
301 color: #000; 302 color: #000;
302 } 303 }
  304 +
  305 + &.drop {
  306 + color: #000;
  307 + }
303 } 308 }
304 } 309 }
305 310
@@ -335,6 +340,46 @@ @@ -335,6 +340,46 @@
335 top: -4PX; 340 top: -4PX;
336 } 341 }
337 } 342 }
  343 +
  344 + .drop {
  345 + font-size: 12PX;
  346 + }
  347 + }
  348 +
  349 + .drop-list {
  350 + padding-left: 30px;
  351 + position: absolute;
  352 + z-index: 10;
  353 + background: #fff;
  354 + width: 100%;
  355 +
  356 + li {
  357 + width: 100%;
  358 + height: 88px;
  359 + font-size: 28px;
  360 + color: #b0b0b0;
  361 + line-height: 88px;
  362 + border-bottom: 1px solid #e0e0e0;
  363 + }
  364 +
  365 + li:last-child {
  366 + border-bottom: none;
  367 + }
  368 +
  369 + .active {
  370 + color: #444;
  371 +
  372 + .chose {
  373 + display: inline-block;
  374 + width: 30px;
  375 + height: 22px;
  376 + background-image: resolve("product/chose.png");
  377 + background-size: 100%;
  378 + float: right;
  379 + margin-top: 33px;
  380 + margin-right: 30px;
  381 + }
  382 + }
338 } 383 }
339 384
340 .no-result { 385 .no-result {
@@ -350,6 +395,74 @@ @@ -350,6 +395,74 @@
350 min-height: auto !important; 395 min-height: auto !important;
351 padding-left: 0.375rem; 396 padding-left: 0.375rem;
352 padding-top: 0.2rem; 397 padding-top: 0.2rem;
  398 +
  399 + .brand-info {
  400 + padding-top: 28px;
  401 + text-align: center;
  402 +
  403 + .brand-info-box {
  404 + padding-top: 72px;
  405 + height: 478px;
  406 + overflow: hidden;
  407 + border: 2px solid #e0e0e0;
  408 + }
  409 +
  410 + img {
  411 + width: 240px;
  412 + height: 100px;
  413 + }
  414 +
  415 + .bname {
  416 + font-size: 24px;
  417 + color: #444;
  418 + margin-top: 40px;
  419 + margin-bottom: 58px;
  420 + }
  421 +
  422 + .summary {
  423 + font-size: 30px;
  424 + color: #444;
  425 + }
  426 +
  427 + .summary-info {
  428 + width: 48%;
  429 + display: inline-block;
  430 + text-align: center;
  431 +
  432 + b {
  433 + display: block;
  434 + width: 100%;
  435 + }
  436 +
  437 + b:nth-child(2) {
  438 + color: #b0b0b0;
  439 + font-size: 22px;
  440 + }
  441 + }
  442 +
  443 + .entry {
  444 + display: flex;
  445 + align-items: center;
  446 + justify-content: center;
  447 + height: 60px;
  448 + font-size: 24px;
  449 + margin: 0 20px;
  450 + line-height: 60px;
  451 + color: #fff;
  452 + background-color: #d0021b;
  453 + width: 85%;
  454 + margin-top: 18px;
  455 +
  456 + span {
  457 + background-image: resolve("product/shop-entry.png");
  458 + display: inline-block;
  459 + width: 14px;
  460 + height: 20px;
  461 + background-size: 100%;
  462 + margin-left: 10px;
  463 + }
  464 + }
  465 + }
353 } 466 }
354 467
355 .new-list { 468 .new-list {
@@ -59,6 +59,8 @@ const getTypeCont = (type, order) => { @@ -59,6 +59,8 @@ const getTypeCont = (type, order) => {
59 return order === '0' ? 's_t_desc' : 's_t_asc'; 59 return order === '0' ? 's_t_desc' : 's_t_asc';
60 case 'hot': 60 case 'hot':
61 return order === '0' ? 's_n_desc' : 's_n_asc'; 61 return order === '0' ? 's_n_desc' : 's_n_asc';
  62 + case 'popularity':
  63 + return order === '0' ? 'h_v_desc' : 'h_v_asc';
62 default: 64 default:
63 return order === '0' ? 's_t_desc' : 's_t_asc'; 65 return order === '0' ? 's_t_desc' : 's_t_asc';
64 } 66 }