王新凯 %!s(int64=3) %!d(string=hai) anos
pai
achega
6a8552a31d
Modificáronse 1 ficheiros con 1 adicións e 15 borrados
  1. 1 15
      application/api/controller/Login.php

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

@@ -119,29 +119,15 @@ class Login extends Api
             $avatar=input('avatarUrl');
             $nickname=input('nickname');
             $user=Db::table('q_user')->where('id',$user_id)->find();
-            //$decryptedData = $app->encryptor->decryptData($user['session_key'], input('iv'), input('encryptedData'));
+            $decryptedData = $app->encryptor->decryptData($user['session_key'], input('iv'), input('encryptedData'));
 
 
-
-            $pc = new WXBizDataCrypt($config['app_id'], $user['session_key']);
-
-            $pc->decryptData(input('encryptedData'), input('iv'), $data );
-
-
-            //dump($data);die();
-            $array=json_decode(trim($data,'"'),true);
-
-            dump($array);die();
-
             $res=Db::table('q_user')->where('id',$user_id)->update(['headimg'=>$avatar,'nickname'=>$nickname,'phone'=>$decryptedData['phoneNumber']]);
             if(empty($res)){
                 $this->success('授权信息失败,请重新授权');
             }else{
                 $this->success('登陆成功');
             }
-
-
-
         }