|
@@ -127,15 +127,16 @@ class WechatOpenPlatformController extends CatchController
|
|
|
|
|
|
$componentInfo = WechatOpenPlatformService::getComponentInfoByAppid($component_appid);
|
|
|
$openPlatform = WechatOpenPlatformService::buildApplication($componentInfo);
|
|
|
- myLog("wx-xiaoxi")->info('-------开始处理---'.get_date());
|
|
|
+
|
|
|
$server = $openPlatform->server;
|
|
|
$message = $server->getMessage();
|
|
|
- myLog("wx-xiaoxi")->info([
|
|
|
- 'authorizer_appid' => $authorizer_appid,
|
|
|
- 'component_appid' => $component_appid,
|
|
|
- 'param' => $request->all(),
|
|
|
- 'msg' => $message,
|
|
|
- ]);
|
|
|
+ // myLog("wx-xiaoxi")->info('-------开始处理---'.get_date());
|
|
|
+ // myLog("wx-xiaoxi")->info([
|
|
|
+ // 'authorizer_appid' => $authorizer_appid,
|
|
|
+ // 'component_appid' => $component_appid,
|
|
|
+ // 'param' => $request->all(),
|
|
|
+ // 'msg' => $message,
|
|
|
+ // ]);
|
|
|
$appInfo = WechatOpenPlatformService::getRefreshToken($authorizer_appid,$component_appid);
|
|
|
$wechatAppId = getProp($appInfo,'id');
|
|
|
|
|
@@ -143,13 +144,12 @@ class WechatOpenPlatformController extends CatchController
|
|
|
unset($appInfo);
|
|
|
|
|
|
$app->server->push(function ($message) use($app,$authorizer_appid,$wechatAppId) {
|
|
|
- myLog("wx-xiaoxi")->info("----文本消息---");
|
|
|
- myLog("wx-xiaoxi")->info("体消息:");
|
|
|
- myLog("wx-xiaoxi")->info($message);
|
|
|
+ // myLog("wx-xiaoxi")->info("----文本消息---");
|
|
|
+ // myLog("wx-xiaoxi")->info("体消息:");
|
|
|
+ // myLog("wx-xiaoxi")->info($message);
|
|
|
return WechatCommonService::handleMessage($app,$wechatAppId ,$authorizer_appid,$message);
|
|
|
});
|
|
|
-
|
|
|
- myLog("wx-xiaoxi")->info('-------结束处理---'.get_date());
|
|
|
+ // myLog("wx-xiaoxi")->info('-------结束处理---'.get_date());
|
|
|
return $app->server->serve()->send();
|
|
|
}
|
|
|
}
|