zxhxx 3 gadi atpakaļ
vecāks
revīzija
dceff8a049

+ 1 - 0
application/api/controller/MiniProgram.php

@@ -64,6 +64,7 @@ class MiniProgram extends  Api
         $userInfo['login_type'] = $login_type;
         $userInfo['cid'] = $this->cid;
         User::routineOauth($userInfo);
+        echo UserRelation::openidToUid($userInfo['openId'], 'routine_openid');
         $user = User::where('id', UserRelation::openidToUid($userInfo['openId'], 'routine_openid'))->find();
         if (!$user)
             $this->error('获取用户失败');

+ 0 - 1
application/api/controller/User.php

@@ -22,7 +22,6 @@ class User extends Api
 {
     protected $noNeedLogin = ['login', 'mobilelogin', 'register', 'resetpwd', 'changeemail', 'changemobile', 'third'];
     protected $noNeedRight = '*';
-
     public function _initialize()
     {
         parent::_initialize();