|
@@ -273,3 +273,51 @@ export const importExcel = (formData: FormData, storeId: string | number) => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+//获取人员配置列表(搜索用)
|
|
|
|
|
+export const getStaffConfigList = (params: any) => {
|
|
|
|
|
+ return httpApi.get(`/alienStore/storeStaffConfig/getStaffConfigList`, params);
|
|
|
|
|
+};
|
|
|
|
|
+// 设置置顶状态
|
|
|
|
|
+export const setTopStatus = (params: { id: string | number; topStatus: 0 | 1 }) => {
|
|
|
|
|
+ return httpApi.get(`/alienStore/storeStaffConfig/setTopStatus`, params);
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+//获取人员配置详情(查看详情用)
|
|
|
|
|
+export const getStaffConfigDetail = (params: any) => {
|
|
|
|
|
+ return httpApi.get(`/alienStore/storeStaffConfig/getStaffConfigDeatail`, params);
|
|
|
|
|
+};
|
|
|
|
|
+//创建标题
|
|
|
|
|
+export const createTitle = (params: any) => {
|
|
|
|
|
+ return httpApi.post(`/alienStore/storeStaffTitle/createTitle`, params);
|
|
|
|
|
+};
|
|
|
|
|
+//修改标题
|
|
|
|
|
+export const updateTitle = (params: any) => {
|
|
|
|
|
+ return httpApi.post(`/alienStore/storeStaffTitle/updateTitle`, params);
|
|
|
|
|
+};
|
|
|
|
|
+//获取标题列表
|
|
|
|
|
+export const getTitleList = (params: any) => {
|
|
|
|
|
+ return httpApi.get(`/alienStore/storeStaffTitle/getTitleList`, params, { loading: false }).catch((error: any) => {
|
|
|
|
|
+ // 静默处理错误,避免显示错误横幅
|
|
|
|
|
+ // 如果接口不存在(404),返回一个空数据格式,而不是抛出错误
|
|
|
|
|
+ if (error?.response?.status === 404 || error?.message?.includes("不存在")) {
|
|
|
|
|
+ return Promise.resolve({ code: 200, data: [], msg: "" });
|
|
|
|
|
+ }
|
|
|
|
|
+ // 其他错误也返回空数据,避免显示错误横幅
|
|
|
|
|
+ return Promise.resolve({ code: 200, data: [], msg: "" });
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+//获取标题详情(通过storeId查询)
|
|
|
|
|
+export const getTitleDetail = (params: any) => {
|
|
|
|
|
+ return httpApi.get(`/alienStore/storeStaffTitle/detail`, params, { loading: false }).catch((error: any) => {
|
|
|
|
|
+ // 静默处理错误,避免显示错误横幅
|
|
|
|
|
+ if (error?.response?.status === 404 || error?.message?.includes("不存在")) {
|
|
|
|
|
+ return Promise.resolve({ code: 200, data: null, msg: "" });
|
|
|
|
|
+ }
|
|
|
|
|
+ return Promise.resolve({ code: 200, data: null, msg: "" });
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+//删除标题
|
|
|
|
|
+export const deleteTitle = (params: any) => {
|
|
|
|
|
+ return httpApi.get(`/alienStore/storeStaffTitle/deleteTitle`, params);
|
|
|
|
|
+};
|