diff --git a/src/api/mall/promotion/reward/rewardActivity.ts b/src/api/mall/promotion/reward/rewardActivity.ts index 691db476..b5c75570 100644 --- a/src/api/mall/promotion/reward/rewardActivity.ts +++ b/src/api/mall/promotion/reward/rewardActivity.ts @@ -1,34 +1,37 @@ import request from '@/config/axios' -export interface DiscountActivityVO { +export interface RewardActivityVO { id?: number name?: string startTime?: Date endTime?: Date + startAndEndTime?: Date[] // 只前端使用 remark?: string conditionType?: number productScope?: number productSpuIds?: number[] - rules?: DiscountProductVO[] + rules?: RewardRule[] } // 优惠规则 -export interface DiscountProductVO { - limit: number - discountPrice: number - freeDelivery: boolean - point: number - couponIds: number[] - couponCounts: number[] +export interface RewardRule { + limit?: number + discountPrice?: number + freeDelivery?: boolean + givePoint?: boolean + point?: number + giveCoupon?: boolean + couponIds?: number[] + couponCounts?: number[] } // 新增满减送活动 -export const createRewardActivity = async (data: DiscountActivityVO) => { +export const createRewardActivity = async (data: RewardActivityVO) => { return await request.post({ url: '/promotion/reward-activity/create', data }) } // 更新满减送活动 -export const updateRewardActivity = async (data: DiscountActivityVO) => { +export const updateRewardActivity = async (data: RewardActivityVO) => { return await request.put({ url: '/promotion/reward-activity/update', data }) } diff --git a/src/views/mall/promotion/rewardActivity/RewardForm.vue b/src/views/mall/promotion/rewardActivity/RewardForm.vue index 9fb69a56..8bf14f3c 100644 --- a/src/views/mall/promotion/rewardActivity/RewardForm.vue +++ b/src/views/mall/promotion/rewardActivity/RewardForm.vue @@ -1,11 +1,11 @@ diff --git a/src/views/mall/promotion/rewardActivity/components/RewardRule.vue b/src/views/mall/promotion/rewardActivity/components/RewardRule.vue new file mode 100644 index 00000000..c119c0db --- /dev/null +++ b/src/views/mall/promotion/rewardActivity/components/RewardRule.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/src/views/mall/promotion/rewardActivity/index.vue b/src/views/mall/promotion/rewardActivity/index.vue index 4f6f8a60..55f30358 100644 --- a/src/views/mall/promotion/rewardActivity/index.vue +++ b/src/views/mall/promotion/rewardActivity/index.vue @@ -4,27 +4,27 @@ - 搜索 - 重置 + + + 搜索 + + + + 重置 + - 新增 + + 新增 @@ -62,47 +69,47 @@ - + - + - +