import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/bizcustomer/` + url, ...arg)

/**
 * 客户Api接口管理器
 *
 * @author fanzherong
 * @date  2025/03/21 11:44
 **/
export default {
	// 获取客户分页
	bizCustomerPage(data) {
		return request('page', data, 'get')
	},
	// 提交客户表单 edit为true时为编辑，默认为新增
	bizCustomerSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除客户
	bizCustomerDelete(data) {
		return request('delete', data)
	},
	// 获取客户详情
	bizCustomerDetail(data) {
		return request('detail', data, 'get')
	}
}
