作者 sgj
1 个管道 的构建 通过 耗费 2 秒

pay change

@@ -39,6 +39,7 @@ class LoginController extends HomeBaseController{ @@ -39,6 +39,7 @@ class LoginController extends HomeBaseController{
39 //登录凭证校验接口 39 //登录凭证校验接口
40 $loginUrl="https://api.weixin.qq.com/sns/jscode2session?appid=".$this->appId."&secret=".$this->appSecret."&js_code=".$code."&grant_type=authorization_code"; 40 $loginUrl="https://api.weixin.qq.com/sns/jscode2session?appid=".$this->appId."&secret=".$this->appSecret."&js_code=".$code."&grant_type=authorization_code";
41 $loginData=json_decode(file_get_contents($loginUrl),true); 41 $loginData=json_decode(file_get_contents($loginUrl),true);
  42 + dump($loginData);
42 if(isset($loginData['openid'])){ 43 if(isset($loginData['openid'])){
43 $users = Db::name('users')->where('open_id', $loginData['openid'])->find(); 44 $users = Db::name('users')->where('open_id', $loginData['openid'])->find();
44 if (empty($users)){ 45 if (empty($users)){