Authored by htoooth

add css

... ... @@ -2,7 +2,7 @@
<div class="row activity-wrapper clearfix">
<span class="title pull-left">&nbsp;&nbsp;销: </span>
{{#if_cond activity.length '>=' 3}}
{{#if_cond activity.length '>' 3}}
<div class="activity-title">展开全部促销 <span class="iconfont index">&#xe610;</span> </div>
<div class="activity-container"></div>
{{/if_cond}}
... ...
... ... @@ -24,8 +24,8 @@ module.exports = {
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
// api: 'http://dev-api.yohops.com:9999/',
// service: 'http://dev-service.yohops.com:9999/',
//api: 'http://dev-api.yohops.com:9999/',
//service: 'http://dev-service.yohops.com:9999/',
search: 'http://192.168.102.216:8080/yohosearch/'
},
... ...
... ... @@ -222,6 +222,32 @@ bindEvent.add(function() {
move(e);
});
//促销弹出框
var icon = {
unfold: '&#xe610;',
fold: '&#xe615;'
};
$('.activity-title').click(function() {
$(this).toggleClass('active');
$('.activity-container').empty();
if ($(this).hasClass('active')) {
$(this).find('span').html(icon.fold);
if (!$('.activity-container').html()) {
$('.activity-container').append($('.activity').clone().find('li').each(function() {
$(this).removeClass('hide');
}).end());
}
$('.activity-container').slideDown(400);
} else {
$(this).find('span').html(icon.unfold);
$('.activity-container').slideUp(400);
}
});
function getCouponAsync(cid) {
var uid = getUid(); // eslint-disable-line
... ...
... ... @@ -337,10 +337,11 @@
.activity-container {
position: absolute;
width: 100%;
height: 10px;
background: #b3b3b3;
left: 72px;
width: calc(585px - 72px);
background: #f5f5f5;
z-index: 5;
display: none;
}
}
... ...