import http from "@/http/http.js";
let baseURL = "";
if (process.env.NODE_ENV == 'development') {//开发环境
    baseURL = '/api/web/action/patentQuery/springBoard';
} else if (process.env.NODE_ENV == 'production') {//生产环境
    baseURL = '/web/action/patentQuery/springBoard';
}

// let baseUrl = "/api/web/action/patentQuery/springBoard";
//根据申请人获取专利量接口
export function paCountByApplicantName(name) {
    return http.post(baseURL, {
        actionType: "paCountByApplicantName",
        actionBody: {
            applicant_name: name //公司名称
        }
    });
}

//根据申请人获取专利详情列表
export function paShortListByApplicantName(name, pageSize, currentPage) {
    return http.post(baseURL, {
        actionType: "paShortListByApplicantName",
        actionBody: {
            applicant_name: name, //公司名称
            page_size: pageSize,
            current_page: currentPage
        }
    });
}

//根据公司名称得到软件著作权数量
export function softwareCountByAuthor(name) {
    return http.post(baseURL, {
        actionType: "softwareCountByAuthor",
        actionBody: {
            author: name
        }
    });
}

//根据公司名称得到软件著作权详情
export function softwareListByAuthor(name) {
    return http.post(baseURL, {
        actionType: "softwareListByAuthor",
        actionBody: {
            author: name, //公司名称
            page_size: 1000,
            current_page: 1
        }
    });
}

//根据公司名称得到著作权量
export function worksCountByAuthor(name) {
    return http.post(baseURL, {
        actionType: "worksCountByAuthor",
        actionBody: {
            author: name //公司名称
        }
    });
}

//根据公司名称得到著作权详情
export function worksListByAuthor(name) {
    return http.post(baseURL, {
        actionType: "worksListByAuthor",
        actionBody: {
            author: name, //公司名称
            page_size: 1000,
            current_page: 1
        }
    });
}