فهرست منبع

机构画像新后台跳转

huangzhiguo 2 سال پیش
والد
کامیت
de49eba9aa

+ 12 - 2
src/main/java/com/caimei/modules/user/web/jumpLink.java

@@ -1,12 +1,17 @@
 package com.caimei.modules.user.web;
 
 import com.thinkgem.jeesite.common.config.Global;
+import lombok.extern.slf4j.Slf4j;
+import org.owasp.encoder.Encode;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
 
 /**
  * Description
@@ -14,6 +19,7 @@ import javax.servlet.http.HttpServletResponse;
  * @author : Charles
  * @date : 2023/3/24
  */
+@Slf4j
 @Controller
 @RequestMapping(value = "${adminPath}/user/jumpLink")
 public class jumpLink {
@@ -21,8 +27,12 @@ public class jumpLink {
     @RequestMapping("/toOldAdmin")
     public String link(Integer type , Integer clubId, String clubName, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
         if (type == 1) {
-            String path = Global.getAdminPath();
-            return "redirect:" + Global.getAdminPath() + "/new/user/agency/clubPortrait?clubID="+clubId+"&clubName="+clubName+"&dateType=0&type=4";
+            log.info("clubName======"+clubName);
+            try {
+                return "redirect:" + Global.getAdminPath() + "/new/user/agency/clubPortrait?clubID="+clubId+"&clubName="+URLEncoder.encode(clubName, "UTF-8").toString()+"&dateType=0&type=4";
+            } catch (UnsupportedEncodingException e) {
+                e.printStackTrace();
+            }
         }
         return "redirect:"+ Global.getAdminPath()+"/new/user/agency/list";
     }

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordList.jsp

@@ -201,7 +201,7 @@
     function getNewManager() {
         var link = "";
         $.get("${ctx}/jump/link", function (data) {
-            link = "https://manager.caimei365.com/#/user/record/list?token=" + data;
+            link = "https://manager.caimei365.com/#/user/record-list?token=" + data;
             window.open(link, "_blank");
         });
     }