From 27254992627820d92c7578872639b557b08b20c2 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 22 Jun 2018 11:49:56 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=9B=BE=E6=96=87=E5=9B=9E=E5=A4=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wechat/controller/api/Push.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/wechat/controller/api/Push.php b/application/wechat/controller/api/Push.php index 748b51095..5185cfff8 100644 --- a/application/wechat/controller/api/Push.php +++ b/application/wechat/controller/api/Push.php @@ -264,7 +264,11 @@ class Push case 'music': return $wechat->music($data['title'], $data['description'], $data['musicurl'], $data['hqmusicurl'], $data['thumb_media_id'])->reply([], true); case 'news': - return $wechat->news($data['articles'])->reply([], true); + $articles = []; + foreach ($data['articles'] as $article) { + $articles[] = ['Url' => $article['url'], 'Title' => $article['title'], 'PicUrl' => $article['picurl'], 'Description' => $article['description']]; + } + return $wechat->news($articles)->reply([], true); case 'customservice': WechatService::WeChatCustom()->send(['touser' => $this->openid, 'msgtype' => 'text', "text" => $data['content']]); return $wechat->transferCustomerService()->reply([], true);