import request from "@/api/request.js";

// 获取人物全局信息
/**
 * @param {personId} 
 * @header token
 */
export function getCharacterGlobalInfo(params) {
    return request({
        method: 'GET',
        url: `/api/personHomepage/summaryInfo/${params.personId}`,
        params,
    })
}

// 获取人物基本信息
/**
 * @param {personId} 
 * @header token
 */
export function getCharacterBasicInfo(params) {
    return request({
        method: 'GET',
        url: `/api/personHomepage/basicInfo/${params.personId}`,
        params,
    })
}

// 科技人物详情，获取领域观点
/**
 * @param {areaId} 
 * @header token
 */
export function getCharacterFieldView(params) {
    return request({
        method: 'GET',
        url: `/api/personHomepage/areaOptions/${params.areaId}`,
        params,
    })
}

// 获取最新动态
/**
 * @param {personId,cRelated,currentPage,pageSize} 
 * @header token
 */
export function getCharacterLatestDynamic(params) {
    return request({
        method: 'GET',
        url: `/api/personHomepage/dynamics/${params.personId}`,
        params,
    })
}

// 获取人物成果报告
/**
 * @param {personId,industryId,currentPage,pageSize,year} 
 * @header token
 */
export function getCharacterAchievementReport(params) {
    return request({
        method: 'GET',
        url: `/api/personHomepage/findingsReport/${params.personId}/${params.year}`,
        params,
    })
}

// 获取人物历史提案
/**
 * @param {personId,industryId,currentPage,pageSize} 
 * @header token
 */
export function getCharacterProposal(params) {
    return request({
        method: 'GET',
        url: `/api/personHomepage/historyBill/${params.personId}`,
        params,
    })
}

// 获取履历
/**
 * @param {personId} 
 * @header token
 */
export function getCharacterResume(params) {
    return request({
        method: 'GET',
        url: `/api/personHomepage/jobResume/${params.personId}`,
        params,
    })
}

// 获取观点
/**
 * @param {personId,year} 
 * @header token
 */
export function getCharacterView(params) {
    return request({
        method: 'GET',
        url: `/api/personHomepage/option/${params.personId}/${params.year}`,
        params,
    })
}

// 国会议员，获取资金来源
/**
 * @param {personId,year} 
 * @header token
 */
export function getCharacterFundSource(params) {
    return request({
        method: 'GET',
        url: `/api/personHomepage/personFunds/${params.personId}/${params.year}`,
        params,
    })
}

// 获取人物关系
/**
 * @param {personId} 
 * @header token
 */
export function getCharacterRelation(params) {
    return request({
        method: 'GET',
        url: `/api/personHomepage/personRelation/${params.personId}`,
        params,
    })
}

// 获取相关实体
/**
 * @param {personId,startTime} 
 * @header token
 */
export function getCharacterRelatedEntity(params) {
    return request({
        method: 'GET',
        url: `/api/personHomepage/personRelation/${params.personId}/${params.startTime}`,
        params,
    })
}