storeConfig.ts
1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* 4S 店配置 —— 源 src/api/usedCarManagement.js 的同名接口,路径 / method 逐字保留。
*
* 请求统一经 ../core/client 的 @uj/api-core 装配后由主壳 props.request 代发;
* 源系统没有 DTO 定义,这里不臆造结构:参数是一层平铺对象,返回类型由调用方泛型指定。
*/
import { usedcarClient } from '../core/client';
import type { UsedcarParams } from '../core/types';
/**
* 4S店配置分页
*/
export function getStoreConfigPage<T = unknown>(data: UsedcarParams = {}) {
return usedcarClient.post<T>('/storeConfig/page', data);
}
/**
* 一客一群 - 总部定价师列表
*/
export function getPricingStaffList<T = unknown>(data: UsedcarParams = {}) {
return usedcarClient.post<T>('/staff/pricingStaff/list', data);
}
/**
* 一客一群 - 4S店配置新增
*/
export function addStoreConfig<T = unknown>(data: UsedcarParams = {}) {
return usedcarClient.post<T>('/storeConfig/create', data, { returnAll: true });
}
/**
* 一客一群 - 4S店配置编辑
*/
export function updateStoreConfig<T = unknown>(data: UsedcarParams = {}) {
return usedcarClient.post<T>('/storeConfig/edit', data, { returnAll: true });
}
/**
* 一客一群 - 4S店配置删除
*/
export function deleteStoreConfig<T = unknown>(data: UsedcarParams = {}) {
return usedcarClient.post<T>('/storeConfig/delete', data, { returnAll: true });
}
/** 模块单例出口,与 dashboardApi 同一调用面;实现与上方具名函数完全同源。 */
export const storeConfigApi = {
getStoreConfigPage,
getPricingStaffList,
addStoreConfig,
updateStoreConfig,
deleteStoreConfig,
};