Authored by biao

fix issues: 1. 详情页页面,当购物车内商品为0时,购物车图标上不显示数字0. 2.购物车页面,已参加活动标题重复问题修复. code review by LZF

@@ -82,6 +82,9 @@ $.ajax({ @@ -82,6 +82,9 @@ $.ajax({
82 82
83 if (data.code === 200) { 83 if (data.code === 200) {
84 count = data.data.cart_goods_count || 0; 84 count = data.data.cart_goods_count || 0;
  85 + if (count === 0) {
  86 + return false;
  87 + }
85 if (count > 99) { 88 if (count > 99) {
86 count = '99+'; 89 count = '99+';
87 } 90 }
@@ -147,12 +147,15 @@ @@ -147,12 +147,15 @@
147 color: #8f8f8f; 147 color: #8f8f8f;
148 } 148 }
149 } 149 }
  150 +
  151 + .activity-title{
  152 + font-size: 32rem / $pxConvertRem;
  153 + padding: 20rem / $pxConvertRem 20rem / $pxConvertRem 0;
  154 + }
  155 +
150 .activity{ 156 .activity{
151 - padding: 20rem / $pxConvertRem; 157 + padding: 8rem / $pxConvertRem 20rem / $pxConvertRem 20rem / $pxConvertRem 32rem / $pxConvertRem;
152 font-size: 26rem / $pxConvertRem; 158 font-size: 26rem / $pxConvertRem;
153 - h1{  
154 - font-size: 32rem / $pxConvertRem;  
155 - }  
156 li:before { 159 li:before {
157 content: ""; 160 content: "";
158 display: inline-block; 161 display: inline-block;
@@ -35,13 +35,20 @@ @@ -35,13 +35,20 @@
35 {{/if}} 35 {{/if}}
36 36
37 {{# promotionInfo}} 37 {{# promotionInfo}}
38 -<div class="activity"> 38 +{{#if @first}}
  39 +<div class="activity-title">
39 <h1>已参与活动</h1> 40 <h1>已参与活动</h1>
  41 +</div>
  42 +{{/if}}
  43 +{{/ promotionInfo}}
  44 +
  45 +<div class="activity">
40 <ul> 46 <ul>
  47 + {{# promotionInfo}}
41 <li>{{name}}</li> 48 <li>{{name}}</li>
  49 + {{/ promotionInfo}}
42 </ul> 50 </ul>
43 </div> 51 </div>
44 -{{/ promotionInfo}}  
45 52
46 <div class="price-compute"> 53 <div class="price-compute">
47 <p> 54 <p>