Authored by 周少峰

Merge branch 'release/5.4' into gray

... ... @@ -197,21 +197,6 @@ const index = (req) => {
Object.assign(respData, searchHandler.handlePathNavData({}, {}, 'new', channel));
if (result[1].code === 200 && result[1].data) {
let shopsData = _.get(result, '[1].data.shop_list', []),
dataList = [];
_.forEach(shopsData, shop => {
dataList.push({
url: helpers.urlFormat('', {shopId: shop.shops_id}, shop.shop_domain),
src: shop.shop_logo,
num: shop.new_product_num,
shopId: shop.shops_id,
brandId: shop.brand_id
});
});
// 为您推荐
Object.assign(respData.recommond.dataList, dataList);
_.forEach(_.get(result, '[1].data.ads', []), ads => {
// banner
... ... @@ -229,6 +214,34 @@ const index = (req) => {
// 新品牌入驻
if (result[2].code === 200 && result[2].data) {
let hotBrandsData = _.get(result, '[2].data.hot_brand_list', []),
browseBrandsData = _.get(result, '[2].data.browse_brand_list', []),
recList = [];
_.forEach(hotBrandsData, hotBrand => {
recList.push({
url: helpers.urlFormat('', {shopId: hotBrand.shops_id}, hotBrand.shop_domain),
src: hotBrand.shop_logo,
num: hotBrand.new_product_num,
shopId: hotBrand.shops_id,
brandId: hotBrand.brand_id
});
});
_.forEach(browseBrandsData, browseBrand => {
recList.push({
url: helpers.urlFormat('', {shopId: browseBrand.shops_id}, browseBrand.shop_domain),
src: browseBrand.shop_logo,
num: browseBrand.new_product_num,
shopId: browseBrand.shops_id,
brandId: browseBrand.brand_id
});
});
// 为您推荐
Object.assign(respData.recommond.dataList, recList);
let brandsData = _.get(result, '[2].data.new_brand_list', []),
brandList = [];
... ...
... ... @@ -91,15 +91,17 @@
{{#newProduct}}
<div id="new-product-floor" class="newProduct-floor">
{{> common/floor-header}}
<div class="all-catagory fixed-area clearfix">
<div class="catagory-text">推荐品类</div>
<ul class="catagory-navs clearfix">
{{#ctyList}}
<li {{#if active}} class="active" {{/if}} data-cateId="{{cateId}}">
<a href="{{url}}">{{name}}</a>
</li>
{{/ctyList}}
</ul>
<div style="height:28px;" id="catagory-wrap">
<div class="all-catagory fixed-area clearfix">
<div class="catagory-text">推荐品类</div>
<ul class="catagory-navs clearfix">
{{#ctyList}}
<li {{#if active}} class="active" {{/if}} data-cateId="{{cateId}}">
<a href="{{url}}">{{name}}</a>
</li>
{{/ctyList}}
</ul>
</div>
</div>
<div id="pjax-container" class="new-arrive-list clearfix">
{{> list/new-arrive-list}}
... ...
... ... @@ -15,7 +15,7 @@
<div class="good-info imgopacity" data-skn="{{proSkn}}">
<div class="good-detail-img">
<a class="good-thumb" href="{{url}}" target="_blank">
<img class="lazy" data-original="{{image2 src w=222 h=300}}" style="display: block; opacity: 1;">
<img class="lazy" data-original="{{image2 src w=222 h=298}}" style="display: block; opacity: 1;">
</a>
</div>
<div class="good-detail-text">
... ...

19.3 KB | W: | H:

19.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -23,13 +23,10 @@ var problemBox = function() {
$problemBox.find('.a-area').html(ask);
$problemBox.find('.q-area').html(answer);
$problemBox.show();
$('body').css({overflow: 'hidden'});
});
$('.problem-box .close, .problem-box .mark').on('click', function() {
$problemBox.hide();
$('body').css({overflow: 'auto'});
});
};
... ...
... ... @@ -64,12 +64,9 @@ if (keywords) {
});
}
if (!$cate.hasClass('big-category')) {
parentID = $cate.data('parentId');
$('.parentId-' + parentID).show();
$('.cateId-' + parentID).find('.icon').removeClass('plus').addClass('minus');
}
$('.center-content').css('border-top-color', '#fff');
... ...
... ... @@ -9,7 +9,6 @@ var yas = require('../common/data-yas');
var $arriveList = $('.new-arrive-list');
var $goodInfo = $arriveList.find('.good-info');
var $fixedArea = $('.fixed-area');
var fixedAreaTop = $fixedArea.offset() ? $fixedArea.offset().top + 28 : 0;
require('../common');
require('../plugins/slider');
... ... @@ -100,19 +99,19 @@ function getProData($good) {
}
function fixAreaTop(scrollTop) {
var fixedAreaTop = $('#catagory-wrap').offset() ? $('#catagory-wrap').offset().top + 28 : 0;
if (scrollTop > fixedAreaTop) {
$fixedArea.css({
position: 'fixed',
top: 0
});
$('#pjax-container').css('margin-top', '48px');
} else {
$fixedArea.css({
position: 'static',
top: 0
});
$('#pjax-container').css('margin-top', '20px');
}
}
new Swiper('.rec-swiper', {
... ...
... ... @@ -122,7 +122,7 @@
content: "";
width: 18px;
height: 18px;
background: url("/help/a.png") no-repeat;
background: url("/help/q.png") no-repeat;
position: absolute;
left: 0;
top: 2px;
... ... @@ -132,7 +132,7 @@
content: "";
width: 18px;
height: 18px;
background: url("/help/q.png") no-repeat;
background: url("/help/a.png") no-repeat;
position: absolute;
left: 0;
}
... ...
... ... @@ -184,11 +184,11 @@
}
.a-area:before {
background: url("/help/a.png") no-repeat;
background: url("/help/q.png") no-repeat;
}
.q-area:before {
background: url("/help/q.png") no-repeat;
background: url("/help/a.png") no-repeat;
}
.iconfont {
... ...
... ... @@ -199,7 +199,7 @@
.list-box {
border: 1px solid #e0e0e0;
border-top: 0;
height: 153px;
height: 152px;
padding-top: 18px;
padding-bottom: 18px;
padding-left: 5px;
... ... @@ -287,7 +287,8 @@
}
.good-detail-img, .guang-box, .brand-box {
height: 300px;
height: 298px;
overflow: hidden;
}
.good-detail-text {
... ... @@ -334,6 +335,7 @@
.guang-box {
position: relative;
overflow: hidden;
.guang-img {
width: 100%;
... ... @@ -377,7 +379,7 @@
.msg-info {
position: relative;
height: 120px;
height: 118px;
background: #027cf9;
color: #fff;
padding: 20px 10px 20px 10px;
... ...