From d9ddb1f3adaa6b93000dffa52f495da0fb693a76 Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 15 Jul 2019 22:12:28 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E5=BE=AE=E4=BF=A1=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E6=96=B9=E4=BF=AE=E5=A4=8D=E5=9B=9E=E5=A4=8D=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wechat/controller/api/Push.php | 4 ++-- application/wechat/service/WechatService.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/application/wechat/controller/api/Push.php b/application/wechat/controller/api/Push.php index a4cdeddd9..2e9042fd7 100644 --- a/application/wechat/controller/api/Push.php +++ b/application/wechat/controller/api/Push.php @@ -95,8 +95,8 @@ class Push extends Controller { try { if ($this->request->has('receive', 'post') && WechatService::getType() === 'thr') { - $this->forceJson = false; // 强制返回JSON到服务端再转发 - $this->forceCustom = true; // 强制使用客户消息模式 + $this->forceJson = true; // 强制返回JSON到Service转发 + $this->forceCustom = false; // 强制使用客服消息模式推送 $this->appid = $this->request->post('appid', '', null); $this->openid = $this->request->post('openid', '', null); $this->encrypt = boolval($this->request->post('encrypt', 0)); diff --git a/application/wechat/service/WechatService.php b/application/wechat/service/WechatService.php index 65eec17cc..a1926974b 100644 --- a/application/wechat/service/WechatService.php +++ b/application/wechat/service/WechatService.php @@ -118,6 +118,7 @@ class WechatService extends \We * @param string $type 接口类型 * @param array $config 微信配置 * @return mixed + * @throws \SoapFault * @throws \think\Exception * @throws \think\exception\PDOException */