From 26ac0cf5f670ae36c93a6e52929fc9d7cd9af7aa Mon Sep 17 00:00:00 2001 From: shuzheng <469741414@qq.com> Date: Sun, 5 Feb 2017 23:37:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E7=82=B9=E7=99=BB=E5=BD=95=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E6=B2=A1=E6=9C=89=E5=9B=9E=E8=B7=B3=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E8=B7=B3=E8=BD=ACupms=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../upms/admin/controller/SSOController.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/zheng-upms/zheng-upms-server/src/main/java/com/zheng/upms/admin/controller/SSOController.java b/zheng-upms/zheng-upms-server/src/main/java/com/zheng/upms/admin/controller/SSOController.java index 33610c40..0d99551e 100644 --- a/zheng-upms/zheng-upms-server/src/main/java/com/zheng/upms/admin/controller/SSOController.java +++ b/zheng-upms/zheng-upms-server/src/main/java/com/zheng/upms/admin/controller/SSOController.java @@ -175,15 +175,20 @@ public class SSOController { // token校验值 RedisUtil.set(token, token, TIMEOUT); // 回调子系统 - String redirectUrl = backurl; - if (backurl.contains("?")) { - redirectUrl += "&token=" + token; + if (StringUtils.isEmpty(backurl)) { + result.put("result", true); + result.put("data", "/"); } else { - redirectUrl += "?token=" + token; + String redirectUrl = backurl; + if (backurl.contains("?")) { + redirectUrl += "&token=" + token; + } else { + redirectUrl += "?token=" + token; + } + _log.info("认证中心帐号通过,带token回跳:{}", redirectUrl); + result.put("result", true); + result.put("data", redirectUrl); } - _log.info("认证中心帐号通过,带token回跳:{}", redirectUrl); - result.put("result", true); - result.put("data", redirectUrl); return result; }