去除部分打印,显示价格组件修改
This commit is contained in:
@@ -1,75 +1,76 @@
|
||||
<template>
|
||||
<block v-if="limitDiscount && limitDiscount.id" class="limit-price">
|
||||
<text>
|
||||
{{ returnPrice() }}
|
||||
</text>
|
||||
</block>
|
||||
<block v-if="limitDiscount && limitDiscount.id" class="limit-price">
|
||||
<text>
|
||||
{{ returnPrice() }}
|
||||
</text>
|
||||
</block>
|
||||
|
||||
<text v-else>
|
||||
<block
|
||||
v-if="
|
||||
<text v-else>
|
||||
<block v-if="
|
||||
shopUserInfo.isMemberPrice == 1 &&
|
||||
shopUserInfo.isVip == 1 &&
|
||||
cart.memberPrice * 1 > 0
|
||||
"
|
||||
class="memberPrice"
|
||||
>
|
||||
<text>
|
||||
{{ cart.memberPrice }}
|
||||
</text>
|
||||
</block>
|
||||
">
|
||||
<text class="memberPrice">
|
||||
{{ cart.memberPrice }}
|
||||
</text>
|
||||
</block>
|
||||
|
||||
<text v-else class="salePrice">{{ cart.salePrice }}</text>
|
||||
</text>
|
||||
<text v-else class="salePrice">{{ cart.salePrice }}</text>
|
||||
</text>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import BigNumber from "bignumber.js";
|
||||
import * as orderUtils from "@/utils/order-utils.js";
|
||||
import BigNumber from "bignumber.js";
|
||||
import {
|
||||
limitUtils
|
||||
} from 'ysk-utils';
|
||||
|
||||
function returnPrice() {
|
||||
return orderUtils.returnPrice({
|
||||
goods: props.cart,
|
||||
shopInfo: props.shopInfo,
|
||||
limitTimeDiscountRes: props.limitDiscount,
|
||||
shopUserInfo: props.shopUserInfo,
|
||||
idKey: props.idKey,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
//购物车
|
||||
cart: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
idKey: {
|
||||
type: String,
|
||||
default: "id",
|
||||
},
|
||||
//限时折扣
|
||||
limitDiscount: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
//店铺用户信息
|
||||
shopUserInfo: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
//店铺信息
|
||||
shopInfo: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
const props = defineProps({
|
||||
//购物车
|
||||
cart: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
idKey: {
|
||||
type: String,
|
||||
default: "id",
|
||||
},
|
||||
//限时折扣
|
||||
limitDiscount: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
//店铺用户信息
|
||||
shopUserInfo: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
//店铺信息
|
||||
shopInfo: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
|
||||
function returnPrice() {
|
||||
return limitUtils.returnPrice({
|
||||
goods: props.cart,
|
||||
shopInfo: props.shopInfo,
|
||||
limitTimeDiscountRes: props.limitDiscount,
|
||||
shopUserInfo: props.shopUserInfo,
|
||||
idKey: props.idKey,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.old-price {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
text-decoration: line-through;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
<style lang="scss">
|
||||
.old-price {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
text-decoration: line-through;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user