Authored by 郭成尧

promotion-icon-cu

... ... @@ -3,10 +3,10 @@
<div class="goods-discount" id="goodsDiscount">
{{#each promotion}}
{{#if @first}}
<h1 class="first-item short-text tap-hightlight">{{promotionTitle}}<span class="icon-down iconfont dropdown">&#xe609;</span></h1>
<h1 class="first-item short-text tap-hightlight"><span class="promotion-icon"></span>{{promotionTitle}}<span class="icon-down iconfont dropdown">&#xe609;</span></h1>
{{else}}
<div class="discount-folder">
<h1 class="folder-item tap-hightlight">{{promotionTitle}}</h1>
<h1 class="folder-item tap-hightlight"><span class="promotion-icon"></span>{{promotionTitle}}</h1>
</div>
{{/if}}
{{/each}}
... ...
... ... @@ -11,7 +11,7 @@ let $ = require('yoho-jquery'),
require('./detail/page-render')(function() {
let $discountFolder = $('.goods-discount .discount-folder'),
$discountArrow = $('.goods-discount .first-item span');
$discountArrow = $('.goods-discount .first-item .iconfont');
let goodsDiscountEl = document.getElementById('goodsDiscount'),
goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl),
... ...
... ... @@ -304,7 +304,7 @@ setTimeout(() => {
let $goodsDiscount = $('#goodsDiscount');
let $discountFirstItem = $goodsDiscount.find('.first-item');
let $discountFolder = $goodsDiscount.find('.discount-folder');
let $discountArrow = $goodsDiscount.find('.first-item span');
let $discountArrow = $goodsDiscount.find('.first-item .iconfont');
// 初始化goods-discount
if ($discountFolder.children().length === 0) {
... ...
... ... @@ -711,6 +711,17 @@ $basicBtnC: #eb0313;
line-height: 36px;
}
.first-item > .promotion-icon,
.folder-item > .promotion-icon {
background-color: #d0021b;
color: #fff;
padding: 0 4px;
border-radius: 4px;
margin-right: 10px;
font-size: 22px;
float: left;
}
.short-text {
overflow: hidden;
text-overflow: ellipsis;
... ...