import request from '@/utils/request'

// 查询农资商城列表
export function listMall(query) {
  return request({
    url: '/base/mall/list',
    method: 'get',
    params: query
  })
}

// 查询农资商城详细
export function getMall(id) {
  return request({
    url: '/base/mall/' + id,
    method: 'get'
  })
}

// 新增农资商城
export function addMall(data) {
  return request({
    url: '/base/mall',
    method: 'post',
    data: data
  })
}


export function getCount(data) {
  return request({
    url: '/base/mall/getCount',
    method: 'post',
    data: data
  })
}

// 修改农资商城
export function updateMall(data) {
  return request({
    url: '/base/mall',
    method: 'put',
    data: data
  })
}

// 删除农资商城
export function delMall(id) {
  return request({
    url: '/base/mall/' + id,
    method: 'delete'
  })
}
