From 502a0f78454cd6d8939c6be937b83f1766f2ad97 Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 15 Jul 2019 18:18:07 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E6=96=B9=E6=B6=88=E6=81=AF=E5=A4=84=E7=90=86=E6=9C=BA?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/service/controller/api/Push.php | 2 +- application/service/handler/ReceiveHandler.php | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/application/service/controller/api/Push.php b/application/service/controller/api/Push.php index 8bc71f42d..39e768395 100644 --- a/application/service/controller/api/Push.php +++ b/application/service/controller/api/Push.php @@ -42,7 +42,7 @@ class Push extends Controller */ public function notify($appid) { - if ($appid === 'wx570bc396a51b8ff8') { + if (in_array($appid, ['wx570bc396a51b8ff8', 'wxd101a85aa106f53e'])) { # 全网发布接口测试 return \app\service\handler\PublishHandler::handler($appid); } else { diff --git a/application/service/handler/ReceiveHandler.php b/application/service/handler/ReceiveHandler.php index 9e27fc309..f860f410b 100644 --- a/application/service/handler/ReceiveHandler.php +++ b/application/service/handler/ReceiveHandler.php @@ -54,20 +54,11 @@ class ReceiveHandler if (isset($data['EventKey']) && is_object($data['EventKey'])) $data['EventKey'] = (array)$data['EventKey']; $input = ['openid' => $openid, 'appid' => $appid, 'receive' => serialize($data), 'encrypt' => intval($service->isEncrypt())]; if (is_string($result = http_post($config['appuri'], $input, ['timeout' => 30]))) { - p('---- Service 收到 Client 的http返回 ---- '); - p($result); if (is_array($json = json_decode($result, true))) { - p('===== 已返回xml加密内容 ====='); - p($json); - $xml = $service->reply($json, true, $service->isEncrypt()); - p($xml); - return $xml; + return $service->reply($json, true, true); } else { - p('===== 直接回复返回的内容 ====='); return $result; } - } else { - p('服务端没有任何内容返回'); } } catch (\Exception $e) { \think\facade\Log::error("微信{$appid}接口调用异常,{$e->getMessage()}");