import request from '@/utils/request'

// 查询企微客户-绑CRM列表
export function listExternalContactCrm(query) {
  return request({
    url: '/qw/externalContactCrm/list',
    method: 'get',
    params: query
  })
}

// 查询企微客户-绑CRM详细
export function getExternalContactCrm(id) {
  return request({
    url: '/qw/externalContactCrm/' + id,
    method: 'get'
  })
}

// 新增企微客户-绑CRM
export function addExternalContactCrm(data) {
  return request({
    url: '/qw/externalContactCrm',
    method: 'post',
    data: data
  })
}

// 修改企微客户-绑CRM
export function updateExternalContactCrm(data) {
  return request({
    url: '/qw/externalContactCrm',
    method: 'put',
    data: data
  })
}

// 删除企微客户-绑CRM
export function delExternalContactCrm(id) {
  return request({
    url: '/qw/externalContactCrm/' + id,
    method: 'delete'
  })
}

// 导出企微客户-绑CRM
export function exportExternalContactCrm(query) {
  return request({
    url: '/qw/externalContactCrm/export',
    method: 'get',
    params: query
  })
}

// 客户旅程？ 获取绑定了CRM（CRM绑定了小程序）的企业微信客户的课程列表
export function getQwCrmCourseStudyList(query) {
  return request({
    url: '/qw/externalContactCrm/getQwCrmCourseStudyList',
    method: 'get',
    params: query
  })
}

// 查看客户课程旅程的某个客户的详情
export function getQwCrmCourseStudyDetail(query) {
  return request({
    url: '/qw/externalContactCrm/getQwCrmCourseStudyDetail',
    method: 'get',
    params: query
  })
}
