import request from '@/utils/request'

// 查询名片分类列表
export function listCardClassifyInfo(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.cardClassifyInfo',
      _mt: 'list',
      ...query
    }
  })
}

// 查询名片分类详细
export function getCardClassifyInfo(id) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.cardClassifyInfo',
      _mt: 'get',
      id: id
    }
  })
}

// 新增名片分类
export function addCardClassifyInfo(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.cardClassifyInfo',
      _mt: 'add',
      cardClassifyInfo: data
    }
  })
}

// 修改名片分类
export function updateCardClassifyInfo(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.cardClassifyInfo',
      _mt: 'update',
      cardClassifyInfo: data
    }
  })
}

// 删除名片分类
export function delCardClassifyInfo(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.cardClassifyInfo',
      _mt: 'delete',
      id: id
    }
  })
}

// 导出名片分类
export function exportCardClassifyInfo(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.cardClassifyInfo',
      _mt: 'export',
      ...query
    }
  })
}
