【新增】首页商品组件,增加显示积分兑换组合价格,及积分赠送展示。

This commit is contained in:
JianWeie
2022-08-07 12:39:12 +08:00
parent a1656a12fa
commit cfd9ac8d2a

View File

@@ -23,6 +23,22 @@
<view class="good-tag-hot" v-if="item.isHot">
热门
</view>
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
<view>
{{ pointShowName}}兑换价:
</view>
<view class="coreshop-text-red">
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ item.price - item.pointsDeduction}}
</view>
</view>
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
<view>
购买赠送:
</view>
<view class="coreshop-text-red">
{{item.points}}{{ pointShowName}}
</view>
</view>
</view>
</u-grid-item>
</u-grid>
@@ -151,6 +167,15 @@
required: true,
}
},
computed: {
pointSwitch() { return this.$store.state.config.pointSwitch },
pointShowExchangePrice() { return this.$store.state.config.pointShowExchangePrice },
pointDiscountedProportion() { return this.$store.state.config.pointDiscountedProportion },
pointExchangeModel() { return this.$store.state.config.pointExchangeModel },
pointShowName() { return this.$store.state.config.pointShowName },
pointGetModel() { return this.$store.state.config.pointGetModel },
pointShowPoint() { return this.$store.state.config.pointShowPoint },
},
methods: {
change(e) {
this.current = e.detail.current;