import http from "@/api";
const PRODUCT_CATEGORY = `/product/category`;
//产品分类树接口
export const getProductCategoryListApi = (params: any) => {
    return http.get<any>(`${PRODUCT_CATEGORY}/index`, params);
};
//产品分类详情接口
export const getProductClassCategoryReadApi = (params: any) => {
    return http.get<any>(`${PRODUCT_CATEGORY}/read/${params}`);
};
//产品分类新增接口
export const getArticleCategorySaveApi = (params: any) => {
    return http.post<any>(`${PRODUCT_CATEGORY}/save`, params);
};
// 产品分类更新
export const getProductCategoryUpdateApi = (params: any) => {
    const { id } = params;
    return http.put<any>(`${PRODUCT_CATEGORY}/update/${id}`, params);
};
// 产品分类删除
export const getProductCategoryDelApi = (params: any) => {
    return http.delete<any>(`${PRODUCT_CATEGORY}/delete/${params}`);
};
//产品分类排序
export const getArticleCategorySortApi = (params: any) => {
    const { id, sort } = params;
    return http.post<any>(`${PRODUCT_CATEGORY}/sort/${id}`, { sort });
};
//成本系统
export const getProductClassTcoTreeApi = () => {
    return http.get<any>(`${PRODUCT_CATEGORY}/tco/tree`);
};

export const getProductClassCategoryShowApi = (params: any) => {
    return http.get<any>(`${PRODUCT_CATEGORY}/show/${params}`);
};
