import http from "@/http/http.js";

let baseUrl = "/api/web/action/tmTools/springBoard";

// 获取selftmreg的尼斯查询 一级查询得到二级树  二级查询得到三级树
export function getNiceQueryCategory(nclcodeSCode) {
    return http.post(baseUrl, {
        actionBody: {
            nclcode: nclcodeSCode
        },
        actionType: "getNcl",
        requrl: "/action/tmTools/springBoard"
    });
}

// 获取selftmreg的尼斯查询分类过滤数据
export function getNiceQueryFilter(key, classCodes) {
    return http.post(baseUrl, {
        actionBody: {
            // name: "123", //Y strin 尼斯名称
            // ncls: ["01", "02", "03"] //N List 尼斯大类编码列表
            name: key, //Y strin 尼斯名称
            ncls: classCodes //N List 尼斯大类编码列表
        },
        actionType: "getNclByLikeNameAndNcl"
    });
}

//文字转图片
export function word2pic(word) {
    return http.post(baseUrl, {
        actionBody: {
            word: word
        },
        actionType: "word2pic"
    });
}
//获取oss
export function getOss() {
    return http.post(baseUrl, {
        actionBody: {},
        actionType: "getOssConfig"
    });
}

//商标样式转换
export function uploadStandardTm(url) {
    return http.post(baseUrl, {
        actionType: "uploadStandardTm",
        actionBody: {
            key: url
        }
    });
}

//企业近似查询
export function getCompanyInfoByLikeName(name) {
    return http.post(baseUrl, {
        actionType: "getCompanyInfoByLikeName",
        actionBody: {
            likestr: name
        }
    });
}

//图片转pdf
export function pic2pdf(url) {
    return http.post(baseUrl, {
        actionType: "pic2pdf",
        actionBody: {
            key: url
        }
    });
}

//企业注册信息查询
export function getEntregistryByCompanyName(name) {
    return http.post(baseUrl, {
        actionType: "getEntregistryByCompanyName",
        actionBody: {
            companyName: name
        }
    });
}