瀏覽代碼

更新微信授权

刘忠健 2 年之前
父節點
當前提交
ed57595aa5
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      api/app/api/controller/WechatMpAuth.php

+ 3 - 0
api/app/api/controller/WechatMpAuth.php

@@ -7,6 +7,7 @@ namespace app\api\controller;
 use app\common\model\WechatConfig;
 use app\common\util\wechat\WechatMpSDK;
 use EasyWeChat\Factory;
+use think\facade\Log;
 use think\facade\View;
 
 class WechatMpAuth extends Base
@@ -49,6 +50,7 @@ class WechatMpAuth extends Base
         $method = input("method", "post");//回调方式
         $wechatcode = input("wechatcode");
         $wechatConfig = WechatConfig::getEasyWechatConfig($wechatcode);
+        Log::record("wechatConfig:".json_encode($wechatConfig,JSON_UNESCAPED_UNICODE),"debug");
         $app = Factory::officialAccount($wechatConfig);
         $param = [
             "callback" => urlencode2($callback),
@@ -76,6 +78,7 @@ class WechatMpAuth extends Base
         $wechatcode = input("wechatcode");
         View::assign("wechatcode", $wechatcode);
         $wechatConfig = WechatConfig::getEasyWechatConfig($wechatcode);
+        Log::record("wechatConfig:".json_encode($wechatConfig,JSON_UNESCAPED_UNICODE),"debug");
         $app = Factory::officialAccount($wechatConfig);
         $oauth = $app->oauth;
         $code = input("code");