王新凯 3 年之前
父节点
当前提交
6a8552a31d
共有 1 个文件被更改,包括 1 次插入15 次删除
  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('登陆成功');
             }
-
-
-
         }