소스 검색

微信预注册和苹果预注册的用户,实注册

lizhen_gitee 1 년 전
부모
커밋
d1e3b2d5a2
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      application/api/controller/User.php

+ 4 - 0
application/api/controller/User.php

@@ -165,6 +165,10 @@ class User extends Api
         if(!$wxuserinfo){
             $this->error('openid获取失败');
         }
+        if(!isset($wxuserinfo['openid'])){
+            $this->error('openid获取失败');
+        }
+
         $openid = $wxuserinfo['openid'];
 
         //检查用户