diff --git a/erp_web/js/HoorayOS_mini/js/hros.app.js b/erp_web/js/HoorayOS_mini/js/hros.app.js index 92b04ecb..77d8e313 100644 --- a/erp_web/js/HoorayOS_mini/js/hros.app.js +++ b/erp_web/js/HoorayOS_mini/js/hros.app.js @@ -15,6 +15,16 @@ HROS.app = (function(){ }, get : function(){ var userId = sessionStorage.getItem("userId"); + /** + * create by: qiankunpingtai + * create time: 2019/3/20 16:26 + * description: + *如果用户的id没有获取到,跳转到登录页面 + */ + if(userId==undefined||userId==null){ + top.location.href = "http://" + location.host + "/login.html"; + return; + } $.getJSON('../../app/findAppByUserId?userId=' + userId, function (sc) { HROS.VAR.dock = sc['dock']; HROS.VAR.desk = sc['desk'];