mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-06-02 23:22:11 +08:00
微信公众号登录
This commit is contained in:
@@ -266,7 +266,7 @@ public class LoginServiceImpl implements ILoginService {
|
||||
public Map<String, Object> officeLogin(Map<String, String> params) {
|
||||
Assert.notNull(params.get("code"), "code参数缺失!");
|
||||
String code = params.get("code");
|
||||
|
||||
log.error("好好好好来了");
|
||||
try {
|
||||
WxMpService wxMpService = WeChatUtil.official();
|
||||
WxOAuth2AccessToken wxOAuth2AccessToken = wxMpService.getOAuth2Service().getAccessToken(code);
|
||||
@@ -274,6 +274,7 @@ public class LoginServiceImpl implements ILoginService {
|
||||
log.error(JSON.toJSONString(wxMpUser));
|
||||
System.out.println(wxMpUser);
|
||||
} catch (WxErrorException e) {
|
||||
log.error("错了e"+ e.getError());
|
||||
System.out.println(e.getError());
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user