作者 郭文星

123

@@ -25,6 +25,7 @@ class Login extends Base @@ -25,6 +25,7 @@ class Login extends Base
25 { 25 {
26 $appid = "wx58ceff4e93cfc523"; 26 $appid = "wx58ceff4e93cfc523";
27 $AppSecret = "baf744d21875280a5e98611f66adaf91"; 27 $AppSecret = "baf744d21875280a5e98611f66adaf91";
  28 +
28 $post = $this->request->post(); 29 $post = $this->request->post();
29 $code = $post['code'];// I('post.code'); 30 $code = $post['code'];// I('post.code');
30 $encryptedData = $post['encryptedData'];//I('post.encryptedData'); 31 $encryptedData = $post['encryptedData'];//I('post.encryptedData');
@@ -78,7 +79,9 @@ class Login extends Base @@ -78,7 +79,9 @@ class Login extends Base
78 $moblie=$phone['phoneNumber']; 79 $moblie=$phone['phoneNumber'];
79 if($moblie){ 80 if($moblie){
80 Db::name("user")->where("id", $user_id)->update(["mobile" => $moblie]); 81 Db::name("user")->where("id", $user_id)->update(["mobile" => $moblie]);
81 - $this->bind($user_id,$moblie); 82 + $res=$this->auth->direct($user_id);
  83 + $return_data = $this->auth->getUserinfo();
  84 + $this->success('查询用户信息成功',$return_data);
82 }else{ 85 }else{
83 $this->error("无法获取手机号,登录失败"); 86 $this->error("无法获取手机号,登录失败");
84 } 87 }