Browse Source

日志调试

zhangxiaobin 1 year ago
parent
commit
60797ac6ef
1 changed files with 2 additions and 0 deletions
  1. 2 0
      application/api/controller/User.php

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

@@ -9,6 +9,7 @@ use app\common\library\Wechat;
 use app\common\service\UserService;
 use fast\Random;
 use think\Exception;
+use think\Log;
 use think\Validate;
 use miniprogram\wxBizDataCrypt;
 use onlogin\onlogin;
@@ -722,6 +723,7 @@ class User extends Api
         $wechat = new Wechat();
 
         $wxuserinfo = $wechat->getwxuserinfo($code);
+        Log::info('code:'.$code.',wxuserinfo:'.json_encode($code));
         if(!$wxuserinfo){
             $this->error('openid获取失败');
         }