From 2cf8d926d701794d2b3e0f97d827185773c64c92 Mon Sep 17 00:00:00 2001 From: zhouruiyu Date: Tue, 1 Nov 2016 16:01:00 +0800 Subject: [PATCH] change the logout function , make it ok. https://jira.open-o.org/browse/OCS-145 Change-Id: I064bc94b435e0254578b69a56aff14cf4001d92a Signed-off-by: zhouruiyu --- openo-portal/portal-common/src/main/webapp/common/default.html | 7 +++++++ openo-portal/portal-common/src/main/webapp/common/js/core/const.js | 2 +- .../portal-common/src/main/webapp/common/js/core/openoFrameWork.js | 3 +-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/openo-portal/portal-common/src/main/webapp/common/default.html b/openo-portal/portal-common/src/main/webapp/common/default.html index 643c5db1..498c0e17 100644 --- a/openo-portal/portal-common/src/main/webapp/common/default.html +++ b/openo-portal/portal-common/src/main/webapp/common/default.html @@ -227,6 +227,13 @@ jQuery(document).ready(function() { openoFrameWork.init(); $("#pageLoading").setToHide(); + $('#trigger_logout').click(function(){ + bootbox.confirm($.i18n.prop('com_zte_ums_ict_framework_ui_confirmlogout'), function(result) { //你确认要注销吗? + if(result){ + doLogout(); + } + }); + }); }); diff --git a/openo-portal/portal-common/src/main/webapp/common/js/core/const.js b/openo-portal/portal-common/src/main/webapp/common/js/core/const.js index 429f2d04..e022439e 100644 --- a/openo-portal/portal-common/src/main/webapp/common/js/core/const.js +++ b/openo-portal/portal-common/src/main/webapp/common/js/core/const.js @@ -36,7 +36,7 @@ FrameConst.REST_HEARTBEAT = "../../api/uiframe/v1/heartbeat"; FrameConst.REST_GETLICENSEINFO = "../../api/uiframe/v1/licensevalueinfo"; FrameConst.REST_CHECKRIGHT = "../../api/uiframe/v1/checkRight"; FrameConst.REST_LOGIN = "../../api/uiframe/v1/login"; -FrameConst.REST_LOGOUT = "../../api/uiframe/v1/loginOut?SSOAction=SSOLogout"; +FrameConst.REST_LOGOUT = "/openoui/common/logout.html"; FrameConst.REST_GET_FRAME_MENUDIRECTION = "../../api/uiframe/v1/confByKey?key=usf.mainframe.web.navigation.direction"; FrameConst.REST_GET_USERNAME = "../../api/uiframe/v1/userName"; diff --git a/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js b/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js index 95ea913e..0ce09df5 100644 --- a/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js +++ b/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js @@ -1952,7 +1952,7 @@ var openoFrameWork = function () { return "Already disabled!"; }; window.doLogout = function(){ - window.location=FrameConst.REST_LOGOUT; + top.window.document.location.href=FrameConst.REST_LOGOUT; }; //处理ict注销确认 $('#trigger_logout').click(function(){ @@ -3169,7 +3169,6 @@ var openoFrameWork = function () { return null; //返回参数值 } }; - }(); //抽取html片段中任意位置的script标签(包括代码是内嵌的情况)逐个运行(不会在单个script加载不到的时候停下来) -- 2.16.6