hrjy 3 years ago
parent
commit
6d3cffb265
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/api/controller/wechat/AuthController.php

+ 1 - 1
app/api/controller/wechat/AuthController.php

@@ -56,7 +56,6 @@ class AuthController
                 return app('json')->fail('获取session_key失败,请检查您的配置!', ['line' => $e->getLine(), 'message' => $e->getMessage()]);
             }
         }
-
         $data = UtilService::postMore([
             ['spread_spid', 0],
             ['spread_code', ''],
@@ -76,6 +75,7 @@ class AuthController
         $userInfo['code'] = $data['spread_code'];
         $userInfo['session_key'] = $session_key;
         $userInfo['login_type'] = $login_type;
+        $userInfo['unionId'] = $userInfoCong['unionid'];
         $uid = WechatUser::routineOauth($userInfo);
         $userInfo = User::where('uid', $uid)->find();
         if ($userInfo->login_type == 'h5' && ($h5UserInfo = User::where(['account' => $userInfo->phone, 'phone' => $userInfo->phone, 'user_type' => 'h5'])->find()))