import request from '@/utils/request'

// 查询企微活码列表
export function listContactWay(query) {
  return request({
    url: '/qw/contactWay/list',
    method: 'get',
    params: query
  })
}
export function sync(id) {
  return request({
    url: '/qw/contactWay/sync/' + id,
    method: 'get'
  })
}
export function informationList() {
  return request({
    url: '/qw/contactWay/informationList',
    method: 'get'
  })
}
export function statistics(query) {
  return request({
    url: '/qw/contactWay/statistics',
    method: 'get',
    params: query
  })
}
// 查询企微活码详细
export function getContactWay(id) {
  return request({
    url: '/qw/contactWay/' + id,
    method: 'get'
  })
}

// 新增企微活码
export function addContactWay(data) {
  return request({
    url: '/qw/contactWay',
    method: 'post',
    data: data
  })
}

// 修改企微活码
export function updateContactWay(data) {
  return request({
    url: '/qw/contactWay',
    method: 'put',
    data: data
  })
}

// 删除企微活码
export function delContactWay(id) {
  return request({
    url: '/qw/contactWay/' + id,
    method: 'delete'
  })
}

// 导出企微活码
export function exportContactWay(query) {
  return request({
    url: '/qw/contactWay/export',
    method: 'get',
    params: query
  })
}
