Commit a9d5821bab03b81645f51238b1109c559872ca72

Authored by 王强
1 parent 863ce605

折扣专区支持文字性质角标,tag

src/pages/discountList/discountList.vue
... ... @@ -52,7 +52,7 @@
52 52  
53 53 <!-- 折扣角标 -->
54 54 <div class="discount-flag" slot="flag" v-if="parseFloat(item.price) < parseFloat(item.prices)">
55   - {{getDiscount(item.price, item.prices)}}折
  55 + {{item.tag || getDiscount(item.price, item.prices)}}
56 56 </div>
57 57 </goods-item-8>
58 58 </div>
... ... @@ -110,7 +110,7 @@
110 110 // 售价/原价
111 111 let x = (price * 100) / (prices * 100);
112 112  
113   - return (Math.floor(x * 1000) / 1000) * 10;
  113 + return ((Math.floor(x * 1000) / 1000) * 10).toString() + '折';
114 114 }
115 115 }
116 116 },
... ...
src/pages/optimization2/optimization2.vue
... ... @@ -44,7 +44,7 @@
44 44  
45 45 <!-- 折扣角标 -->
46 46 <div class="discount-flag" slot="flag" v-if="parseFloat(item.price) < parseFloat(item.prices)">
47   - {{getDiscount(item.price, item.prices)}}折
  47 + {{item.tag || getDiscount(item.price, item.prices)}}
48 48 </div>
49 49 </goods-item-2>
50 50 </div>
... ... @@ -192,7 +192,7 @@
192 192 // 售价/原价
193 193 let x = (price * 100) / (prices * 100);
194 194  
195   - return (Math.floor(x * 1000) / 1000) * 10;
  195 + return ((Math.floor(x * 1000) / 1000) * 10).toString() + '折';
196 196 }
197 197 }
198 198 },
... ...