diff --git a/src/api/mall/market/banner/index.ts b/src/api/mall/market/banner/index.ts index af96b8f9..ee65024c 100644 --- a/src/api/mall/market/banner/index.ts +++ b/src/api/mall/market/banner/index.ts @@ -6,31 +6,32 @@ export interface BannerVO { picUrl: string status: number url: string + position: number sort: number memo: string } // 查询Banner管理列表 export const getBannerPage = async (params) => { - return await request.get({ url: `/market/banner/page`, params }) + return await request.get({ url: `/promotion/banner/page`, params }) } // 查询Banner管理详情 export const getBanner = async (id: number) => { - return await request.get({ url: `/market/banner/get?id=` + id }) + return await request.get({ url: `/promotion/banner/get?id=` + id }) } // 新增Banner管理 export const createBanner = async (data: BannerVO) => { - return await request.post({ url: `/market/banner/create`, data }) + return await request.post({ url: `/promotion/banner/create`, data }) } // 修改Banner管理 export const updateBanner = async (data: BannerVO) => { - return await request.put({ url: `/market/banner/update`, data }) + return await request.put({ url: `/promotion/banner/update`, data }) } // 删除Banner管理 export const deleteBanner = async (id: number) => { - return await request.delete({ url: `/market/banner/delete?id=` + id }) + return await request.delete({ url: `/promotion/banner/delete?id=` + id }) } diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index 0d0d5b00..8ccd02a5 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -61,7 +61,6 @@ export interface Spu { createTime?: Date // 商品创建时间 status?: number // 商品状态 activityOrders: number[] // 活动排序 - giveCouponTemplates: GiveCouponTemplate[] // 优惠卷 } // 获得 Spu 列表 diff --git a/src/utils/dict.ts b/src/utils/dict.ts index fafee8f8..7534fb49 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -184,6 +184,7 @@ export enum DICT_TYPE { PROMOTION_CONDITION_TYPE = 'promotion_condition_type', // 营销的条件类型枚举 PROMOTION_BARGAIN_RECORD_STATUS = 'promotion_bargain_record_status', // 砍价记录的状态 PROMOTION_COMBINATION_RECORD_STATUS = 'promotion_combination_record_status', // 拼团记录的状态 + BANNER_POSITION = 'banner_position', // banner 定位 // ========== CRM - 客户管理模块 ========== CRM_RECEIVABLE_CHECK_STATUS = 'crm_receivable_check_status', diff --git a/src/views/mall/product/spu/form/ActivityOrdersSort.vue b/src/views/mall/product/spu/form/ActivityOrdersSort.vue index eb524860..3a41b3c5 100644 --- a/src/views/mall/product/spu/form/ActivityOrdersSort.vue +++ b/src/views/mall/product/spu/form/ActivityOrdersSort.vue @@ -54,6 +54,13 @@ const initSortable = () => { } onMounted(async () => { await nextTick() + // 如果活动排序为空也就是新增的时候加入活动 + if (props.activityOrders && props.activityOrders.length === 0) { + emit( + 'update:activityOrders', + props.promotionTypes.map((item) => item.value as number) + ) + } initSortable() }) diff --git a/src/views/mall/product/spu/form/OtherSettingsForm.vue b/src/views/mall/product/spu/form/OtherSettingsForm.vue index 42e61ba1..d574ae78 100644 --- a/src/views/mall/product/spu/form/OtherSettingsForm.vue +++ b/src/views/mall/product/spu/form/OtherSettingsForm.vue @@ -42,25 +42,12 @@ - - - - - {{ coupon.name }} - - 选择优惠券 - - @@ -91,17 +78,7 @@ {{ promotionTypes.find((item) => item.value === activityType)?.label }} - - -