import http from "@/api";
///admin/v1/attachment/category/read/{id}
const ATT_C = `/attachment/category`;
// 下载分类分页列表
export const getCategoryListApi = (params: any) => {
    return http.get<any>(`${ATT_C}/index`, params);
};
//下载分类详情
export const getCategoryReadApi = (params: any) => {
    return http.get<any>(`${ATT_C}/read/${params}`);
};
//下载分类保存
export const getCategorySaveApi = (params: any) => {
    return http.post<any>(`${ATT_C}/save`, params);
};
//下载分类更新
export const getCategoryUpdateApi = (params: any) => {
    return http.put<any>(`${ATT_C}/update/${params.id}`, params);
};
//下载分类删除
export const getCategoryDelApi = (params: any) => {
    return http.delete<any>(`${ATT_C}/delete/${params}`);
};
//下载分类排序
export const getCategorySortApi = (params: any) => {
    return http.post<any>(`${ATT_C}/sort/${params.id}`, { sort: params.sort });
};
//下载分类下拉列表
export const getCategorysApi = (params?: any) => {
    return http.get<any>(`/attachment/tree`, params);
};
