提交 b2027ce9 编写于 作者: guangjun.yang's avatar guangjun.yang

请先购买学习卡

上级 61241be7
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class="info"> <div class="info">
<span class="name">{{cardInfo.goodsName}}</span> <span class="name">{{cardInfo.goodsName}}</span>
<p> <p>
<span class="price">{{cardInfo.preferentialPrice}}</span><span v-show="cardInfo.costPrice" class="discount"><del> 原价¥{{cardInfo.costPrice}}</del></span> <span class="price">{{cardInfo.preferentialPrice | formatMoney}}</span><span v-show="cardInfo.costPrice" class="discount"><del> 原价¥{{cardInfo.costPrice | formatMoney}}</del></span>
</p> </p>
</div> </div>
</section> </section>
......
...@@ -84,6 +84,10 @@ const vueFilter = { ...@@ -84,6 +84,10 @@ const vueFilter = {
return sizeStr.substring(0, index) + sizeStr.substr(index + 3, 2) return sizeStr.substring(0, index) + sizeStr.substr(index + 3, 2)
} }
return size; return size;
},
formatMoney(money = 0) {
if(!money) return 0;
return (money / 100).toFixed(0);
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册