Showing
4 changed files
with
15 additions
and
4 deletions
@@ -3,10 +3,10 @@ | @@ -3,10 +3,10 @@ | ||
3 | <div class="goods-discount" id="goodsDiscount"> | 3 | <div class="goods-discount" id="goodsDiscount"> |
4 | {{#each promotion}} | 4 | {{#each promotion}} |
5 | {{#if @first}} | 5 | {{#if @first}} |
6 | - <h1 class="first-item short-text tap-hightlight">{{promotionTitle}}<span class="icon-down iconfont dropdown"></span></h1> | 6 | + <h1 class="first-item short-text tap-hightlight"><span class="promotion-icon">促</span>{{promotionTitle}}<span class="icon-down iconfont dropdown"></span></h1> |
7 | {{else}} | 7 | {{else}} |
8 | <div class="discount-folder"> | 8 | <div class="discount-folder"> |
9 | - <h1 class="folder-item tap-hightlight">{{promotionTitle}}</h1> | 9 | + <h1 class="folder-item tap-hightlight"><span class="promotion-icon">促</span>{{promotionTitle}}</h1> |
10 | </div> | 10 | </div> |
11 | {{/if}} | 11 | {{/if}} |
12 | {{/each}} | 12 | {{/each}} |
@@ -11,7 +11,7 @@ let $ = require('yoho-jquery'), | @@ -11,7 +11,7 @@ let $ = require('yoho-jquery'), | ||
11 | 11 | ||
12 | require('./detail/page-render')(function() { | 12 | require('./detail/page-render')(function() { |
13 | let $discountFolder = $('.goods-discount .discount-folder'), | 13 | let $discountFolder = $('.goods-discount .discount-folder'), |
14 | - $discountArrow = $('.goods-discount .first-item span'); | 14 | + $discountArrow = $('.goods-discount .first-item .iconfont'); |
15 | 15 | ||
16 | let goodsDiscountEl = document.getElementById('goodsDiscount'), | 16 | let goodsDiscountEl = document.getElementById('goodsDiscount'), |
17 | goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl), | 17 | goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl), |
@@ -304,7 +304,7 @@ setTimeout(() => { | @@ -304,7 +304,7 @@ setTimeout(() => { | ||
304 | let $goodsDiscount = $('#goodsDiscount'); | 304 | let $goodsDiscount = $('#goodsDiscount'); |
305 | let $discountFirstItem = $goodsDiscount.find('.first-item'); | 305 | let $discountFirstItem = $goodsDiscount.find('.first-item'); |
306 | let $discountFolder = $goodsDiscount.find('.discount-folder'); | 306 | let $discountFolder = $goodsDiscount.find('.discount-folder'); |
307 | - let $discountArrow = $goodsDiscount.find('.first-item span'); | 307 | + let $discountArrow = $goodsDiscount.find('.first-item .iconfont'); |
308 | 308 | ||
309 | // 初始化goods-discount | 309 | // 初始化goods-discount |
310 | if ($discountFolder.children().length === 0) { | 310 | if ($discountFolder.children().length === 0) { |
@@ -711,6 +711,17 @@ $basicBtnC: #eb0313; | @@ -711,6 +711,17 @@ $basicBtnC: #eb0313; | ||
711 | line-height: 36px; | 711 | line-height: 36px; |
712 | } | 712 | } |
713 | 713 | ||
714 | + .first-item > .promotion-icon, | ||
715 | + .folder-item > .promotion-icon { | ||
716 | + background-color: #d0021b; | ||
717 | + color: #fff; | ||
718 | + padding: 0 4px; | ||
719 | + border-radius: 4px; | ||
720 | + margin-right: 10px; | ||
721 | + font-size: 22px; | ||
722 | + float: left; | ||
723 | + } | ||
724 | + | ||
714 | .short-text { | 725 | .short-text { |
715 | overflow: hidden; | 726 | overflow: hidden; |
716 | text-overflow: ellipsis; | 727 | text-overflow: ellipsis; |
-
Please register or login to post a comment