import request from "../utils/request.js";

/**
 * get research list
 * @param params
 */
export const getResearchType = (params)=>{
    return request({
        url:'/research/getTopic',
        method: 'get',
        params,
    })
}
export const getResearchAuthorApi = ()=>{
    return request({
        url:'/research/getAuthor',
        method: 'post',
    })
}
/**
 * get research list
 * @param params
 * @return {*}
 */
export const getResearch = (params)=>{
    return request({
        url: '/research/getResearch',
        method: 'post',
        data: params,
        headers:{
            "Content-Type": 'multipart/form-data'
        }
    })
}

/**
 *
 */
export const getArticleDetail = (articleId)=>{
    return request({
        url: '/research/viewResearch',
        method: 'post',
        data: {
            research_id: articleId
        },
        headers:{
            "Content-Type": 'multipart/form-data'
        }
    })
}


export const searchTitleApi = (data)=>{
    return request({
        url: '/research/searchTitle',
        method: 'post',
        data,
        headers: {
            "Content-Type": 'multipart/form-data'
        }
    })
}

export const recommendResearchApi = (data)=>{
    return request({
        url: '/research/recommendResearch',
        method: 'post',
        data,
        headers: {
            "Content-Type": 'multipart/form-data'
        }
    })
}
