import request from '@/config/axios'
// 查询列表
export const getAreaPage = async (params) => {
  return await request.get({ url: '/admin-api/crm/area/page', params })
}

export const getAreaSimpleList = async (params) => {
  return await request.get({ url: '/admin-api/crm/area/simple-list', params })
}

// 查询详情
export const getArea = async (id) => {
  return await request.get({ url: '/admin-api/crm/area/get?id=' + id })
}

// 新增
export const createArea = async (data) => {
  return await request.post({
    url: '/admin-api/crm/area/create',
    data: data,
    isSubmitForm: true
  })
}

// 修改
export const updateArea = async (params) => {
  return await request.put({ url: '/admin-api/crm/area/update', data: params })
}

// 删除
export const deleteArea = async (id) => {
  return await request.delete({ url: '/admin-api/crm/area/delete?id=' + id })
}
