import request from '@/config/axios'

// 线索获取规则
export const getClueGainRuleList = () => {
  return request.get({ url: '/admin-api/crm/sch-clue-gain-rule/list' })
}

// 删除
export const deleteClueGainRule = (id) => {
  return request.delete({ url: `/admin-api/crm/sch-clue-gain-rule/delete?id=${id}` })
}

// 线索获取规则保存
export const saveClueGainRule = (data) => {
  return request.put({ url: '/admin-api/crm/sch-clue-gain-rule/batchUpdate', data })
}

// 线索规则
export const getClueDistributeRuleByUser = (params) => {
  return request.get({ url: '/admin-api/crm/sch-clue-distribution-rule/queryByUserId', params })
}

// 删除
export const deleteClueDistributeRule = (id) => {
  return request.delete({ url: `/admin-api/crm/sch-clue-gain-rule/delete?id=${id}` })
}
