import request from '@/utils/request'

// 查询客服分页列表
export function listCustomerMember(query) {
  return request({
    url: '/app/cusrole/member/pageList',
    method: 'get',
    params: query
  })
}

// 新增客服
export function addCustomerMember(data) {
  return request({
    url: '/app/cusrole/member',
    method: 'post',
    data: data
  })
}

// 修改客服
export function updateCustomerMember(data) {
  return request({
    url: '/app/cusrole/member',
    method: 'put',
    data: data
  })
}

// 删除客服
export function delCustomerMember(ids) {
  return request({
    url: '/app/cusrole/member/' + ids,
    method: 'delete'
  })
}

// 同步销售（异步）
export function syncSalesCustomerMember() {
  return request({
    url: '/app/cusrole/member/syncSales',
    method: 'post'
  })
}

// 查询同步销售任务状态
export function getSyncSalesCustomerMemberStatus() {
  return request({
    url: '/app/cusrole/member/syncSales/status',
    method: 'get'
  })
}
