import http from "@/api";
const PRODUCT_BUYPASS = `/product/buypass`;
// 产品购买平台列表接口(下拉列表)
export const getProductPlatformsListApi = () => {
    return http.get<any>(`${PRODUCT_BUYPASS}/platforms`);
};
// 产品购买平台列表接口
export const getProductBuypassListApi = (params: any) => {
    return http.get<any>(`${PRODUCT_BUYPASS}/index`, params);
};
//导出
export const getProductBuypassListExportApi = (params: any) => {
    return http.get<any>(`${PRODUCT_BUYPASS}/export`, params, {
        responseType: "arraybuffer"
    });
};
//导入
export const getProductBuypassListImportApi = (params: any) => {
    return http.post<any>(`${PRODUCT_BUYPASS}/import`, params);
};
// 更新
export const getProductBuypassUpdateApi = (params: any) => {
    const { id, param } = params;
    return http.put<any>(`${PRODUCT_BUYPASS}/update/${id}`, param);
};

//新增
export const getProductBuypassListSaveApi = (params: any) => {
    return http.post<any>(`${PRODUCT_BUYPASS}/save`, params, {
        headers: {
            "Content-Type": "application/x-www-form-urlencoded"
        }
    });
};
