import ajax from './ajax'
import { LOCATION_URL } from '@/config/config'

// 1. 定义基础路径
// const BASE_URL = '/huiqicha'
const BASE_URL = LOCATION_URL

//新客登记首页
export const listByCustType = (params) => ajax(BASE_URL + `/system/record/listByCustType?pageSize=${params.pageSize}&pageNum=${params.pageNum}&custType=${params.custType}&keyword=${params.keyword}` , 'GET');
//详情
export const getRecordDetail = (id) => ajax(BASE_URL + `/system/record/${id}` , 'GET');
//修改
export const editRecord = (params) => ajax(BASE_URL + `/system/record/edit` ,params, 'PUT');
//新增
export const addRecord = (params) => ajax(BASE_URL + `/system/record/add` ,params, 'POST');
//预约
export const appointmentCust = (params) => ajax(BASE_URL + `/appointment/cust` ,params, 'POST');
//根据身份证查询信息
export const recordCustInfo = (params) => ajax(BASE_URL + `/system/record/custInfo?custType=${params.custType}&custId=${params.custId}` , 'GET');
//查询潜客登记列表
export const custLeadList = (params) => ajax(BASE_URL + `/cust/lead/list?pageSize=${params.pageSize}&pageNum=${params.pageNum}&custType=${params.custType}&keyword=${params.keyword}` , 'GET');
//查询潜客登记信息
export const custLeadSelect = (params) => ajax(BASE_URL + `/cust/lead/select?custId=${params.custId}` , 'GET');
//修改潜客开户状态
export const custLeadUpdateRegStatus = (params) => ajax(BASE_URL + `/cust/lead/update/reg/status?custId=${params.custId}` , 'GET');
//新增潜在客户信息
export const custLeadAdd = (params) => ajax(BASE_URL + `/cust/lead/add` ,params, 'POST');