Commit a294002e by 魏文甫

update

1 parent 1432cbfc
...@@ -6,6 +6,7 @@ import com.server.utils.weixin.WeixinBaseUtil; ...@@ -6,6 +6,7 @@ import com.server.utils.weixin.WeixinBaseUtil;
import com.server.web.common.mapper.TKzyUserMapper; import com.server.web.common.mapper.TKzyUserMapper;
import com.server.web.common.model.TKzyUser; import com.server.web.common.model.TKzyUser;
import com.server.web.common.model.TKzyUserExample; import com.server.web.common.model.TKzyUserExample;
import jodd.util.URLDecoder;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -178,9 +179,12 @@ public class WeixinIndexController extends BaseController{ ...@@ -178,9 +179,12 @@ public class WeixinIndexController extends BaseController{
} }
public static void main(String[] args) { public static void main(String[] args) {
String urlTicket = "http://kzy-wx.jimijiayuan.cn/home?shareFlag=true";
urlTicket = urlTicket.substring(0,urlTicket.indexOf("?")); System.out.println(URLDecoder.decode("http%3A%2F%2Fkzy-wx-1.jimijiayuan.cn%2Fhome"));
System.out.println(urlTicket);
// String urlTicket = "http://kzy-wx.jimijiayuan.cn/home?shareFlag=true";
// urlTicket = urlTicket.substring(0,urlTicket.indexOf("?"));
// System.out.println(urlTicket);
} }
@ResponseBody @ResponseBody
...@@ -189,9 +193,7 @@ public class WeixinIndexController extends BaseController{ ...@@ -189,9 +193,7 @@ public class WeixinIndexController extends BaseController{
try{ try{
String urlTicket = request.getParameter("url"); String urlTicket = request.getParameter("url");
if(StringUtils.hasText(urlTicket)){ if(StringUtils.hasText(urlTicket)){
if(urlTicket.contains("?")){ urlTicket = URLDecoder.decode(urlTicket);
urlTicket = urlTicket.substring(0,urlTicket.indexOf("?"));
}
System.out.println("传参:\t"+urlTicket); System.out.println("传参:\t"+urlTicket);
Map<String, Object> signature = jsApiSignature(urlTicket); Map<String, Object> signature = jsApiSignature(urlTicket);
if(signature!=null) { if(signature!=null) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!