import request from '@/utils/request'

// 查询轮播图列表
export function listMallBanner(query) {
  return request({
    url: '/mall/mallBanner/list',
    method: 'get',
    params: query
  })
}

// 查询轮播图详细
export function getMallBanner(id) {
  return request({
    url: '/mall/mallBanner/' + id,
    method: 'get'
  })
}

// 新增轮播图
export function addMallBanner(data) {
  return request({
    url: '/mall/mallBanner',
    method: 'post',
    data: data
  })
}

// 修改轮播图
export function updateMallBanner(data) {
  return request({
    url: '/mall/mallBanner',
    method: 'put',
    data: data
  })
}

// 删除轮播图
export function delMallBanner(id) {
  return request({
    url: '/mall/mallBanner/' + id,
    method: 'delete'
  })
}

// 导出轮播图
export function exportMallBanner(query) {
  return request({
    url: '/mall/mallBanner/export',
    method: 'get',
    params: query
  })
}