import request from '@/utils/request'

// 根据条件查询 banner
export function getBanner(banner) {
  return request({
    url: '/banner/list',
    method: 'get',
    params: banner
  })
}

// 添加banner
export function addBanner(banner) {
  return request({
    url: '/banner',
    method: 'post',
    data: banner
  })
}

// 修改 banner
export function updateBanner(banner) {
  return request({
    url: '/banner',
    method: 'put',
    data: banner
  })
}

// 删除 banner, 批量[10,25,65]
export function deleteBanner(bannerId) {
  return request({
    url: '/banner',
    method: 'delete',
    data: bannerId
  })
}

// 根据bannerId 查询 banner
export function getByBannerId(bannerId) {
  return request({
    url: '/banner/' + bannerId,
    method: 'get'
  })
}

