From d2f516e1aef70276b4523a34681942e9be60799b Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 28 Sep 2024 11:37:22 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E3=80=91=E7=A7=AF=E5=88=86=E5=95=86=E5=9F=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 11 + pages/activity/point/list.vue | 77 +++ pages/goods/point.vue | 368 ++++++++++++++ pages/order/pickUpVerify.vue | 19 +- sheep/api/promotion/point.js | 34 ++ .../components/s-block-item/s-block-item.vue | 2 + .../components/s-goods-item/s-goods-item.vue | 12 +- .../s-point-block/s-point-block.vue | 202 ++++++++ .../components/s-point-card/s-point-card.vue | 458 ++++++++++++++++++ 9 files changed, 1171 insertions(+), 12 deletions(-) create mode 100644 pages/activity/point/list.vue create mode 100644 pages/goods/point.vue create mode 100644 sheep/api/promotion/point.js create mode 100644 sheep/components/s-point-block/s-point-block.vue create mode 100644 sheep/components/s-point-card/s-point-card.vue diff --git a/pages.json b/pages.json index 78d7c311..88ac0f4a 100644 --- a/pages.json +++ b/pages.json @@ -120,6 +120,17 @@ "group": "商品" } }, + { + "path": "point", + "style": { + "navigationBarTitleText": "积分商品" + }, + "meta": { + "sync": true, + "title": "积分商品", + "group": "商品" + } + }, { "path": "list", "style": { diff --git a/pages/activity/point/list.vue b/pages/activity/point/list.vue new file mode 100644 index 00000000..8b1e1bf9 --- /dev/null +++ b/pages/activity/point/list.vue @@ -0,0 +1,77 @@ + + + diff --git a/pages/goods/point.vue b/pages/goods/point.vue new file mode 100644 index 00000000..ee3707c0 --- /dev/null +++ b/pages/goods/point.vue @@ -0,0 +1,368 @@ + + + + + diff --git a/pages/order/pickUpVerify.vue b/pages/order/pickUpVerify.vue index 1e8bb6e8..4b4db375 100644 --- a/pages/order/pickUpVerify.vue +++ b/pages/order/pickUpVerify.vue @@ -19,15 +19,15 @@ {{ orderInfo.pickUpVerifyCode }} - - - - - - - - - + + + 核销时间 + + + 每日: + 2020-2-+52 + + @@ -138,7 +138,6 @@ diff --git a/sheep/components/s-point-card/s-point-card.vue b/sheep/components/s-point-card/s-point-card.vue new file mode 100644 index 00000000..c7380de5 --- /dev/null +++ b/sheep/components/s-point-card/s-point-card.vue @@ -0,0 +1,458 @@ + + + + From 5552236952b1b964ea876e3377bd367a137ee271 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 28 Sep 2024 14:43:04 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E3=80=91=E7=A7=AF=E5=88=86=E5=95=86=E5=9F=8E:=20?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=B4=BB=E5=8A=A8=E8=A3=85=E4=BF=AE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../s-goods-column/s-goods-column.vue | 125 +++++--- .../s-point-block/s-point-block.vue | 300 +++++++++++++----- sheep/util/const.js | 120 ++++--- 3 files changed, 367 insertions(+), 178 deletions(-) diff --git a/sheep/components/s-goods-column/s-goods-column.vue b/sheep/components/s-goods-column/s-goods-column.vue index 41ba4425..8163f7a4 100644 --- a/sheep/components/s-goods-column/s-goods-column.vue +++ b/sheep/components/s-goods-column/s-goods-column.vue @@ -39,12 +39,18 @@ class="xs-goods-price font-OPPOSANS" :style="[{ color: goodsFields.price.color }]" > - {{ priceUnit }} - {{ fen2yuan(data.promotionPrice) }} - - {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }} + + {{ data.point }}积分 + {{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${fen2yuan(data.pointPrice)}元` }} + @@ -87,12 +93,18 @@ class="sm-goods-price font-OPPOSANS" :style="[{ color: goodsFields.price.color }]" > - {{ priceUnit }} - {{ fen2yuan(data.promotionPrice) }} - - {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }} + + {{ data.point }}积分 + {{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${fen2yuan(data.pointPrice)}元` }} + @@ -149,12 +161,18 @@ class="md-goods-price ss-m-t-16 font-OPPOSANS ss-m-r-10" :style="[{ color: goodsFields.price.color }]" > - {{ priceUnit }} - {{ fen2yuan(data.promotionPrice) }} - - {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }} + + {{ data.point }}积分 + {{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${fen2yuan(data.pointPrice)}元` }} + - {{ priceUnit }} - {{ fen2yuan(data.promotionPrice) }} - - {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }} + + {{ data.point }}积分 + {{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${fen2yuan(data.pointPrice)}元` }} + @@ -268,7 +292,7 @@ - 去购买 + 去购买 @@ -324,12 +348,18 @@ - {{ priceUnit }} - {{ fen2yuan(data.promotionPrice) }} - - {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }} + + {{ data.point }}积分 + {{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${fen2yuan(data.pointPrice)}元` }} + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - - - - - - - - - + + diff --git a/pages/order/confirm.vue b/pages/order/confirm.vue index d090aecd..697f6b1d 100644 --- a/pages/order/confirm.vue +++ b/pages/order/confirm.vue @@ -294,6 +294,7 @@ combinationActivityId: state.orderPayload.combinationActivityId, combinationHeadId: state.orderPayload.combinationHeadId, seckillActivityId: state.orderPayload.seckillActivityId, + pointActivityId: state.orderPayload.pointActivityId, }); if (code !== 0) { return; @@ -324,6 +325,7 @@ combinationActivityId: state.orderPayload.combinationActivityId, combinationHeadId: state.orderPayload.combinationHeadId, seckillActivityId: state.orderPayload.seckillActivityId, + pointActivityId: state.orderPayload.pointActivityId, }); if (code !== 0) { return; diff --git a/sheep/util/const.js b/sheep/util/const.js index 9c22807f..ec6078db 100644 --- a/sheep/util/const.js +++ b/sheep/util/const.js @@ -116,7 +116,7 @@ export const PromotionActivityTypeEnum = { }, POINT: { type: 4, - name: '', + name: '积分商城', }, }; From 6d762c5367f683ed2db76fcda4b696d8f7c715f3 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 28 Sep 2024 16:33:26 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E3=80=91=E7=A7=AF=E5=88=86=E5=95=86=E5=9F=8E=EF=BC=9A?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=B4=BB=E5=8A=A8=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/point.vue | 4 --- .../s-select-seckill-sku.vue | 28 ++++++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/pages/goods/point.vue b/pages/goods/point.vue index 0360766d..b49f7a21 100644 --- a/pages/goods/point.vue +++ b/pages/goods/point.vue @@ -277,10 +277,6 @@ color: #fff; line-height: normal; font-family: OPPOSANS; - - &::before { - font-size: 30rpx; - } } } diff --git a/sheep/components/s-select-seckill-sku/s-select-seckill-sku.vue b/sheep/components/s-select-seckill-sku/s-select-seckill-sku.vue index 99b28a50..dfaf875e 100644 --- a/sheep/components/s-select-seckill-sku/s-select-seckill-sku.vue +++ b/sheep/components/s-select-seckill-sku/s-select-seckill-sku.vue @@ -19,8 +19,11 @@ {{ state.goodsInfo.name }} - - {{ fen2yuan(state.selectedSku.price || state.goodsInfo.price) }} + + {{ getShowPriceText }} + + + ¥{{ fen2yuan(state.selectedSku.price || state.goodsInfo.price) }} @@ -92,12 +95,15 @@ import { computed, reactive, watch } from 'vue'; import sheep from '@/sheep'; import { convertProductPropertyList, fen2yuan } from '@/sheep/hooks/useGoods'; - import { min } from 'lodash-es'; + import { isEmpty, min } from 'lodash-es'; + import { PromotionActivityTypeEnum } from '@/sheep/util/const'; + const emits = defineEmits(['change', 'addCart', 'buy', 'close']); const props = defineProps({ modelValue: { type: Object, - default() {}, + default() { + }, }, show: { type: Boolean, @@ -114,7 +120,14 @@ selectedSku: {}, currentPropertyArray: [], }); - + 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 propertyList = convertProductPropertyList(state.goodsInfo.skus); // SKU 列表 const skuList = computed(() => { @@ -344,11 +357,6 @@ font-weight: 500; color: $red; font-family: OPPOSANS; - - &::before { - content: '¥'; - font-size: 24rpx; - } } .stock-text {