import http from "@/api"; // import qs from "qs"; const ARTICLE_CATEGORY = `/article/category`; //文章分类列表 export const getArticleClassListApi = (params: any) => { return http.get(`${ARTICLE_CATEGORY}/index`, params); }; //文章分类下拉框 export const getArticleClassApi = () => { return http.get(`/article/categorys`); }; //文章分类新增 export const getArticleClassAddSaveApi = (params: any) => { return http.post(`${ARTICLE_CATEGORY}/save`, params); }; //文章分类删除 export const getArticleClassDelApi = (params: any) => { return http.delete(`${ARTICLE_CATEGORY}/delete/${params}`); }; //文章分类更新(用于编辑后) export const getArticleClassEditUpApi = (params: any) => { const { id, name, sort, is_show, pid, seo_title, seo_keywords, seo_desc } = params; return http.put(`/article/category/update/${id}`, { name, sort, is_show, pid, seo_title, seo_keywords, seo_desc }); }; //文章分类详情(用于编辑) export const getArticleClassDetailsApi = (params: any) => { return http.get(`${ARTICLE_CATEGORY}/read/${params}`); }; export const getArticleClassSortApi = (params: any) => { const { id, sort } = params; return http.post(`${ARTICLE_CATEGORY}/sort/${id}`, { sort }); };