|
@@ -65,6 +65,8 @@ class WechatController
|
|
} catch (\Exception $e) {
|
|
} catch (\Exception $e) {
|
|
return app('json')->fail('授权失败', ['message' => $e->getMessage(), 'line' => $e->getLine()]);
|
|
return app('json')->fail('授权失败', ['message' => $e->getMessage(), 'line' => $e->getLine()]);
|
|
}
|
|
}
|
|
|
|
+ var_dump('123456');
|
|
|
|
+ var_dump($wechatInfo);
|
|
if (!isset($wechatInfo['nickname'])) {
|
|
if (!isset($wechatInfo['nickname'])) {
|
|
$wechatInfo = WechatService::getUserInfo($wechatInfo['openid']);
|
|
$wechatInfo = WechatService::getUserInfo($wechatInfo['openid']);
|
|
if (!$wechatInfo['subscribe'] && !isset($wechatInfo['nickname']))
|
|
if (!$wechatInfo['subscribe'] && !isset($wechatInfo['nickname']))
|
|
@@ -78,8 +80,6 @@ class WechatController
|
|
$wechatInfo['subscribe'] = 0;
|
|
$wechatInfo['subscribe'] = 0;
|
|
}
|
|
}
|
|
$openid = $wechatInfo['openid'];
|
|
$openid = $wechatInfo['openid'];
|
|
- var_dump('1231231231231213');
|
|
|
|
- var_dump($login_type);
|
|
|
|
event('WechatOauthAfter', [$openid, $wechatInfo, $spreadId, $login_type]);
|
|
event('WechatOauthAfter', [$openid, $wechatInfo, $spreadId, $login_type]);
|
|
$user = User::where('uid', WechatUser::openidToUid($openid, 'openid'))->find();
|
|
$user = User::where('uid', WechatUser::openidToUid($openid, 'openid'))->find();
|
|
if (!$user)
|
|
if (!$user)
|