From 9faad6424eaf2687c67f60516a254260b55d2f92 Mon Sep 17 00:00:00 2001 From: Lcp <2767378157@qq.com> Date: Sat, 7 Sep 2024 17:25:46 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E5=95=86=E5=9F=8E=EF=BC=9A=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=95=86=E5=93=81=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=92=8C=E6=89=93=E5=8C=85=E5=90=8E=E5=AE=A2=E6=9C=8D?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E8=A1=A8=E6=83=85=E7=BC=BA=E5=A4=B1=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/promotion/kefu/components/KeFuMessageList.vue | 2 +- src/views/mall/promotion/kefu/components/tools/emoji.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/mall/promotion/kefu/components/KeFuMessageList.vue b/src/views/mall/promotion/kefu/components/KeFuMessageList.vue index bd1b9ce0..92f89646 100644 --- a/src/views/mall/promotion/kefu/components/KeFuMessageList.vue +++ b/src/views/mall/promotion/kefu/components/KeFuMessageList.vue @@ -86,7 +86,7 @@ diff --git a/src/views/mall/promotion/kefu/components/tools/emoji.ts b/src/views/mall/promotion/kefu/components/tools/emoji.ts index ff7a12e7..a71b1397 100644 --- a/src/views/mall/promotion/kefu/components/tools/emoji.ts +++ b/src/views/mall/promotion/kefu/components/tools/emoji.ts @@ -66,7 +66,7 @@ export const useEmoji = () => { ) for (const path in pathList) { const imageModule: any = await pathList[path]() - emojiPathList.value.push(imageModule.default) + emojiPathList.value.push({path: path, src: imageModule.default}) } } @@ -116,7 +116,8 @@ export const useEmoji = () => { function getEmojiFileByName(name: string) { for (const emoji of emojiList) { if (emoji.name === name) { - return emojiPathList.value.find((item: string) => item.indexOf(emoji.file) > -1) + const emojiPath = emojiPathList.value.find((item: {path:string,src:string}) => item.path.indexOf(emoji.file) > -1) + return emojiPath?emojiPath.src:undefined } } return false From ef56489d4667dda541e50e0dd64365a2e7899524 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 7 Sep 2024 19:04:07 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E5=95=86=E5=9F=8E=EF=BC=9A=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=95=86=E5=93=81=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=92=8C=E6=89=93=E5=8C=85=E5=90=8E=E5=AE=A2=E6=9C=8D?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E8=A1=A8=E6=83=85=E7=BC=BA=E5=A4=B1=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/promotion/kefu/components/KeFuMessageList.vue | 4 ++-- src/views/mall/promotion/kefu/components/tools/emoji.ts | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/views/mall/promotion/kefu/components/KeFuMessageList.vue b/src/views/mall/promotion/kefu/components/KeFuMessageList.vue index 92f89646..483fdc24 100644 --- a/src/views/mall/promotion/kefu/components/KeFuMessageList.vue +++ b/src/views/mall/promotion/kefu/components/KeFuMessageList.vue @@ -423,9 +423,9 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { // 消息气泡 .kefu-message { - color: #A9A9A9; + color: #a9a9a9; border-radius: 5px; - box-shadow: 3px 3px 5px rgba(220,220,220, 0.1); + box-shadow: 3px 3px 5px rgba(220, 220, 220, 0.1); padding: 5px 10px; width: auto; max-width: 50%; diff --git a/src/views/mall/promotion/kefu/components/tools/emoji.ts b/src/views/mall/promotion/kefu/components/tools/emoji.ts index a71b1397..0cbf95af 100644 --- a/src/views/mall/promotion/kefu/components/tools/emoji.ts +++ b/src/views/mall/promotion/kefu/components/tools/emoji.ts @@ -66,7 +66,7 @@ export const useEmoji = () => { ) for (const path in pathList) { const imageModule: any = await pathList[path]() - emojiPathList.value.push({path: path, src: imageModule.default}) + emojiPathList.value.push({ path: path, src: imageModule.default }) } } @@ -116,8 +116,10 @@ export const useEmoji = () => { function getEmojiFileByName(name: string) { for (const emoji of emojiList) { if (emoji.name === name) { - const emojiPath = emojiPathList.value.find((item: {path:string,src:string}) => item.path.indexOf(emoji.file) > -1) - return emojiPath?emojiPath.src:undefined + const emojiPath = emojiPathList.value.find( + (item: { path: string; src: string }) => item.path.indexOf(emoji.file) > -1 + ) + return emojiPath ? emojiPath.src : undefined } } return false From 3c34602483066372b4c9b4ad9ac272990bf05251 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 7 Sep 2024 19:14:34 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E5=95=86=E5=9F=8E=EF=BC=9A=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E8=A3=85=E4=BF=AE=E6=97=B6=EF=BC=8C=E2=80=9C=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E2=80=9D=E9=BB=98=E8=AE=A4=E4=B8=8D=E9=80=89?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DiyEditor/components/mobile/FloatingActionButton/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/DiyEditor/components/mobile/FloatingActionButton/index.vue b/src/components/DiyEditor/components/mobile/FloatingActionButton/index.vue index 19e42cb6..c2b99263 100644 --- a/src/components/DiyEditor/components/mobile/FloatingActionButton/index.vue +++ b/src/components/DiyEditor/components/mobile/FloatingActionButton/index.vue @@ -44,7 +44,7 @@ defineOptions({ name: 'FloatingActionButton' }) defineProps<{ property: FloatingActionButtonProperty }>() // 是否展开 -const expanded = ref(true) +const expanded = ref(false) // 处理展开/折叠 const handleToggleFab = () => { expanded.value = !expanded.value From d5f1e504955bd6e9a52eee7aee545a0acae7fc96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com> Date: Sun, 8 Sep 2024 11:15:53 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91=E5=95=86=E5=9F=8E=EF=BC=9A=E7=A7=92=E6=9D=80?= =?UTF-8?q?=E8=A3=85=E4=BF=AE=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/promotion/seckill/seckillActivity.ts | 6 + .../mobile/PromotionSeckill/config.ts | 42 ++- .../mobile/PromotionSeckill/index.vue | 256 ++++++++----- .../mobile/PromotionSeckill/property.vue | 84 ++++- .../seckill/components/SeckillShowcase.vue | 156 ++++++++ .../seckill/components/SeckillTableSelect.vue | 343 ++++++++++++++++++ 6 files changed, 771 insertions(+), 116 deletions(-) create mode 100644 src/views/mall/promotion/seckill/components/SeckillShowcase.vue create mode 100644 src/views/mall/promotion/seckill/components/SeckillTableSelect.vue diff --git a/src/api/mall/promotion/seckill/seckillActivity.ts b/src/api/mall/promotion/seckill/seckillActivity.ts index 4bb0e8b1..795a25b8 100644 --- a/src/api/mall/promotion/seckill/seckillActivity.ts +++ b/src/api/mall/promotion/seckill/seckillActivity.ts @@ -18,6 +18,7 @@ export interface SeckillActivityVO { singleLimitCount?: number stock?: number totalStock?: number + seckillPrice?: number products?: SeckillProductVO[] } @@ -43,6 +44,11 @@ export const getSeckillActivityPage = async (params) => { return await request.get({ url: '/promotion/seckill-activity/page', params }) } +// 查询拼团活动列表,基于活动编号数组 +export const getSeckillActivityListByIds = (ids: number[]) => { + return request.get({ url: `/promotion/seckill-activity/list-by-ids?ids=${ids}` }) +} + // 查询秒杀活动详情 export const getSeckillActivity = async (id: number) => { return await request.get({ url: '/promotion/seckill-activity/get?id=' + id }) diff --git a/src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts b/src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts index 800398be..022be92c 100644 --- a/src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts +++ b/src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts @@ -3,13 +3,21 @@ import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' /** 秒杀属性 */ export interface PromotionSeckillProperty { // 布局类型:单列 | 三列 - layoutType: 'oneCol' | 'threeCol' + layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol' // 商品字段 fields: { // 商品名称 name: PromotionSeckillFieldProperty + // 商品简介 + introduction: PromotionSeckillFieldProperty // 商品价格 price: PromotionSeckillFieldProperty + // 市场价 + marketPrice: PromotionSeckillFieldProperty + // 商品销量 + salesCount: PromotionSeckillFieldProperty + // 商品库存 + stock: PromotionSeckillFieldProperty } // 角标 badge: { @@ -18,6 +26,19 @@ export interface PromotionSeckillProperty { // 角标图片 imgUrl: string } + // 按钮 + btnBuy: { + // 类型:文字 | 图片 + type: 'text' | 'img' + // 文字 + text: string + // 文字按钮:背景渐变起始颜色 + bgBeginColor: string + // 文字按钮:背景渐变结束颜色 + bgEndColor: string + // 图片按钮:图片地址 + imgUrl: string + } // 上圆角 borderRadiusTop: number // 下圆角 @@ -25,10 +46,11 @@ export interface PromotionSeckillProperty { // 间距 space: number // 秒杀活动编号 - activityId: number + activityIds: number[] // 组件样式 style: ComponentStyle } + // 商品字段 export interface PromotionSeckillFieldProperty { // 是否显示 @@ -43,13 +65,23 @@ export const component = { name: '秒杀', icon: 'mdi:calendar-time', property: { - activityId: undefined, - layoutType: 'oneCol', + layoutType: 'oneColBigImg', fields: { name: { show: true, color: '#000' }, - price: { show: true, color: '#ff3000' } + introduction: { show: true, color: '#999' }, + price: { show: true, color: '#ff3000' }, + marketPrice: { show: true, color: '#c4c4c4' }, + salesCount: { show: true, color: '#c4c4c4' }, + stock: { show: false, color: '#c4c4c4' } }, badge: { show: false, imgUrl: '' }, + btnBuy: { + type: 'text', + text: '立即秒杀', + bgBeginColor: '#FF6000', + bgEndColor: '#FE832A', + imgUrl: '' + }, borderRadiusTop: 8, borderRadiusBottom: 8, space: 8, diff --git a/src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue b/src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue index fe092a03..3d34a3d4 100644 --- a/src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue +++ b/src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue @@ -1,135 +1,201 @@ - - + - + + + + + - - - - - - + + + + - - + + + {{ spu.introduction }} + + + + - {{ spu.name }} - - - - - ¥{{ fenToYuan(spu.seckillPrice || spu.price || 0) }} - - + ¥{{ fenToYuan(spu.price || Infinity) }} + + + ¥{{ fenToYuan(spu.marketPrice) }} + + + + + 已售{{ (spu.salesCount || 0) + (spu.virtualSalesCount || 0) }}件 + + + + 库存{{ spu.stock || 0 }} + + + + + + {{ property.btnBuy.text }} + + + + - + - - + diff --git a/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue b/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue index 306ec9b9..61287590 100644 --- a/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue +++ b/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue @@ -2,30 +2,31 @@ - - - - - + - - + + - + + + + + + + + + + + @@ -34,12 +35,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -47,10 +72,36 @@ - 建议尺寸:36 * 22 + 建议尺寸:36 * 22 + + + + 文字 + 图片 + + + + + + + + + + + + + + + + + 建议尺寸:56 * 56 + + + + () const emit = defineEmits(['update:modelValue']) const { formData } = usePropertyForm(props.modelValue, emit) // 活动列表 -const activityList = ref([]) +const activityList = ref([]) onMounted(async () => { const { list } = await SeckillActivityApi.getSeckillActivityPage({ status: CommonStatusEnum.ENABLE diff --git a/src/views/mall/promotion/seckill/components/SeckillShowcase.vue b/src/views/mall/promotion/seckill/components/SeckillShowcase.vue new file mode 100644 index 00000000..a924e8ca --- /dev/null +++ b/src/views/mall/promotion/seckill/components/SeckillShowcase.vue @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/mall/promotion/seckill/components/SeckillTableSelect.vue b/src/views/mall/promotion/seckill/components/SeckillTableSelect.vue new file mode 100644 index 00000000..3e4e67e9 --- /dev/null +++ b/src/views/mall/promotion/seckill/components/SeckillTableSelect.vue @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + 搜索 + + + + 重置 + + + + + + + + + + + handleCheckOne(checked, row, true)" + /> + + + + + + + + + + + + + + + + {{ formatDate(scope.row.startTime, 'YYYY-MM-DD') }} + ~ {{ formatDate(scope.row.endTime, 'YYYY-MM-DD') }} + + + + + + + + + + + + {{ formatSeckillPrice(scope.row.products) }} + + + + + + + + + + + + + + + + + 确 定 + 取 消 + + + + + From 25dff95fed9ce80684108a02a14be759be7470eb Mon Sep 17 00:00:00 2001 From: preschooler Date: Sun, 8 Sep 2024 14:26:22 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=F0=9F=90=9E=20fix:=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E4=BA=8C=E7=BA=A7=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/index.ts b/src/router/index.ts index 8f66ca31..b818421c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -5,7 +5,7 @@ import remainingRouter from './modules/remaining' // 创建路由实例 const router = createRouter({ - history: createWebHistory(), // createWebHashHistory URL带#,createWebHistory URL不带# + history: createWebHistory(import.meta.env.VITE_BASE_PATH), // createWebHashHistory URL带#,createWebHistory URL不带# strict: true, routes: remainingRouter as RouteRecordRaw[], scrollBehavior: () => ({ left: 0, top: 0 }) From 90656ddb51de48378eca30325bc735c6f6160375 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 8 Sep 2024 19:13:32 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E5=95=86=E5=9F=8E=EF=BC=9A=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E8=A3=85=E4=BF=AE=E6=97=B6=EF=BC=8C=E2=80=9C=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E2=80=9D=E9=BB=98=E8=AE=A4=E4=B8=8D=E9=80=89?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DiyEditor/components/mobile/ProductList/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/DiyEditor/components/mobile/ProductList/index.vue b/src/components/DiyEditor/components/mobile/ProductList/index.vue index adbd1b67..a51fc076 100644 --- a/src/components/DiyEditor/components/mobile/ProductList/index.vue +++ b/src/components/DiyEditor/components/mobile/ProductList/index.vue @@ -65,7 +65,7 @@