import request from '@/config/axios'

// 查询（精简)列表
export const getSimpleSourceList = async () => {
  return await request.get({ url: '/admin-api/crm/source/list' })
}

// 查询列表
export const getSourcePage = async (params) => {
  return await request.get({ url: '/admin-api/crm/source/list', params })
}

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

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

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

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