2023-10-21 02:40:20 +08:00
|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
export interface BannerVO {
|
|
|
|
id: number
|
|
|
|
title: string
|
|
|
|
picUrl: string
|
|
|
|
status: number
|
|
|
|
url: string
|
2023-10-24 16:10:55 +08:00
|
|
|
position: number
|
2023-10-21 02:40:20 +08:00
|
|
|
sort: number
|
|
|
|
memo: string
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询Banner管理列表
|
|
|
|
export const getBannerPage = async (params) => {
|
2023-10-24 16:10:55 +08:00
|
|
|
return await request.get({ url: `/promotion/banner/page`, params })
|
2023-10-21 02:40:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 查询Banner管理详情
|
|
|
|
export const getBanner = async (id: number) => {
|
2023-10-24 16:10:55 +08:00
|
|
|
return await request.get({ url: `/promotion/banner/get?id=` + id })
|
2023-10-21 02:40:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 新增Banner管理
|
|
|
|
export const createBanner = async (data: BannerVO) => {
|
2023-10-24 16:10:55 +08:00
|
|
|
return await request.post({ url: `/promotion/banner/create`, data })
|
2023-10-21 02:40:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 修改Banner管理
|
|
|
|
export const updateBanner = async (data: BannerVO) => {
|
2023-10-24 16:10:55 +08:00
|
|
|
return await request.put({ url: `/promotion/banner/update`, data })
|
2023-10-21 02:40:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 删除Banner管理
|
|
|
|
export const deleteBanner = async (id: number) => {
|
2023-10-24 16:10:55 +08:00
|
|
|
return await request.delete({ url: `/promotion/banner/delete?id=` + id })
|
2023-10-21 02:40:20 +08:00
|
|
|
}
|