import http from '@/utils/http'

export function getIndexCarouselPageApi(pageIndex) {
  return http.get(`/operating/carousel/page?pageIndex=${pageIndex}`)
}

export function addIndexCarouselApi(body) {
  return http.post('/operating/carousel/add', body)
}

export function modifyIndexCarouselApi(body) {
  return http.put('/operating/carousel/modify', body)
}

export function deleteCarouselApi(id) {
  return http.delete(`/operating/carousel/${id}`)
}

export function enableCarouselApi(id) {
  return http.put(`/operating/carousel/enable/${id}`)
}

export function disableCarouselApi(id) {
  return http.put(`/operating/carousel/disable/${id}`)
}

export function getCarouselApi(id) {
  return http.get(`/operating/carousel/${id}`)
}

export function getIndexNoticePageApi(pageIndex) {
  return http.get(`/operating/notice/page?pageIndex=${pageIndex}`)
}

export function addIndexNoticeApi(body) {
  return http.post('/operating/notice/add', body)
}

export function modifyIndexNoticeApi(body) {
  return http.put('/operating/notice/modify', body)
}

export function deleteNoticeApi(id) {
  return http.delete(`/operating/notice/${id}`)
}

export function enableNoticeApi(id) {
  return http.put(`/operating/notice/enable/${id}`)
}

export function disableNoticeApi(id) {
  return http.put(`/operating/notice/disable/${id}`)
}

export function getNoticeApi(id) {
  return http.get(`/operating/notice/${id}`)
}
