|
|
@@ -889,6 +889,7 @@ class MiniProgramService
|
|
|
*/
|
|
|
public static function serve(): Response
|
|
|
{
|
|
|
+ Log::error('小程序miniServe入口已进入');
|
|
|
$wechat = self::application(true);
|
|
|
$server = $wechat->server;
|
|
|
self::hook($server);
|
|
|
@@ -899,6 +900,8 @@ class MiniProgramService
|
|
|
private static function hook($server)
|
|
|
{
|
|
|
$server->setMessageHandler(function ($message) {
|
|
|
+ Log::error('小程序客服回调原始消息:' . json_encode($message, JSON_UNESCAPED_UNICODE));
|
|
|
+ Log::error('小程序客服回调MsgType:' . json_encode($message->MsgType ?? null, JSON_UNESCAPED_UNICODE));
|
|
|
switch ($message->MsgType) {
|
|
|
case 'text':
|
|
|
$content = trim((string)($message->Content ?? ''));
|