We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
接入微信后台的客服api route/api.php
$router->any('wechat/serve', 'WechatMiniCustomerController@serve');
控制器方法
public function serve() : Response { $app = $this->getMiniProgram(); $customerService = $app->customer_service; $app->server->push(static function ($message) use ($customerService) { if (isset($message['MsgType']) && 'miniprogrampage' === $message['MsgType']) { if ('type=map' === $message['PagePath']) { $text = new Text(AirdropConstant::CUSTOMER_INTRO_TEXT); $customerService->message($text)->to($message['FromUserName'])->send(); } $link = new Link(AirdropConstant::APP_INFO[$message['PagePath']]); $customerService->message($link)->to($message['FromUserName'])->send(); } }); return $app->server->serve(); }
在转发给客服后, 客户端收到消息延迟或者接收不到或者在一段时间后, 会收到好多条. 替换为支持协程的Guzzle Handler后, 也会有这些问题. PHP-FPM下是正常的.
The text was updated successfully, but these errors were encountered:
你可以记下日志,调试一下$message的值,看看你的代码有没有走到if代码块里面。我感觉这个和guzzle没有太大关系,可能是参数的问题
$message
Sorry, something went wrong.
日志正常记录接收到微信端的转发请求,但是转发给微信的请求没有记录到日志中,每次重启服务后,会正常一段时间,之后就开始断断续续的出现接受不到消息的情况
No branches or pull requests
接入微信后台的客服api
route/api.php
控制器方法
在转发给客服后, 客户端收到消息延迟或者接收不到或者在一段时间后, 会收到好多条.
替换为支持协程的Guzzle Handler后, 也会有这些问题.
PHP-FPM下是正常的.
The text was updated successfully, but these errors were encountered: