|
@@ -141,7 +141,7 @@ public class SceneApiController extends BaseController {
|
|
BeanUtils.copyProperties(dbUser,user);
|
|
BeanUtils.copyProperties(dbUser,user);
|
|
}
|
|
}
|
|
|
|
|
|
- sendResponse(user,webSite, response,sceneNum,lang,vlog);
|
|
|
|
|
|
+ sendResponse(user,webSite, request,response,sceneNum,lang,vlog);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -175,30 +175,35 @@ public class SceneApiController extends BaseController {
|
|
if(!SecurityUtil.MD5(password).equals(ssoUser.getPassword())) {
|
|
if(!SecurityUtil.MD5(password).equals(ssoUser.getPassword())) {
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3015, LoginConstant.FAILURE_MSG_3015);
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3015, LoginConstant.FAILURE_MSG_3015);
|
|
}
|
|
}
|
|
- sendResponse(ssoUser,webSite, response,sceneNum,lang,vlog);
|
|
|
|
|
|
+ sendResponse(ssoUser,webSite, request,response,sceneNum,lang,vlog);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- private void sendResponse(UserVo user, String webSite,
|
|
|
|
|
|
+ private void sendResponse(UserVo user, String webSite, HttpServletRequest request,
|
|
HttpServletResponse response, String sceneNum, String lang, String vlog) {
|
|
HttpServletResponse response, String sceneNum, String lang, String vlog) {
|
|
String token = loginService.redisLogin(user.getUserName(),JSONObject.toJSONString(user));
|
|
String token = loginService.redisLogin(user.getUserName(),JSONObject.toJSONString(user));
|
|
//登录成功
|
|
//登录成功
|
|
|
|
+ String mainUrl = NacosProperty.getMainUrl();
|
|
|
|
+ if(StringUtils.isBlank(mainUrl)){
|
|
|
|
+ mainUrl = request.getRemoteHost();
|
|
|
|
+ }
|
|
|
|
+
|
|
try {
|
|
try {
|
|
String redirect = null;
|
|
String redirect = null;
|
|
if(webSite.contains(sceneProUrl)){
|
|
if(webSite.contains(sceneProUrl)){
|
|
- redirect = NacosProperty.getMainUrl() + sceneProUrl.replace("show", "edit").replace("PC", "Mobile") +
|
|
|
|
|
|
+ redirect = mainUrl + sceneProUrl.replace("show", "edit").replace("PC", "Mobile") +
|
|
sceneNum + "&t=" +System.currentTimeMillis() + "&token=" + token + "&app" +
|
|
sceneNum + "&t=" +System.currentTimeMillis() + "&token=" + token + "&app" +
|
|
(lang == null ? "" : "&lang=" + lang) + (vlog == null ? "" : "&vlog=" + vlog);
|
|
(lang == null ? "" : "&lang=" + lang) + (vlog == null ? "" : "&vlog=" + vlog);
|
|
}
|
|
}
|
|
|
|
|
|
if(webSite.contains(sceneProV4Url)){
|
|
if(webSite.contains(sceneProV4Url)){
|
|
- redirect = NacosProperty.getMainUrl() + sceneProV4Url.replace("s", "e") +
|
|
|
|
|
|
+ redirect = mainUrl + sceneProV4Url.replace("s", "e") +
|
|
sceneNum + "&t=" +System.currentTimeMillis() + "&token=" + token + "&app" +
|
|
sceneNum + "&t=" +System.currentTimeMillis() + "&token=" + token + "&app" +
|
|
(lang == null ? "" : "&lang=" + lang) + (vlog == null ? "" : "&vlog=" + vlog);
|
|
(lang == null ? "" : "&lang=" + lang) + (vlog == null ? "" : "&vlog=" + vlog);
|
|
}
|
|
}
|
|
|
|
|
|
if(webSite.contains(sceneProNewUrl)) {
|
|
if(webSite.contains(sceneProNewUrl)) {
|
|
- redirect = NacosProperty.getMainUrl() + sceneProNewUrl.replace("s", "e") +
|
|
|
|
|
|
+ redirect = mainUrl + sceneProNewUrl.replace("s", "e") +
|
|
sceneNum + "&t=" + System.currentTimeMillis() + "&token=" + token + "&app" +
|
|
sceneNum + "&t=" + System.currentTimeMillis() + "&token=" + token + "&app" +
|
|
(lang == null ? "" : "&lang=" + lang) + (vlog == null ? "" : "&vlog=" + vlog);
|
|
(lang == null ? "" : "&lang=" + lang) + (vlog == null ? "" : "&vlog=" + vlog);
|
|
|
|
|