Authored by OF1706

浏览

... ... @@ -714,6 +714,49 @@
<div class="loading"><span></span>请稍后...</div>
</div>
</div>
{{#unless @root.pc.product.removeRecentView}}
<div class="lazy-load-object">
<textarea class="datalazyload" style="visibility: hidden;">
<script>
fetchRecommend();
</script>
</textarea>
</div>
<div class="bottom-tab">
<p>
<span class="bottom-title bottom-cur">店铺推荐</span>
<span class="bottom-title">最近浏览</span>
<span class="bottom-title change">换一批
<span class="iconfont change-icon">&#xe639;</span>
</span>
</p>
</div>
<div class="individual-comment info-block info-bottom">
{{#if latestWalk}}
<div class="latest-walk">
<input id="latest-walk-count" type="hidden" value="{{latestWalk}}">
<div id="latest-walk-goods" class="goods clearfix"></div>
{{> product/latest-walk-tpl}}
</div>
{{/if}}
<div id="recommend-shop" class="hide">
<div class="recommend-content clearfix">
<div class="recommend-slider">
<ul class=" img-list" id="recommend-content"></ul>
<div class="img-brand-switch">
<a class="prev iconfont" href="javascript:;">&#xe609;</a>
<a class="next iconfont" href="javascript:;">&#xe608;</a>
</div>
</div>
</div>
</div>
</div>
{{/unless}}
<!-- 商品详细信息窗口 -->
<script type="text/javascript">
... ...
... ... @@ -183,3 +183,46 @@ deliveryWay = {
payWay.init();
deliveryWay.init();
// 凑单商品、为您优选、最近浏览
$('.bottom-tab').on('click', '.bottom-title', function() {
var $this = $(this),
index = $this.index();
var $latestWalk = $('.individual-comment .latest-walk'),
$recommendComment = $('.individual-comment #recommend-shop');
if ($this.hasClass('change')) {
return;
}
if ($this.hasClass('bottom-cur')) {
return;
}
$this.addClass('bottom-cur');
$this.siblings('.bottom-cur').removeClass('bottom-cur');
if (index === 0) {
// 店铺推荐
$recommendComment.slideDown(SLIDETIME);
$latestWalk.slideUp(SLIDETIME);
$('.change').removeClass('hide');
} else {
// 最近游览
fetchLatestWalk(); // eslint-disable-line
$recommendComment.slideUp(SLIDETIME);
$latestWalk.slideDown(SLIDETIME);
$('.change').addClass('hide');
}
});
$('.recommend-content').find('.iconfont').mouseenter(function() {
$(this).addClass('focus');
}).mouseleave(function() {
$(this).removeClass('focus');
});
... ...
... ... @@ -1083,5 +1083,80 @@
}
}
}
.bottom-tab{
.bottom-title{
font-size: 14px;
display: inline-block;
padding-bottom: 12px;
margin: 10px 2px -2px 10px;
font-weight: bold;
cursor: pointer;
}
.bottom-cur{
border-bottom: 2px solid #000;
}
.change{
float: right;
.change-icon{
font-size: 18px;
}
}
}
.latest-walk {
overflow: inherit;
border-top: none;
display: none;
.goods {
width: 1150px;
margin: 0 auto;
height: 410px;
margin-top: 20px;
> div {
float: left;
width: 222px;
margin-right: 10px;
&:nth-child(5n) {
margin-right: 0;
}
}
}
img {
height: 300px;
width: 222px;
display: block;
}
.name {
display: block;
margin-top: 5px;
color: #222;
line-height: 16px;
margin: 0 auto;
}
.price {
color: #222;
font-weight: bold;
margin-top: 5px;
text-align: center;
}
.market-price {
margin-right: 5px;
}
.has-sale {
text-decoration: line-through;
color: #999;
}
}
\ No newline at end of file
... ...