From b87c8e82922a6c4e2288d3f11c39c6c6ba3e72db Mon Sep 17 00:00:00 2001 From: Waiting Date: Tue, 16 Apr 2024 16:52:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=A2=E8=B4=AD=E5=B7=B2=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E5=BC=80=E5=A7=8B=E6=98=BE=E7=A4=BA=E5=A4=84?= =?UTF-8?q?=E7=90=86=20=E8=AE=A2=E5=8D=95=E5=BE=85=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/common/groupbuy/detail.vue | 42 +++++++++++++++++++++++----- src/pages/common/groupbuy/index.vue | 2 +- src/pages/home/subs/group/join.vue | 2 +- src/pages/mall/subs/goods/detail.vue | 9 +++--- src/pages/mine/index.vue | 15 +++++++++- src/store/modules/user/index.ts | 3 +- 6 files changed, 58 insertions(+), 15 deletions(-) diff --git a/src/pages/common/groupbuy/detail.vue b/src/pages/common/groupbuy/detail.vue index 94f8f88..88cfd7c 100644 --- a/src/pages/common/groupbuy/detail.vue +++ b/src/pages/common/groupbuy/detail.vue @@ -19,7 +19,7 @@ {{ groupBuyBean?.payPrice || 0 }} ¥{{ groupBuyBean?.price || 0 }} - + {{ countdownTime?.days || 0 }}天 {{ countdownTime?.hours || '00' }} : @@ -29,6 +29,11 @@ 距离活动结束仅剩 + + + {{ isNotStated() ? '未开始' : '已结束' }} + + @@ -38,7 +43,7 @@ - {{ groupBuyBean?.name }} + {{ groupBuyBean?.name || '未知' }} - + 浏览此商品的客户还浏览了 - - {{ item.goodsName }} + + {{ item.goodsName || '未知' }} {{ item.price }} @@ -122,7 +127,10 @@ - 跟团购买 + + @@ -181,6 +189,19 @@ onUnload(() => { } }); +const isNotStated = () => { + return dayjs(groupBuyBean.value?.startDate).isAfter(Date.now()); +}; + +const isPending = () => { + return dayjs(groupBuyBean.value?.startDate).isBefore(Date.now()) && dayjs(groupBuyBean.value?.endDate).isAfter(Date.now()); + ; +}; + +const isEnded = () => { + return dayjs(groupBuyBean.value?.endDate).isBefore(Date.now()); +}; + const getStockColorCount = computed(() => { const list = Array.from(new Set(groupBuyBean.value?.goods?.stocks?.map(item => item.colorName))) .map(colorName => groupBuyBean.value?.goods?.stocks?.find(item => item.colorName === colorName)!); @@ -194,7 +215,7 @@ const fetchRecommendList = async () => { pageSize: 20, bean: { keyword: '', - typeIds: ['1724629185362591745'] + typeIds: [] } } }); @@ -550,6 +571,13 @@ const placeOrder = async () => { background: #F32B2B; color: #FFFFFF; border-radius: 40rpx; + border: none; + } + + .place-order-button-disable { + @extend .place-order-button; + background: #b9b5b5; + color: #FFFFFF; } } diff --git a/src/pages/common/groupbuy/index.vue b/src/pages/common/groupbuy/index.vue index e2f98a5..90b66b9 100644 --- a/src/pages/common/groupbuy/index.vue +++ b/src/pages/common/groupbuy/index.vue @@ -19,7 +19,7 @@ 直降¥{{ (item.price - item.payPrice).toFixed(2) }} - 即将恢复 + {{ tabIndex == 0 ? '即将恢复' : '即将开始'}} {{ item.payPrice }} diff --git a/src/pages/home/subs/group/join.vue b/src/pages/home/subs/group/join.vue index 0d24cd0..7e75338 100644 --- a/src/pages/home/subs/group/join.vue +++ b/src/pages/home/subs/group/join.vue @@ -6,7 +6,7 @@ 1.长按识别下方二维码,添加【店铺福利群】 - + 2.识别【店铺福利群】发您的二维码,即可入群 diff --git a/src/pages/mall/subs/goods/detail.vue b/src/pages/mall/subs/goods/detail.vue index 0dd90f8..5375afe 100644 --- a/src/pages/mall/subs/goods/detail.vue +++ b/src/pages/mall/subs/goods/detail.vue @@ -26,7 +26,7 @@ {{ goodsBean?.name }} -