import request from '@/utils/request'

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

// 查询名片夹详细
export function getCardHolderInfo(id) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.cardHolderInfo',
      _mt: 'get',
      id: id
    }
  })
}

// 新增名片夹
export function addCardHolderInfo(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.cardHolderInfo',
      _mt: 'add',
      cardHolderInfo: data
    }
  })
}

// 修改名片夹
export function updateCardHolderInfo(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.cardHolderInfo',
      _mt: 'update',
      cardHolderInfo: data
    }
  })
}

// 删除名片夹
export function delCardHolderInfo(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.cardHolderInfo',
      _mt: 'delete',
      id: id
    }
  })
}

// 导出名片夹
export function exportCardHolderInfo(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.cardHolderInfo',
      _mt: 'export',
      ...query
    }
  })
}
