购物车逻辑完善
个人信息存储优化 团购下单
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
|
||||
<view class='goods-info-view c-flex-column'>
|
||||
<view class='c-flex-row'>
|
||||
<text class='goods-price accent-text-color'>39.89</text>
|
||||
<text class='goods-price accent-text-color'>{{ detailBean?.payPrice || 0 }}</text>
|
||||
<text>销量{{ detailBean?.totalNum || 0 }}</text>
|
||||
</view>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</view>
|
||||
<text style='color: #a6a6a6'>不参与会员折扣</text>
|
||||
<text style='color: #F32B2B'>¥{{ detailBean?.goods?.payPrice }}</text>
|
||||
<text class='bought_count'>已团{{detailBean?.sendNum}}</text>
|
||||
<text class='bought_count'>已团{{ detailBean?.sendNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -164,6 +164,7 @@ const currentPageNum = ref(1);
|
||||
|
||||
onLoad(async (e: any) => {
|
||||
detailBean.value = await getGroupBuyDetail(e.id);
|
||||
detailBean.value.goods.price = detailBean.value.price;
|
||||
bannerList.value = JSON.parse(detailBean.value.content).filter((item: any) => item.type === 2).map((item: any) => item.images);
|
||||
countdown();
|
||||
await fetchRecommendList();
|
||||
@@ -226,8 +227,8 @@ const countdown = () => {
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
const showSkuDialog = () => {
|
||||
skuDialogRef.value.show();
|
||||
const showSkuDialog = (fn: Function) => {
|
||||
skuDialogRef.value.show(fn);
|
||||
};
|
||||
|
||||
const confirmGoodsSku = (e: any) => {
|
||||
@@ -235,18 +236,24 @@ const confirmGoodsSku = (e: any) => {
|
||||
};
|
||||
|
||||
const placeOrder = async () => {
|
||||
goPath('/pages/common/groupbuy/order');
|
||||
|
||||
const params = {
|
||||
'colorId': '1725029269178814466',
|
||||
'sizeId': '0',
|
||||
'goodsId': detailBean.value.goods.goodsId,
|
||||
'groupId': detailBean.value.id,
|
||||
'memberId': userInfo.value.id,
|
||||
'shareId': '123456'
|
||||
};
|
||||
async function create() {
|
||||
const params = {
|
||||
'colorId': '1725029269178814466',
|
||||
'sizeId': '0',
|
||||
'goodsId': detailBean.value.goods.goodsId,
|
||||
'groupId': detailBean.value.id,
|
||||
'memberId': userInfo.value.id,
|
||||
'shareId': '123456'
|
||||
};
|
||||
|
||||
const result = await preOrder(params);
|
||||
const result = await preOrder(params);
|
||||
goPath('/pages/common/groupbuy/order');
|
||||
}
|
||||
|
||||
showSkuDialog(() => {
|
||||
create();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@@ -12,10 +12,10 @@
|
||||
<view class='c-flex-column' style='flex: 1'>
|
||||
<view class='goods-name'>{{ item.name }}</view>
|
||||
<view class='middle-view c-flex-row'>
|
||||
<text>原价:¥{{ item.goodsPrice }}</text>
|
||||
<view v-if='(item.goodsPrice - item.payPrice)>0' class='decline c-flex-row'>
|
||||
<text>原价:¥{{ item.price }}</text>
|
||||
<view v-if='(item.price - item.payPrice)>0' class='decline c-flex-row'>
|
||||
<image :src='assetsUrl("ic_decline.png")' />
|
||||
<text>直降¥{{ (item.goodsPrice - item.payPrice).toFixed(2) }}</text>
|
||||
<text>直降¥{{ (item.price - item.payPrice).toFixed(2) }}</text>
|
||||
</view>
|
||||
<text>即将恢复</text>
|
||||
</view>
|
||||
|
Reference in New Issue
Block a user