|
@@ -59,7 +59,7 @@ public class WeChatController {
|
|
if(userAgent.contains("MicroMessenger")){ //wx
|
|
if(userAgent.contains("MicroMessenger")){ //wx
|
|
request.getSession().setAttribute("type","wx");
|
|
request.getSession().setAttribute("type","wx");
|
|
if(StringUtils.isBlank(code)){
|
|
if(StringUtils.isBlank(code)){
|
|
- String url = URLDecoder.decode(http+request.getServerName()+request.getRequestURI());
|
|
|
|
|
|
+ String url = URLDecoder.decode(http+constant.call_back_domain+request.getRequestURI());
|
|
String sendUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+constant.WE_CHAT_APP_ID+"&redirect_uri="+url+"&response_type=code&scope=snsapi_base&state=abc123#wechat_redirect";
|
|
String sendUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+constant.WE_CHAT_APP_ID+"&redirect_uri="+url+"&response_type=code&scope=snsapi_base&state=abc123#wechat_redirect";
|
|
try{
|
|
try{
|
|
System.out.println("sendUrl: "+sendUrl);
|
|
System.out.println("sendUrl: "+sendUrl);
|
|
@@ -138,7 +138,7 @@ public class WeChatController {
|
|
}else{
|
|
}else{
|
|
if((null == request.getSession().getAttribute("openid")) && (StringUtils.isBlank(request.getSession().getAttribute("openid").toString()))){
|
|
if((null == request.getSession().getAttribute("openid")) && (StringUtils.isBlank(request.getSession().getAttribute("openid").toString()))){
|
|
if(StringUtils.isBlank(code)){
|
|
if(StringUtils.isBlank(code)){
|
|
- String url = URLDecoder.decode(http+request.getServerName()+request.getRequestURI());
|
|
|
|
|
|
+ String url = URLDecoder.decode(http+constant.call_back_domain+request.getRequestURI());
|
|
String sendUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+constant.WE_CHAT_APP_ID+"&redirect_uri="+url+"&response_type=code&scope=snsapi_base&state=abc123#wechat_redirect";
|
|
String sendUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+constant.WE_CHAT_APP_ID+"&redirect_uri="+url+"&response_type=code&scope=snsapi_base&state=abc123#wechat_redirect";
|
|
try{
|
|
try{
|
|
System.out.println("sendUrl: "+sendUrl);
|
|
System.out.println("sendUrl: "+sendUrl);
|