【功能完善】积分商城:完善订单相关信息展示
parent
b2e40e7011
commit
732aa7686c
|
@ -94,8 +94,15 @@
|
||||||
"
|
"
|
||||||
:disabled="state.goodsInfo.stock === 0"
|
:disabled="state.goodsInfo.stock === 0"
|
||||||
>
|
>
|
||||||
<view class="price-text">
|
<view class="price-box ss-flex">
|
||||||
{{ getShowPriceText }}
|
<image
|
||||||
|
:src="sheep.$url.static('/static/img/shop/goods/score1.svg')"
|
||||||
|
style="width: 36rpx;height: 36rpx;margin: 0 4rpx;"
|
||||||
|
></image>
|
||||||
|
<text class="point-text ss-m-r-16">
|
||||||
|
{{ getShowPrice.point }}
|
||||||
|
{{ !getShowPrice.price || getShowPrice.price === 0 ? '' : `+¥${getShowPrice.price}` }}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="state.goodsInfo.stock === 0">已售罄</view>
|
<view v-if="state.goodsInfo.stock === 0">已售罄</view>
|
||||||
<view v-else>立即兑换</view>
|
<view v-else>立即兑换</view>
|
||||||
|
@ -202,6 +209,15 @@
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const getShowPriceText = computed(() => {
|
||||||
|
let priceText = `¥${fen2yuan(state.goodsInfo.price)}`;
|
||||||
|
if (!isEmpty(state.selectedSku)) {
|
||||||
|
const sku = state.selectedSku;
|
||||||
|
priceText = `${sku.point}${!sku.pointPrice ? '' : `+¥${fen2yuan(sku.pointPrice)}`}`;
|
||||||
|
}
|
||||||
|
return priceText;
|
||||||
|
});
|
||||||
|
|
||||||
// 查询活动
|
// 查询活动
|
||||||
const getActivity = async (id) => {
|
const getActivity = async (id) => {
|
||||||
const { data } = await PointApi.getPointActivity(id);
|
const { data } = await PointApi.getPointActivity(id);
|
||||||
|
@ -276,6 +292,7 @@
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
margin: 0 4rpx;
|
margin: 0 4rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.point-text {
|
.point-text {
|
||||||
font-size: 42rpx;
|
font-size: 42rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
@ -283,6 +300,7 @@
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
font-family: OPPOSANS;
|
font-family: OPPOSANS;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price-text {
|
.price-text {
|
||||||
font-size: 42rpx;
|
font-size: 42rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
@ -291,6 +309,7 @@
|
||||||
font-family: OPPOSANS;
|
font-family: OPPOSANS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.origin-price-text {
|
.origin-price-text {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
|
@ -58,17 +58,14 @@
|
||||||
>
|
>
|
||||||
<view class="item-title">积分抵扣</view>
|
<view class="item-title">积分抵扣</view>
|
||||||
<view class="ss-flex ss-col-center">
|
<view class="ss-flex ss-col-center">
|
||||||
{{ state.pointStatus ? '剩余积分' : '当前积分' }}
|
{{ state.pointStatus || state.orderPayload.pointActivityId ? '剩余积分' : '当前积分' }}
|
||||||
<image
|
<image
|
||||||
:src="sheep.$url.static('/static/img/shop/goods/score1.svg')"
|
:src="sheep.$url.static('/static/img/shop/goods/score1.svg')"
|
||||||
class="score-img"
|
class="score-img"
|
||||||
/>
|
/>
|
||||||
<text class="item-value ss-m-r-24" v-if="state.orderPayload.pointActivityId">
|
<text class="item-value ss-m-r-24">
|
||||||
{{ state.orderInfo.totalPoint || 0 }}
|
|
||||||
</text>
|
|
||||||
<text class="item-value ss-m-r-24" v-if="!state.orderPayload.pointActivityId">
|
|
||||||
{{
|
{{
|
||||||
state.pointStatus
|
state.pointStatus || state.orderPayload.pointActivityId
|
||||||
? state.orderInfo.totalPoint - state.orderInfo.usePoint
|
? state.orderInfo.totalPoint - state.orderInfo.usePoint
|
||||||
: state.orderInfo.totalPoint || 0
|
: state.orderInfo.totalPoint || 0
|
||||||
}}
|
}}
|
||||||
|
@ -346,7 +343,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.orderInfo = data;
|
state.orderInfo = data;
|
||||||
state.couponInfo = data.coupons;
|
state.couponInfo = data.coupons || [];
|
||||||
// 设置收货地址
|
// 设置收货地址
|
||||||
if (state.orderInfo.address) {
|
if (state.orderInfo.address) {
|
||||||
addressState.value.addressInfo = state.orderInfo.address;
|
addressState.value.addressInfo = state.orderInfo.address;
|
||||||
|
|
Loading…
Reference in New Issue