From 114d755ecf579099747f3cb307dbb09df7310eb7 Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 15 Jul 2019 15:20:34 +0800 Subject: [PATCH] Update Push.php --- application/wechat/controller/api/Push.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/application/wechat/controller/api/Push.php b/application/wechat/controller/api/Push.php index d6e6584d2..a8bd726a1 100644 --- a/application/wechat/controller/api/Push.php +++ b/application/wechat/controller/api/Push.php @@ -66,18 +66,18 @@ class Push extends Controller */ protected $wechat; + /** + * 强制返回JSON消息 + * @var boolean + */ + protected $forceJson = false; + /** * 强制客服消息回复 * @var boolean */ protected $forceCustom = false; - /** - * 强制返回JSON回复 - * @var boolean - */ - protected $forceJson = false; - /** * 获取网络出口IP * @return mixed @@ -97,7 +97,7 @@ class Push extends Controller $this->wechat = WechatService::WeChatReceive(); if ($this->request->has('receive', 'post') && WechatService::getType() === 'thr') { $this->forceJson = true; // 强制返回JSON到服务端再转发 - $this->forceCustom = false; // 暂时使用客户消息模式 + $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)); @@ -106,8 +106,8 @@ class Push extends Controller throw new \think\Exception('微信API实例缺失必要参数[appid,openid,receive]'); } } else { - $this->forceJson = false; // 强制返回JSON仅对第三方有效 - $this->forceCustom = false; // 暂时使用客户消息模式 + $this->forceJson = false; // 暂停返回JSON消息对象 + $this->forceCustom = false; // 暂停使用客户消息模式 $this->appid = WechatService::getAppid(); $this->openid = $this->wechat->getOpenid(); $this->encrypt = $this->wechat->isEncrypt();