//document.write(""); document.write(""); function getRootPath() { var curPath = window.document.location.href; var pathName = window.document.location.pathname; var pos = curPath.indexOf(pathName); var localhostPath = curPath.substring(0, pos); return (localhostPath); //带项目名 //var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1); //return (localhostPath + projectName); } layui.use(['layer', 'jquery'], function () { var layer = parent.layer === undefined ? layui.layer : top.layer, $ = layui.$; //判断登录 if ($.cookie(".SessionCookie") == undefined || $.cookie(".SessionCookie") == null || $.cookie(".SessionCookie") == "null") { layer.msg("您未登录或登录超时请登录后使用,页面将在3秒后关闭!", { icon: 0 }); sessionStorage.removeItem('UserId'); sessionStorage.removeItem('UserName'); setTimeout(function () { window.location.href = "/"; }, 3000); return; } });