Browse Source

用户登录+注册

lizhen_gitee 7 months ago
parent
commit
94b5e1be8d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      application/api/controller/User.php

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

@@ -138,7 +138,7 @@ class User extends Api
         }
         }
 
 
         //获取openid
         //获取openid
-        $getopenid = 'https://api.weixin.qq.com/sns/jscode2session?appid='.$config['appid'].'&secret='.$config['secret'].'&js_code='.$code.'&grant_type=authorization_code';
+        $getopenid = 'https://api.weixin.qq.com/sns/jscode2session?appid='.$config['appid'].'&secret='.$config['secret'].'&js_code='.$opencode.'&grant_type=authorization_code';
         $openidInfo = $this->getJson($getopenid);
         $openidInfo = $this->getJson($getopenid);
         if(!isset($openidInfo['openid'])) {
         if(!isset($openidInfo['openid'])) {
             $this->error('用户openid获取失败',$openidInfo);
             $this->error('用户openid获取失败',$openidInfo);