import request from '@/config/axios'

export interface ContentCarouseVO {
  id: number
  carouseName: string
  link: string
  sort: number
  linkTo: string
  status: number
}

// 查询轮播图列表
export const getContentCarousePage = async (params) => {
  return await request.get({ url: `/member/content-carouse/page`, params })
}

// 查询轮播图详情
export const getContentCarouse = async (id: number) => {
  return await request.get({ url: `/member/content-carouse/get?id=` + id })
}

// 新增轮播图
export const createContentCarouse = async (data: ContentCarouseVO) => {
  return await request.post({ url: `/member/content-carouse/create`, data })
}

// 修改轮播图
export const updateContentCarouse = async (data: ContentCarouseVO) => {
  return await request.put({ url: `/member/content-carouse/update`, data })
}

// 删除轮播图
export const deleteContentCarouse = async (id: number) => {
  return await request.delete({ url: `/member/content-carouse/delete?id=` + id })
}

// 导出轮播图 Excel
export const exportContentCarouse = async (params) => {
  return await request.download({ url: `/member/content-carouse/export-excel`, params })
}
