import http from "@/api";
const PRODUCT = `product/category/recommend`;
// 列表
export const getRecommendationApi = (params: any) => {
    return http.get<any>(`${PRODUCT}/index`, params);
};
// 详情
export const getRecommendationDetailsApi = (params: any) => {
    return http.get<any>(`${PRODUCT}/read/${params}`);
};
// 删除
export const getRecommendationDelApi = (params: any) => {
    return http.delete<any>(`${PRODUCT}/delete/${params}`);
};
//新增

export const getRecommendationSaveApi = (params: any) => {
    return http.post<any>(`${PRODUCT}/save`, params, {
        headers: {
            "Content-Type": "application/x-www-form-urlencoded"
        }
    });
};
//更新
export const getRecommendationUpApi = (params: any) => {
    return http.put<any>(`${PRODUCT}/update/${params.id}`, params);
};

// 导出
export const getRecommendationUpExportApi = (params: any) => {
    return http.get<any>(`${PRODUCT}/export`, params, {
        responseType: "arraybuffer"
    });
};
