quguofeng 1 年之前
父节点
当前提交
4905e0e4e5
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      app/controller/api/Auth.php

+ 1 - 2
app/controller/api/Auth.php

@@ -208,8 +208,6 @@ class Auth extends BaseController
         }
         /** @var WechatUserRepository $make */
         $make = app()->make(WechatUserRepository::class);
-        $order_id = $this->request->param('order_id', 0);
-        var_dump($order_id);exit();
         $user = $make->syncUser($wechatInfo['openid'], $wechatInfo);
         if (!$user)
             return app('json')->fail('授权失败[003]');
@@ -555,6 +553,7 @@ class Auth extends BaseController
             return app('json')->fail('授权失败');
         $authInfo = $users[0];
         $userRepository = app()->make(UserRepository::class);
+        $authInfo['order_id'] = $auth['auth']['order_id'] ?? 0;
         $user = $users[1] ?? $userRepository->wechatUserIdBytUser($authInfo['wechat_user_id']);
         $code = (int)($auth['auth']['spread_code']['id'] ?? $auth['auth']['spread_code'] ?? '');
         //获取是否有扫码进小程序