From 9df0194aeb18e478e76ff6a9a97cd8c4855e697b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 16 Sep 2024 18:15:13 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E3=80=91=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=BB=A1=E5=87=8F=E9=80=81=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/activity/index.vue | 110 ++++---- pages/goods/index.vue | 247 ++++++++++++++++-- sheep/components/countDown/index.vue | 196 ++++++++++++++ .../s-activity-pop/s-activity-pop.vue | 145 ++++------ .../s-goods-column/s-goods-column.vue | 1 - .../components/s-select-sku/s-select-sku.vue | 82 ++++-- sheep/hooks/useGoods.js | 197 ++++---------- static/images/dis.png | Bin 16936 -> 0 bytes 8 files changed, 612 insertions(+), 366 deletions(-) create mode 100644 sheep/components/countDown/index.vue delete mode 100644 static/images/dis.png diff --git a/pages/activity/index.vue b/pages/activity/index.vue index 591d004..0e89b30 100644 --- a/pages/activity/index.vue +++ b/pages/activity/index.vue @@ -7,7 +7,7 @@ 满减: - {{ formatRewardActivityRule(state.activityInfo, item) }} + {{ item.description }} @@ -19,9 +19,13 @@ - + @@ -30,9 +34,13 @@ - + @@ -41,27 +49,22 @@ - 0" + :status="state.loadStatus" + :content-text="{ contentdown: '上拉加载更多', - }" @tap="loadMore" /> + }" + @tap="loadMore" + /> @@ -448,4 +540,101 @@ color: #333333; } } + + // 限时折扣 + .discount { + width: 750rpx; + height: 100rpx; + // background-color: red; + overflow: hidden; + position: relative; + } + + .disImg { + width: 750rpx; + height: 100rpx; + position: absolute; + top: 0; + z-index: -1; + } + + .discountCont { + width: 680rpx; + height: 90rpx; + margin: 10rpx auto 0 auto; + // background-color: gold; + } + + .disContT { + width: 680rpx; + height: 50rpx; + display: flex; + justify-content: space-between; + } + + .disContT1 { + width: 400rpx; + height: 50rpx; + // background-color: green; + display: flex; + justify-content: flex-start; + align-items: center; + } + + .disContT2 { + width: 200rpx; + height: 50rpx; + line-height: 50rpx; + // background-color: gold; + font-size: 30rpx; + text-align: end; + color: white; + font-weight: bolder; + font-style: oblique 20deg; + letter-spacing: 0.1rem; + } + + .disContT1P { + color: white; + font-weight: bold; + font-size: 28rpx; + } + + .disContT1End { + // width: 180rpx; + padding: 0 10rpx; + height: 30rpx; + line-height: 28rpx; + text-align: center; + font-weight: bold; + background-color: white; + color: #ff3000; + font-size: 23rpx; + border-radius: 20rpx; + margin-left: 10rpx; + } + + .disContB { + width: 680rpx; + height: 40rpx; + display: flex; + justify-content: space-between; + font-size: 20rpx; + color: white; + align-items: center; + } + + .disContB1 { + width: 300rpx; + height: 40rpx; + line-height: 40rpx; + } + + .disContB2 { + width: 300rpx; + height: 40rpx; + line-height: 40rpx; + display: flex; + justify-content: flex-end; + } diff --git a/sheep/components/countDown/index.vue b/sheep/components/countDown/index.vue new file mode 100644 index 0000000..d7b88de --- /dev/null +++ b/sheep/components/countDown/index.vue @@ -0,0 +1,196 @@ + + + + + + diff --git a/sheep/components/s-activity-pop/s-activity-pop.vue b/sheep/components/s-activity-pop/s-activity-pop.vue index 4c000e5..460ccf7 100644 --- a/sheep/components/s-activity-pop/s-activity-pop.vue +++ b/sheep/components/s-activity-pop/s-activity-pop.vue @@ -3,66 +3,32 @@ 优惠 - + 促销 - - - + + + - 满{{fen2yuan(item.discountPrice)}}元减{{fen2yuan(item.limit)}}元; + {{ item }} - {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} - - - - - - - - - - - 满{{fen2yuan(item.discountPrice)}}元包邮; - - - {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} - - - - - - - - - - - 满{{fen2yuan(item.discountPrice)}}元送{{item.value}}积分; - - - {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} - - - - - - - - - - - 满{{fen2yuan(item.discountPrice)}}元送{{item.value}}张优惠券; - - - {{formatDateRange(state.activityInfo[0]?.startTime,state.activityInfo[0]?.endTime)}} + {{ sheep.$helper.timeFormat(state.rewardActivity.startTime, 'yyyy.mm.dd') }} + - + {{ sheep.$helper.timeFormat(state.rewardActivity.endTime, 'yyyy.mm.dd') }} @@ -71,31 +37,33 @@ 可领优惠券 - + - {{item.name}} + {{ item.name }} - {{item.validityType==1?formatDateRange(item.validStartTime,item.validEndTime) : '领取后'+item.fixedStartTerm+'-'+item.fixedEndTerm +'天可用'}} + {{ + item.validityType == 1 + ? sheep.$helper.timeFormat(item.validStartTime, 'yyyy.mm.dd') - + sheep.$helper.timeFormat(item.validEndTime, 'yyyy.mm.dd') + : '领取后' + item.fixedStartTerm + '-' + item.fixedEndTerm + '天可用' + }} - - 立即领取 - - - 已领取 - + 立即领取 + 已领取 @@ -104,21 +72,12 @@