王新凯 3 years ago
parent
commit
821edbf221
1 changed files with 1 additions and 1 deletions
  1. 1 1
      application/api/controller/Login.php

+ 1 - 1
application/api/controller/Login.php

@@ -118,7 +118,7 @@ class Login extends Api
             $user_id = $this->check_login();
             $avatar=input('avatarUrl');
             $nickname=input('nickname');
-            $user=Db::table('q_user')->where('openid',$user_id)->find();
+            $user=Db::table('q_user')->where('id',$user_id)->find();
             $decryptedData = $app->encryptor->decryptData($user['session_key'], input('iv'), input('encryptedData'));
 
             $res=Db::table('q_user')->where('id',$user_id)->update(['headimg'=>$avatar,'nickname'=>$nickname,'phone'=>$decryptedData['phoneNumber']]);