// 注销 function loginOut() { doRefresh(null, "DCLOGIN", "clearUser", "", function (_data) { p.location.href = webHome + "/login.html"; }); } // 得到登录用户信息 function getLoginUser(userDiv, selMenu, pDiv, _fun) { var h = ""; //设置主页去向 $(".maindiv").width($(window).width() - $(".menudiv").width()); $(".maindiv").css("left", $(".menudiv").width()); $(".maindiv").show(); // $("#l_userid").html(" 用户id:" + p.thisLogUser.userId); // $("#l_usernick").html(" 用户姓名:" + p.thisLogUser.username); // $("#l_ulink").html(" 联系方式:" + p.thisLogUser.mobile); setMenuBar(selMenu, pDiv, p.menuList); let _h = ($(document).height() - $(".maindiv").height()) / 2; $(".maindiv").parent().append("
"); p.removeWait(); if (_fun != null) { _fun(); } //天气预报注释掉不要 //$(".bread-p iframe:first").attr("src", "http://tianqi.2345.com/plugin/widget/index.htm?s=3&z=1&t=0&v=0&d=2&bd=0&k=000000&f=&q=1&e=1&a=1&c=54511&w=524&h=28&align=center"); //$(".bread-p iframe:first").attr("src", "http://tianqi.2345.com/plugin/widget/index.htm?s=3&z=1&t=1&v=0&d=1&bd=0&k=&f=<f=009944&htf=cc0000&q=1&e=0&a=1&c=54511&w=317&h=28&align=center"); // reSetLocalTimeInte(_data.today, _data.time); // startMQTT(_data.mqtt); // removeWait(); } // 设置菜单 function setMenuBar(selMenu, pDiv) { var barDiv = "div_menu"; var h = ""; if (p.menuList != null) { // 顶层 //平台大数据先隐藏 20210715 //h += "
  • 大数据平台
  • "; for (var i = 0; i < p.menuList.length; i++) { var oneFM = p.menuList[i]; if(oneFM.isiframe) { //debugger h += "
  • 0 ? "" : "onclick='p.addWait(5000)'") + "> " + oneFM.name + (oneFM.sub.length > 0 ? " [" + oneFM.sub.length + "]" : "") + " " + (oneFM.sub.length > 0 ? "" : "") + " "; } else if (oneFM.func == null || oneFM.func == "") { h += "
  • 0 ? "" : "onclick='p.addWait(5000)'") + "> " + oneFM.name + (oneFM.sub.length > 0 ? " [" + oneFM.sub.length + "]" : "") + " " + (oneFM.sub.length > 0 ? "" : "") + " "; } else if (oneFM.openurl != null && oneFM.openurl != "") { h += "
  • " + oneFM.name + (oneFM.sub.length > 0 ? " [" + oneFM.sub.length + "]" : "") + " " + (oneFM.sub.length > 0 ? "" : "") + " "; } else { h += "
  • " + oneFM.name + (oneFM.sub.length > 0 ? " [" + oneFM.sub.length + "]" : "") + " " + (oneFM.sub.length > 0 ? "" : "") + " "; } if (oneFM.sub.length > 0) { h += ""; } } } $("#" + barDiv).html(h); //this.parent.$("#div_menu").html(h) // 处理当前的 thisMenuId = "m_" + selMenu; if (selMenu != null && selMenu != "") { $("#m_" + selMenu).addClass("active"); } else { $("#m_index").addClass("active"); } if (pDiv != null && pDiv != "") { $("#m_" + pDiv).addClass("active open"); $("#m_" + pDiv + " ul").addClass("show"); thisMenuId = "m_" + pDiv; } tempMenuId = thisMenuId; iniMenu(); } function iniMenu() { $(".open ul").addClass("show"); $(".dropdown-toggle").parent().bind("click", function () { var thisId = $(this).attr("id"); if (thisId != tempMenuId) { // 关闭当前的 $("#" + tempMenuId).removeClass("open"); $("#" + tempMenuId + " ul").removeClass("show"); $("#" + tempMenuId + " ul").addClass("hidden"); } tempMenuId = thisId; if ($("ul", this).hasClass("show")) { $(this).removeClass("open"); $("ul", this).removeClass("show"); $("ul", this).addClass("hidden"); } else { // 关闭的状态 $(this).addClass("open"); $("ul", this).addClass("show"); $("ul", this).removeClass("hidden"); } }); } function toParent(_html) { p.location.href = _html; }