Kirin hace 3 años
padre
commit
babb116649
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      app/api/controller/wechat/AuthController.php

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

@@ -69,6 +69,7 @@ class AuthController
         } catch (\Exception $e) {
             if ($e->getCode() == '-41003') return app('json')->fail('获取会话密匙失败');
         }
+        if (!isset($userInfo['openId'])) $userInfo['openId'] = $userInfoCong['openid'];
         if (!isset($userInfo['openId'])) return app('json')->fail('openid获取失败');
         if (!isset($userInfo['unionId'])) $userInfo['unionId'] = '';
         $userInfo['spid'] = $data['spread_spid'];