From 7cb2648ff0790eccb675e6c750782fc4856aab31 Mon Sep 17 00:00:00 2001 From: yangdj <18302547071@163> Date: Thu, 20 Oct 2022 16:22:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E9=99=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ibeetl/jlw/web/IndexController.java | 68 +++++++++++-------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/web/src/main/java/com/ibeetl/jlw/web/IndexController.java b/web/src/main/java/com/ibeetl/jlw/web/IndexController.java index 23cb8960..8f086514 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/IndexController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/IndexController.java @@ -663,10 +663,15 @@ public class IndexController { } ModelAndView view = new ModelAndView("/login.html"); view.addObject("uSystem", new UniversitiesCollegesJurisdictionExperimentalSystem()); +// try { +// response.sendRedirect("http://localhost:8080/Login"); +// } catch (IOException e) { +// e.printStackTrace(); +// } return view; } -// @PostMapping("/login.json") + @PostMapping("/login.json") @ResponseBody public JsonResult login(String code, String password, Integer type, Long typeId) { UniversitiesCollegesJurisdictionExperimentalSystem uSystem = new UniversitiesCollegesJurisdictionExperimentalSystem(); @@ -690,7 +695,7 @@ public class IndexController { info.setCurrentOrg(currentOrg); if(null != user && !"JT_S_01".equals(user.getJobType1()) ){//非管理员 - if(null != type && null != typeId){ +// if(null != type && null != typeId){ UniversitiesColleges universitiesColleges = universitiesCollegesService.getByOrgId(user.getOrgId()); if(null != universitiesColleges && ((Integer)1).equals(universitiesColleges.getUniversitiesCollegesStatus())){ uSystem.setUniversitiesCollegesId(universitiesColleges.getUniversitiesCollegesId()); @@ -744,8 +749,8 @@ public class IndexController { }else { return JsonResult.failMessage("登录失败,此院校不存在"); } - } - return JsonResult.failMessage("登录失败,没有此系统权限"); +// } +// return JsonResult.failMessage("登录失败,没有此系统权限"); }else { // 记录登录信息到session this.platformService.setLoginUser(info.getUser(), info.getCurrentOrg(), info.getOrgs(), uSystem); @@ -753,7 +758,7 @@ public class IndexController { return JsonResult.success(); } - @PostMapping("/login.json") +// @PostMapping("/login.json") @ResponseBody public JsonResult login2(String code, String password) { UserLoginInfo info = null; @@ -809,7 +814,12 @@ public class IndexController { //判断是老师还是学生 if(null != student){//学生 try { - String redirectUrl = request.getHeader("Referer").substring(0,request.getHeader("Referer").indexOf("/server")); + String redirectUrl = ""; + if(request.getHeader("Referer").contains("/server")){ + redirectUrl = request.getHeader("Referer").substring(0,request.getHeader("Referer").indexOf("/server")); + }else { + redirectUrl = request.getHeader("Referer").substring(0,request.getHeader("Referer").indexOf("/Login")); + } String token = getToken(request); @@ -827,29 +837,31 @@ public class IndexController { if(ApplicationRunnerController.isOnline){ //TODO 根据 uSystem 跳不同的页面 - if(uSystem.getTypeId().toString().equals("1")){ //大数据基础 子应用 - response.sendRedirect(redirectUrl+"/studentEnd_dsj/index.html"); - }else if(uSystem.getTypeId().toString().equals("2")){ //金融大数据 子应用 - response.sendRedirect(redirectUrl+"/studentEnd_jr/index.html"); - }else if(uSystem.getTypeId().toString().equals("3")){ //财会大数据 子应用 - response.sendRedirect(redirectUrl+"/studentEnd_ch/index.html"); - }else if(uSystem.getTypeId().toString().equals("4")){ //商业大数据 子应用 - response.sendRedirect(redirectUrl+"/studentEnd_sy/index.html"); - }else if(uSystem.getTypeId().toString().equals("5")){ //营销大数据 子应用 - response.sendRedirect(redirectUrl+"/studentEnd_yx/index.html"); - } + response.sendRedirect(redirectUrl+"Home"); +// if(uSystem.getTypeId().toString().equals("1")){ //大数据基础 子应用 +// response.sendRedirect(redirectUrl+"/studentEnd_dsj/index.html"); +// }else if(uSystem.getTypeId().toString().equals("2")){ //金融大数据 子应用 +// response.sendRedirect(redirectUrl+"/studentEnd_jr/index.html"); +// }else if(uSystem.getTypeId().toString().equals("3")){ //财会大数据 子应用 +// response.sendRedirect(redirectUrl+"/studentEnd_ch/index.html"); +// }else if(uSystem.getTypeId().toString().equals("4")){ //商业大数据 子应用 +// response.sendRedirect(redirectUrl+"/studentEnd_sy/index.html"); +// }else if(uSystem.getTypeId().toString().equals("5")){ //营销大数据 子应用 +// response.sendRedirect(redirectUrl+"/studentEnd_yx/index.html"); +// } }else { - if(uSystem.getTypeId().toString().equals("1")){ //大数据基础 子应用 - response.sendRedirect("http://localhost:8080/studentEnd_dsj/index.html"); - }else if(uSystem.getTypeId().toString().equals("2")){ //金融大数据 子应用 - response.sendRedirect("http://localhost:8080/studentEnd_jr/index.html"); - }else if(uSystem.getTypeId().toString().equals("3")){ //财会大数据 子应用 - response.sendRedirect("http://localhost:8080/studentEnd_ch/index.html"); - }else if(uSystem.getTypeId().toString().equals("4")){ //商业大数据 子应用 - response.sendRedirect("http://localhost:8080/studentEnd_sy/index.html"); - }else if(uSystem.getTypeId().toString().equals("5")){ //营销大数据 子应用 - response.sendRedirect("http://localhost:8080/studentEnd_yx/index.html"); - } + response.sendRedirect("http://localhost:8080/Home"); +// if(uSystem.getTypeId().toString().equals("1")){ //大数据基础 子应用 +// response.sendRedirect("http://localhost:8080/studentEnd_dsj/index.html"); +// }else if(uSystem.getTypeId().toString().equals("2")){ //金融大数据 子应用 +// response.sendRedirect("http://localhost:8080/studentEnd_jr/index.html"); +// }else if(uSystem.getTypeId().toString().equals("3")){ //财会大数据 子应用 +// response.sendRedirect("http://localhost:8080/studentEnd_ch/index.html"); +// }else if(uSystem.getTypeId().toString().equals("4")){ //商业大数据 子应用 +// response.sendRedirect("http://localhost:8080/studentEnd_sy/index.html"); +// }else if(uSystem.getTypeId().toString().equals("5")){ //营销大数据 子应用 +// response.sendRedirect("http://localhost:8080/studentEnd_yx/index.html"); +// } } }catch (Exception e){ e.printStackTrace();