import request from '@/utils/request'

// 查询客户列表
export function listDkCustomer(query) {
  return request({
    url: '/dk/dkCustomer/list',
    method: 'get',
    params: query
  })
}

// 查询客户详细
export function getDkCustomer(id) {
  return request({
    url: '/dk/dkCustomer/' + id,
    method: 'get'
  })
}

// 用户密码重置
export function resetCustomerPwd(customerId, password) {
  const data = {
    customerId,
    password
  }
  return request({
    url: '/dk/dkCustomer/resetPwd',
    method: 'post',
    data: data
  })
}


// 修改客户
export function updateDkCustomer(data) {
  return request({
    url: '/dk/dkCustomer',
    method: 'put',
    data: data
  })
}

// 删除客户
export function delDkCustomer(id) {
  return request({
    url: '/dk/dkCustomer/' + id,
    method: 'delete'
  })
}

// 导出客户
export function exportDkCustomer(query) {
  return request({
    url: '/dk/dkCustomer/export',
    method: 'get',
    params: query
  })
}

export function loginOut(id) {
  return request({
    url: '/dk/dkCustomer/loginOut',
    method: 'post',
    data: {id:id}
  })
}
