import http from "@/api";
const QA = `/faq`;
//列表
export const getQAListApi = (params: any) => {
    return http.get<any>(`${QA}/index`, params);
};
//详情
export const getQAListDetailsApi = (params: any) => {
    return http.get<any>(`${QA}/read/${params}`);
};
//删除
export const getQAListDelApi = (params: any) => {
    return http.delete<any>(`${QA}/delete/${params}`);
};

//更新
export const getQAListEditUpApi = (params: any) => {
    const { id } = params;
    return http.put<any>(`${QA}/update/${id}`, params);
};

//新增
export const getQAListSaveApi = (params: any) => {
    return http.post<any>(`${QA}/save`, params);
};
//排序
export const getQASortApi = (params: any) => {
    return http.post<any>(`${QA}/sort/${params.id}`, { sort: params.sort });
};
