|
@@ -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");
|