import request from '@/utils/request'

export function getCustomerList(data) {
  return request({
    url: '/app-api/ecw/admin-client/page',
    method: 'get',
    params: data
  })
}

export function getCustomer(data) {
  return request({
    url: '/app-api/ecw/admin-client/get',
    method: 'get',
    params: data
  })
}

export function createCustomer(data) {
  return request({
    url: '/app-api/ecw/admin-client/create',
    method: 'post',
    data
  })
}

export function updateCustomer(data) {
  return request({
    url: '/app-api/ecw/admin-client/update',
    method: 'put',
    data
  })
}

export function deleteCustomer(data) {
  return request({
    url: '/app-api/ecw/admin-client/delete?id=' + data,
    method: 'delete'
  })
}

export function getGroupList(data) {
  return request({
    url: '/app-api/ecw/admin-client-type/page',
    method: 'get',
    params: data
  })
}

export function getGroup(data) {
  return request({
    url: '/app-api/ecw/admin-client-type/get',
    method: 'get',
    params: data
  })
}

export function createGroup(data) {
  return request({
    url: '/app-api/ecw/admin-client-type/create',
    method: 'post',
    data
  })
}

export function updateGroup(data) {
  return request({
    url: '/app-api/ecw/admin-client-type/update',
    method: 'put',
    data
  })
}

export function deleteGroup(data) {
  return request({
    url: '/app-api/ecw/admin-client-type/delete?id=' + data,
    method: 'delete'
  })
}
