diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index 60248dd1..528d6acc 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -66,6 +66,7 @@ export interface Spu { deviceId?: number // 设备号 purchaseLimitType?: number // 限购类型:0-不限购,1-每天限购,2-每周限购,3-终身限购 purchaseLimitCount?: number // 限购数量 + hotRecommend?: boolean // 是否热门推荐(分页筛选:不传则不筛;传 true/false 精确匹配) } // 获得 Spu 列表 diff --git a/src/api/mall/promotion/discount/discountActivity.ts b/src/api/mall/promotion/discount/discountActivity.ts index e755c1bd..4934bd9f 100644 --- a/src/api/mall/promotion/discount/discountActivity.ts +++ b/src/api/mall/promotion/discount/discountActivity.ts @@ -5,6 +5,7 @@ export interface DiscountActivityVO { id?: number spuId?: number name?: string + picUrl?: string status?: number remark?: string startTime?: Date diff --git a/src/api/mall/promotion/ranking/index.ts b/src/api/mall/promotion/ranking/index.ts new file mode 100644 index 00000000..1fb0c5f7 --- /dev/null +++ b/src/api/mall/promotion/ranking/index.ts @@ -0,0 +1,64 @@ +import request from '@/config/axios' + +/** 榜单内商品(响应) */ +export interface RankingSpuResp { + id: number // 关联表主键 + spuId: number + sort: number +} + +/** 榜单详情/列表行 */ +export interface RankingRespVO { + id: number + title: string + subtitle?: string + iconUrl?: string + sort: number + status: number // 0 开启 1 关闭 + remark?: string + createTime?: string + spus: RankingSpuResp[] +} + +/** 提交时榜单商品项 */ +export interface RankingSpuItem { + spuId: number + sort: number +} + +export interface RankingCreateBody { + title: string + subtitle?: string + iconUrl?: string + sort: number + status: number + remark?: string + spus: RankingSpuItem[] +} + +export type RankingUpdateBody = RankingCreateBody & { id: number } + +/** 分页查询 */ +export const getRankingPage = async (params: any) => { + return await request.get({ url: '/promotion/ranking/page', params }) +} + +/** 详情 */ +export const getRanking = async (id: number) => { + return await request.get({ url: '/promotion/ranking/get', params: { id } }) +} + +/** 创建 */ +export const createRanking = async (data: RankingCreateBody) => { + return await request.post({ url: '/promotion/ranking/create', data }) +} + +/** 更新 */ +export const updateRanking = async (data: RankingUpdateBody) => { + return await request.put({ url: '/promotion/ranking/update', data }) +} + +/** 删除 */ +export const deleteRanking = async (id: number) => { + return await request.delete({ url: '/promotion/ranking/delete', params: { id } }) +} diff --git a/src/views/mall/product/spu/components/SkuList.vue b/src/views/mall/product/spu/components/SkuList.vue index b44ae47d..99783b91 100644 --- a/src/views/mall/product/spu/components/SkuList.vue +++ b/src/views/mall/product/spu/components/SkuList.vue @@ -25,16 +25,6 @@ v-for="(item, index) in tableHeaders" :key="index" :label="item.label" align="ce - - - - - -