|
|
@@ -140,7 +140,7 @@ class Auth extends BaseController
|
|
|
*/
|
|
|
public function login(UserRepository $repository)
|
|
|
{
|
|
|
-// @file_put_contents('quanju3.txt',"-还是说这里\r\n",8);
|
|
|
+ @file_put_contents('quanju3.txt',"-还是说这里\r\n",8);
|
|
|
$account = $this->request->param('account');
|
|
|
$auth_token = $this->request->param('auth_token');
|
|
|
if (Cache::get('api_login_freeze_' . $account))
|
|
|
@@ -298,10 +298,12 @@ class Auth extends BaseController
|
|
|
|
|
|
$request = $this->request;
|
|
|
$oauth = WechatService::create()->getApplication()->oauth;
|
|
|
+ @file_put_contents('quanju3.txt',json_encode($oauth)."-这里怎么说\r\n",8);
|
|
|
$oauth->setRequest(new Request($request->get(), $request->post(), [], [], [], $request->server(), $request->getContent()));
|
|
|
try {
|
|
|
$wechatInfo = $oauth->user()->getOriginal();
|
|
|
} catch (Exception $e) {
|
|
|
+ @file_put_contents('quanju3.txt',"-难道是这里\r\n",8);
|
|
|
return app('json')->fail('授权失败[001]', ['message' => $e->getMessage()]);
|
|
|
}
|
|
|
if (!isset($wechatInfo['nickname'])) {
|
|
|
@@ -545,7 +547,7 @@ class Auth extends BaseController
|
|
|
if (!in_array($auth['type'] ?? '', ['wechat', 'routine', 'apple', 'app_wechat']) || !isset($auth['auth']))
|
|
|
throw new ValidateException('授权信息类型有误');
|
|
|
$data = $auth['auth'];
|
|
|
-// @file_put_contents('quanju3.txt',$auth['type']."-或者说走这里\r\n",8);
|
|
|
+ @file_put_contents('quanju3.txt',$auth['type']."-或者说走这里\r\n",8);
|
|
|
if ($auth['type'] === 'routine') {
|
|
|
$code = $data['code'] ?? '';
|
|
|
$userInfoCong = Cache::get('eb_api_code_' . $code);
|
|
|
@@ -582,7 +584,7 @@ class Auth extends BaseController
|
|
|
} else if ($auth['type'] === 'wechat') {
|
|
|
$request = $this->request;
|
|
|
$oauth = WechatService::create()->getApplication()->oauth;
|
|
|
-// @file_put_contents('quanju3.txt',json_encode($oauth)."-微信登陆内容\r\n",8);
|
|
|
+ @file_put_contents('quanju3.txt',json_encode($oauth)."-微信登陆内容\r\n",8);
|
|
|
$oauth->setRequest(new Request($data, $data, [], [], [], $request->server(), $request->getContent()));
|
|
|
try {
|
|
|
$wechatInfo = $oauth->user()->getOriginal();
|