Skip to content

Commit 7a6c694

Browse files
committed
Merge branch 'master' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into dev
2 parents 989e308 + 0db57da commit 7a6c694

File tree

13 files changed

+785
-126
lines changed

13 files changed

+785
-126
lines changed

src/api/mall/promotion/seckill/seckillActivity.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface SeckillActivityVO {
1818
singleLimitCount?: number
1919
stock?: number
2020
totalStock?: number
21+
seckillPrice?: number
2122
products?: SeckillProductVO[]
2223
}
2324

@@ -43,6 +44,11 @@ export const getSeckillActivityPage = async (params) => {
4344
return await request.get({ url: '/promotion/seckill-activity/page', params })
4445
}
4546

47+
// 查询秒杀活动列表,基于活动编号数组
48+
export const getSeckillActivityListByIds = (ids: number[]) => {
49+
return request.get({ url: `/promotion/seckill-activity/list-by-ids?ids=${ids}` })
50+
}
51+
4652
// 查询秒杀活动详情
4753
export const getSeckillActivity = async (id: number) => {
4854
return await request.get({ url: '/promotion/seckill-activity/get?id=' + id })

src/components/DiyEditor/components/mobile/FloatingActionButton/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ defineOptions({ name: 'FloatingActionButton' })
4444
defineProps<{ property: FloatingActionButtonProperty }>()
4545
4646
// 是否展开
47-
const expanded = ref(true)
47+
const expanded = ref(false)
4848
// 处理展开/折叠
4949
const handleToggleFab = () => {
5050
expanded.value = !expanded.value

src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@ import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
33
/** 秒杀属性 */
44
export interface PromotionSeckillProperty {
55
// 布局类型:单列 | 三列
6-
layoutType: 'oneCol' | 'threeCol'
6+
layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol'
77
// 商品字段
88
fields: {
99
// 商品名称
1010
name: PromotionSeckillFieldProperty
11+
// 商品简介
12+
introduction: PromotionSeckillFieldProperty
1113
// 商品价格
1214
price: PromotionSeckillFieldProperty
15+
// 市场价
16+
marketPrice: PromotionSeckillFieldProperty
17+
// 商品销量
18+
salesCount: PromotionSeckillFieldProperty
19+
// 商品库存
20+
stock: PromotionSeckillFieldProperty
1321
}
1422
// 角标
1523
badge: {
@@ -18,17 +26,31 @@ export interface PromotionSeckillProperty {
1826
// 角标图片
1927
imgUrl: string
2028
}
29+
// 按钮
30+
btnBuy: {
31+
// 类型:文字 | 图片
32+
type: 'text' | 'img'
33+
// 文字
34+
text: string
35+
// 文字按钮:背景渐变起始颜色
36+
bgBeginColor: string
37+
// 文字按钮:背景渐变结束颜色
38+
bgEndColor: string
39+
// 图片按钮:图片地址
40+
imgUrl: string
41+
}
2142
// 上圆角
2243
borderRadiusTop: number
2344
// 下圆角
2445
borderRadiusBottom: number
2546
// 间距
2647
space: number
2748
// 秒杀活动编号
28-
activityId: number
49+
activityIds: number[]
2950
// 组件样式
3051
style: ComponentStyle
3152
}
53+
3254
// 商品字段
3355
export interface PromotionSeckillFieldProperty {
3456
// 是否显示
@@ -43,13 +65,23 @@ export const component = {
4365
name: '秒杀',
4466
icon: 'mdi:calendar-time',
4567
property: {
46-
activityId: undefined,
47-
layoutType: 'oneCol',
68+
layoutType: 'oneColBigImg',
4869
fields: {
4970
name: { show: true, color: '#000' },
50-
price: { show: true, color: '#ff3000' }
71+
introduction: { show: true, color: '#999' },
72+
price: { show: true, color: '#ff3000' },
73+
marketPrice: { show: true, color: '#c4c4c4' },
74+
salesCount: { show: true, color: '#c4c4c4' },
75+
stock: { show: false, color: '#c4c4c4' }
5176
},
5277
badge: { show: false, imgUrl: '' },
78+
btnBuy: {
79+
type: 'text',
80+
text: '立即秒杀',
81+
bgBeginColor: '#FF6000',
82+
bgEndColor: '#FE832A',
83+
imgUrl: ''
84+
},
5385
borderRadiusTop: 8,
5486
borderRadiusBottom: 8,
5587
space: 8,

0 commit comments

Comments
 (0)