import http from "@/http/http.js";
import axios from "axios";
// let baseUrl = "/api/web/action/enterpriseQuery/springBoard";

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

//获取企业域名信息数量
export function ipCountByAuthor(name) {
    return http.post(baseURL, {
        actionType: "ipCountByAuthor",
        actionBody: { author: name }
    });
}
//获取企业域名信息列表
export function ipListByAuthor(name, pageSize, currentPage) {
    return http.post(baseURL, {
        actionType: "ipListByAuthor",
        actionBody: {
            author: name, //公司名称
            page_size: pageSize,
            current_page: currentPage
        }
    });
}

//获取企业证照信息数量
export function licenseCountByAuthor(name) {
    return http.post(baseURL, {
        actionType: "licenseCountByAuthor",
        actionBody: {
            author: name //公司名称
        }
    });
}

//获取企业高薪信息数量
export function gxCountByAuthor(name) {
    return http.post(baseURL, {
        actionType: "gxCountByAuthor",
        actionBody: {
            author: name //公司名称
        }
    });
}

//获取企业的分支机构（从企查查获取）
export function getQccBranches(name) {
    return http.post(baseURL, {
        actionType: "getQccBranches",
        actionBody: { author: name }
    });
}

//获取企业高薪信息列表
export function gxListByAuthor(name, pageSize, currentPage) {
    return http.post(baseURL, {
        actionType: "gxListByAuthor",
        actionBody: {
            author: name, //公司名称
            page_size: pageSize,
            current_page: currentPage
        }
    });
}

//获取企业所有证照数量
export function getcountAll(name) {
    return http.post(baseURL, {
        actionType: "getcountAll",
        actionBody: {
            author: name //公司名称
        }
    });
}

//获取企业画像信息
export function companyportraitCtl(name) {
    return axios.post(
        "https://zhichan.gongsibao.com/web/companyportraitCtl/phonequery", { name: name }
    );
}

export function companynamequery(params) {
    return axios.post(
        "https://zhichan.gongsibao.com/web/companyportraitCtl/companynamequery",
        params
    );
}