Authored by 陈峰

增加预售商品的提示

@@ -28,6 +28,11 @@ @@ -28,6 +28,11 @@
28 {{/if}} 28 {{/if}}
29 {{#if advanceCart}} 29 {{#if advanceCart}}
30 <div class="cart-content advance-good active"> 30 <div class="cart-content advance-good active">
  31 + <p class="presell-info">
  32 + <span class="iconfont">&#xe61a;</span>
  33 + <span class="txt">由于商品上市期不同,先到的将先发货</span>
  34 + <span class="txt">预售商品不参加活动,不可使用优惠券</span>
  35 + </p>
31 {{#preSellCart}} 36 {{#preSellCart}}
32 {{> cart-content}} 37 {{> cart-content}}
33 {{/preSellCart}} 38 {{/preSellCart}}
@@ -61,6 +61,15 @@ let cartObj = { @@ -61,6 +61,15 @@ let cartObj = {
61 window.location.href = '/cart/index/new/gift?cartType=' + cartType; 61 window.location.href = '/cart/index/new/gift?cartType=' + cartType;
62 } 62 }
63 }); 63 });
  64 + if (typeof window.cookie === 'function' && window.cookie('_hasShowCartPresellTip') === 'y') {
  65 + $('#presell-tip').removeClass('show').addClass('hide');
  66 + } else {
  67 + $('#presell-tip').removeClass('hide').addClass('show');
  68 + setTimeout(function() {
  69 + $('#presell-tip').removeClass('show').addClass('hide');
  70 + window.setCookie('_hasShowCartPresellTip', 'y');
  71 + }, 3000);
  72 + }
64 }, 73 },
65 toBalance() { 74 toBalance() {
66 let cartType = window.cookie('cartType') || 'ordinary'; 75 let cartType = window.cookie('cartType') || 'ordinary';
@@ -4,10 +4,35 @@ @@ -4,10 +4,35 @@
4 4
5 .cart-content { 5 .cart-content {
6 display: none; 6 display: none;
  7 + margin-top: 20px;
7 8
8 &.active { 9 &.active {
9 display: block; 10 display: block;
10 } 11 }
  12 +
  13 + .presell-info {
  14 + margin-top: -20px;
  15 + height: 105px;
  16 + padding: 17px 35px;
  17 + font-size: 25px;
  18 + background: #f0f0f0;
  19 + color: #b7b7b7;
  20 +
  21 + > span {
  22 + display: block;
  23 + }
  24 +
  25 + .iconfont {
  26 + float: left;
  27 + font-size: 52px;
  28 + }
  29 +
  30 + .txt {
  31 + height: 35px;
  32 + line-height: 35px;
  33 + margin-left: 93px;
  34 + }
  35 + }
11 } 36 }
12 37
13 .box { 38 .box {
@@ -21,7 +46,6 @@ @@ -21,7 +46,6 @@
21 46
22 .cart-nav { 47 .cart-nav {
23 color: #c6c6c6; 48 color: #c6c6c6;
24 - margin-bottom: 20px;  
25 border-bottom: 1PX solid #e0e0e0; 49 border-bottom: 1PX solid #e0e0e0;
26 background: #fff; 50 background: #fff;
27 51