Skip to content

Commit a2091df

Browse files
YunaiVgitee-org
authored andcommitted
!537 【功能优化】拼团装修重构
Merge pull request !537 from 卢越/master
2 parents fd6fd9e + 4f941df commit a2091df

File tree

7 files changed

+792
-114
lines changed

7 files changed

+792
-114
lines changed

src/api/mall/promotion/combination/combinationActivity.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ export interface CombinationActivityVO {
1717
status?: number
1818
limitDuration?: number
1919
products: CombinationProductVO[]
20+
spuName?: string
21+
picUrl?: string
22+
marketPrice?: number
2023
}
2124

2225
// 拼团活动所需属性
@@ -45,6 +48,11 @@ export const getCombinationActivity = async (id: number) => {
4548
return await request.get({ url: '/promotion/combination-activity/get?id=' + id })
4649
}
4750

51+
// 查询拼团活动详情列表
52+
export const getCombinationActivityDetailList = (ids: number[]) => {
53+
return request.get({ url: `/promotion/combination-activity/list-by-ids?ids=${ids}` })
54+
}
55+
4856
// 新增拼团活动
4957
export const createCombinationActivity = async (data: CombinationActivityVO) => {
5058
return await request.post({ url: '/promotion/combination-activity/create', data })

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

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@ import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
33
/** 拼团属性 */
44
export interface PromotionCombinationProperty {
55
// 布局类型:单列 | 三列
6-
layoutType: 'oneCol' | 'threeCol'
6+
layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol'
77
// 商品字段
88
fields: {
99
// 商品名称
1010
name: PromotionCombinationFieldProperty
11+
// 商品简介
12+
introduction: PromotionCombinationFieldProperty
1113
// 商品价格
1214
price: PromotionCombinationFieldProperty
15+
// 市场价
16+
marketPrice: PromotionCombinationFieldProperty
17+
// 商品销量
18+
salesCount: PromotionCombinationFieldProperty
19+
// 商品库存
20+
stock: PromotionCombinationFieldProperty
1321
}
1422
// 角标
1523
badge: {
@@ -18,14 +26,27 @@ export interface PromotionCombinationProperty {
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
}
@@ -44,12 +65,23 @@ export const component = {
4465
name: '拼团',
4566
icon: 'mdi:account-group',
4667
property: {
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)