diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/UserController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/UserController.java index 772a38d2e..5a2c986c7 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/UserController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/UserController.java @@ -63,6 +63,10 @@ public class UserController { return model; } + public Object bhydLoginPageAction(UserModel model) { + return model; + } + public void setXcxUserInfoService(XcxUserInfoService xcxUserInfoService) { this.xcxUserInfoService = xcxUserInfoService; } @@ -226,7 +230,7 @@ public class UserController { String pass = StringUtils.trimToNull(model.getPass()); String weiXinId = CookieUtils.getCookieValue(request,"we_chat_open_id"); - if(StringUtils.isBlank(weiXinId) && StringUtils.isNotBlank(model.getSid())){ + if(StringUtils.isBlank(weiXinId) && StringUtils.isNotBlank(model.getCode())){ System.out.println("小程序code:"+model.getCode()); System.out.println("小程序AppId:"+model.getAppId()); System.out.println("小程序AppSecret:"+model.getAppSecret()); @@ -243,25 +247,25 @@ public class UserController { } System.out.println("[sid]小程序微信OPEN_ID:" + weiXinId); } - - if(StringUtils.isBlank(weiXinId) && StringUtils.isNotBlank(model.getCode())){ - System.out.println("小程序code:"+model.getCode()); - System.out.println("小程序AppId:"+model.getAppId()); - System.out.println("小程序AppSecret:"+model.getAppSecret()); - WeChatAuthServiceImpl.WeChatWebToken token = weChatAuthService.getWeChatWebToken(model.getCode(), model.getAppId(), model.getAppSecret()); - if(token != null) { - weiXinId = token.getOpenid(); - } else { - weiXinId = CookieUtils.getCookieValue(request,"we_chat_open_id"); - } - if(weiXinId == null) { - weiXinId = CookieUtils.getCookieValue(request,"we_chat_open_id"); - } - if(weiXinId != null && !weiXinId.equals("")){ - CookieUtils.setCookie("we_chat_open_id", weiXinId, "/", 60 * 60 * 24 *7, response); - } - System.out.println("小程序微信OPEN_ID:" + weiXinId); - } +// +// if(StringUtils.isBlank(weiXinId) && StringUtils.isNotBlank(model.getCode())){ +// System.out.println("小程序code:"+model.getCode()); +// System.out.println("小程序AppId:"+model.getAppId()); +// System.out.println("小程序AppSecret:"+model.getAppSecret()); +// WeChatAuthServiceImpl.WeChatWebToken token = weChatAuthService.getWeChatWebToken(model.getCode(), model.getAppId(), model.getAppSecret()); +// if(token != null) { +// weiXinId = token.getOpenid(); +// } else { +// weiXinId = CookieUtils.getCookieValue(request,"we_chat_open_id"); +// } +// if(weiXinId == null) { +// weiXinId = CookieUtils.getCookieValue(request,"we_chat_open_id"); +// } +// if(weiXinId != null && !weiXinId.equals("")){ +// CookieUtils.setCookie("we_chat_open_id", weiXinId, "/", 60 * 60 * 24 *7, response); +// } +// System.out.println("小程序微信OPEN_ID:" + weiXinId); +// } //测试时可以先去掉 if (StringUtils.isBlank(username) || StringUtils.isBlank(pass) || StringUtils.isBlank(weiXinId)){ resultModel.setMsg(Message.PARAM_NOT_NULL); diff --git a/projects/fangjia-open/src/main/webapp/static/images/bohaiyidai2.jpg b/projects/fangjia-open/src/main/webapp/static/images/bohaiyidai2.jpg new file mode 100644 index 000000000..7d6910f1e Binary files /dev/null and b/projects/fangjia-open/src/main/webapp/static/images/bohaiyidai2.jpg differ diff --git a/projects/fangjia-open/src/main/webapp/static/images/xcxImage/bohaiyidai.jpg b/projects/fangjia-open/src/main/webapp/static/images/xcxImage/bohaiyidai.jpg new file mode 100644 index 000000000..b29b62470 Binary files /dev/null and b/projects/fangjia-open/src/main/webapp/static/images/xcxImage/bohaiyidai.jpg differ diff --git a/projects/fangjia-open/src/main/webapp/user/bhydLoginPage.ftl b/projects/fangjia-open/src/main/webapp/user/bhydLoginPage.ftl new file mode 100644 index 000000000..f319e34e9 --- /dev/null +++ b/projects/fangjia-open/src/main/webapp/user/bhydLoginPage.ftl @@ -0,0 +1,104 @@ +<#ftl attributes={"content_type":"text/html; charset=UTF-8"}> +<#compress> + + + +
+ + +