| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <template>
- <div>
- <div v-if="isVip">
- <div class="money font-color-red">
- <span class="iconfont icon-huiyuan" style="font-size: 0.3rem"></span
- ><span class="num" style="font-size: 0.3rem">
- ¥ {{ item.vip_price }}</span
- >
- </div>
- <div class="num" style="height: 0.4rem; font-size: 0.3rem">
- <span
- class="addfont icon-Icon-gou font-color-red"
- style="font-size: 0.3rem"
- ></span>
- ¥ {{ item.price }}
- </div>
- <div
- class="num font-color-green"
- style="height: 0.4rem; font-size: 0.3rem"
- >
- <span
- class="addfont icon-Icon-zhuan font-color-red"
- style="font-size: 0.3rem"
- ></span>
- ¥ {{ getPrice() }}
- </div>
- </div>
- <div v-else>
- <div class="money font-color-red">
- ¥<span class="num">{{ item.price }}</span>
- </div>
- <div class="ot-money" style="text-decoration:line-through;">
- ¥{{ item.ot_price }}
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: "GoodItem",
- props: {
- item: {},
- isVip: false
- },
- data: function() {
- return {};
- },
- mounted: function() {},
- methods: {
- getPrice() {
- var price = Number(this.item.price);
- var vip_price = Number(this.item.vip_price);
- return (price - vip_price).toFixed(2);
- }
- }
- };
- </script>
- <style></style>
|