无法返回News类型消息
Closed this issue · 1 comments
ximenhuangguaduo commented
$reply = new News();
// $reply->setFromUserName($msg->getFromUserName());
// $reply->setToUserName($msg->getToUserName());
$news = new NewsItem();
$news->setTitle("{$nickname},我们已经开通了家长专属直播间,点击进入");
$news->setDescription("家长好好学习,孩子天天向上");
$news->setPicUrl('http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg');
$news->setUrl('https://www.baidu.com');
$reply->setNews([$news]);
return $reply;
RunsTp commented
$reply = new News();
// $reply->setFromUserName($msg->getFromUserName());
// $reply->setToUserName($msg->getToUserName());
$news = new NewsItem();
$news->setTitle("{$nickname},我们已经开通了家长专属直播间,点击进入");
$news->setDescription("家长好好学习,孩子天天向上");
$news->setPicUrl('http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg');
$news->setUrl('https://www.baidu.com');
// $reply->setNews([$news]);
$reply->push($news);
return $reply;
请使用push 将一个图文信息置入news中