mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-09-06 23:01:08 +08:00
debug
This commit is contained in:
@@ -193,15 +193,10 @@ public class LoginServiceImpl implements ILoginService {
|
||||
@Override
|
||||
public LoginTokenVo officeLogin(String code, Integer terminal) {
|
||||
try {
|
||||
WxMpService wxMpService = WxMnpDriver.oa();
|
||||
WxMpService wxMpService = WxMnpDriver.openSetting();
|
||||
WxOAuth2AccessToken wxOAuth2AccessToken = wxMpService.getOAuth2Service().getAccessToken(code);
|
||||
String uniId = wxOAuth2AccessToken.getUnionId();
|
||||
String openId = wxOAuth2AccessToken.getOpenId();
|
||||
|
||||
System.out.println("uniId:" + uniId);
|
||||
System.out.println("openId:" + openId);
|
||||
|
||||
|
||||
String unionId = uniId == null ? "0" : uniId;
|
||||
|
||||
String avatar = "";
|
||||
@@ -231,7 +226,7 @@ public class LoginServiceImpl implements ILoginService {
|
||||
*/
|
||||
@Override
|
||||
public String oaCodeUrl(String url) {
|
||||
WxMpService wxMpService = WxMnpDriver.oa();
|
||||
WxMpService wxMpService = WxMnpDriver.openSetting();
|
||||
WxMpOAuth2ServiceImpl wxMpOAuth2Service = new WxMpOAuth2ServiceImpl(wxMpService);
|
||||
String state = ToolUtils.makeMd5(ToolUtils.makeToken());
|
||||
return wxMpOAuth2Service.buildAuthorizationUrl(url, WxConsts.OAuth2Scope.SNSAPI_USERINFO, state);
|
||||
|
||||
Reference in New Issue
Block a user