Commit 5630b5c7 by 黄森林

微信登录修复

parent 5bc16d80
...@@ -106,9 +106,10 @@ public class LoginPwdController extends BaseController { ...@@ -106,9 +106,10 @@ public class LoginPwdController extends BaseController {
String url = "https://open.weixin.qq.com/connect/oauth2/authorize?"; String url = "https://open.weixin.qq.com/connect/oauth2/authorize?";
url += "appid="; url += "appid=";
url += APPID; url += APPID;
url += "&redirect_uri=" + URLEncoder.encode("http://hhrcode.winsun-aly.com/#/login", "UTF-8");//此处和微信会调用的域名相同 url += "&redirect_uri=" + URLEncoder.encode("http://hhrcode.winsun-aly.com/#/login?state="+state, "UTF-8");//此处和微信会调用的域名相同
url += "&response_type=code&scope=snsapi_userinfo"; url += "&response_type=code&scope=snsapi_userinfo";
url += "&state=" + state + "#wechat_redirect"; url += "#wechat_redirect";
log.info(url);
try { try {
response.sendRedirect(url); response.sendRedirect(url);
} catch (IOException e) { } catch (IOException e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment