import request from "@/utils/request";
// 获取公钥
export function gongkey(data) {
    return request({
        url: "/user-boot/user/generateSm2Key",
        method: "get",
        params: data,
    });
}
// /安全测评增加token
export function heBeiToken(data) {
    return request({
        url: "/pqs-auth/judgeToken/heBei",
        method: "post",
        params: data,
    });
}
// /超高压嵌入token校验
export function productionManagementCheck(data) {
    return request({
        url: "/pqs-auth/judgeToken/productionManagementCheck",
        method: "post",
        params: data,
    });
}
//登录获取token
export function login(data) {
    return request({
        url: "/pqs-auth/oauth/token",
        method: "post",
        headers: {
            Authorization: "Basic bmpjbnRlc3Q6bmpjbnBxcw==", // 客户端信息加密摘要认证
            //'Authorization': 'Basic bmpjbjpuamNucHFz' // 客户端信息加密摘要认证
        },
        params: data,
    });
}
export function CodeSr() {
    return request({
        url: "/pqs-auth/auth/getImgCode",
        responseType: "blob",
        method: "get",
    });
}
export function getThemeColor() {
    return request({
        url: "/system-boot/theme/getTheme",
        method: "get",
    });
}
export function addtest(data) {
    return request({
        url: "/user/add",
        method: "post",
        params: data,
    });
}

export function getUserInfo(data) {
    return request({
        //url: '/user-boot/user/getUserInfo',usercon
        url: "/user-boot/user/getUserById",
        method: "get",
        params: data,
    });
}
export function logout() {
    return request({
        url: "/pqs-auth/oauth/logout",
        method: "delete",
    });
}
export function menulist() {
    return request({
        url: "/user-boot/function/getRouteMenu",
        method: "get",
    });
}
export function dictypeData() {
    return request({
        url: "/system-boot/dictType/dictDataCache",
        method: "get",
    });
}
export function getSysConfig() {
    return request({
        url: "/system-boot/config/getSysConfig",
        method: "get",
    });
}
export function userfunction() {
    return request({
        url: "/user-boot/function/userFunctionTree",
        method: "get",
    });
}
export function updateFirstPassword(userPasswordParam) {
    return request({
        // url:'/user-boot/user/updateFirstPassword?loginName='+data.loginName+"&newPassword="+data.newPassword,
        url: "/user-boot/user/updateFirstPassword",
        method: "put",
        data: userPasswordParam,
    });
}