新增商品其他售价逻辑

修复下单重复创建订单问题
This commit is contained in:
2024-05-16 15:38:34 +08:00
parent 62c9994444
commit f547216c2b
8 changed files with 52 additions and 17 deletions

View File

@@ -3,7 +3,7 @@
<view class='swiper-container'>
<swiper class='swiper' :interval='1500' :duration='1000' @change='swiperChange'>
<swiper-item v-for='(item,index) in [goodsBean?.images]' :key='index'>
<image :src='item||defaultImage' />
<image :src='item||defaultImage' mode='aspectFill' />
</swiper-item>
</swiper>
<view class='indicator' style='display: none'>
@@ -25,7 +25,7 @@
</view>
<view class='c-flex-row'>
<text style='flex: 1'>{{ goodsBean?.name }}</text>
<text style='flex: 1'>{{ goodsBean?.name || '未知' }}</text>
<view class='share-button'>
<image :src='assetsUrl("ic_share.png")'></image>
<button class='btn' plain open-type='share'>分享</button>
@@ -129,6 +129,7 @@ const swiperIndex = ref(0);
onLoad(async (e: any) => {
await uni.showLoading();
goodsBean.value = await getGoodsDetail(e.goodsId);
goodsBean.value.price = userStore.getRealGoodsPrice(goodsBean.value?.price, goodsBean.value?.priceExt);
const { rows } = await getGoodsList({
page: {
page: 1,
@@ -140,6 +141,9 @@ onLoad(async (e: any) => {
}
});
recommendList.value = rows;
recommendList.value?.forEach(e => {
e.price = userStore.getRealGoodsPrice(e.price, e.priceExt);
});
uni.hideLoading();
});