From 2dd654b3b30c2d10bb5ed132e8c3b0c3d3a7ad57 Mon Sep 17 00:00:00 2001 From: qiankunpingtai Date: Wed, 20 Mar 2019 16:48:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E7=94=A8=E6=88=B7=E7=9A=84id?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E8=8E=B7=E5=8F=96=E5=88=B0=EF=BC=8C=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=88=B0=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp_web/js/HoorayOS_mini/js/hros.app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) 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'];