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()}");