Commit 5a5cbcd0 authored by 夏彬's avatar 夏彬

添加用户中心推送消息api

parent b1bb6f28
...@@ -19,8 +19,8 @@ Message::setDebug(); ...@@ -19,8 +19,8 @@ Message::setDebug();
//print_r($info); //print_r($info);
// //
$info = \internalApi\ucenter\Message::addComment(1,0,0,'bbs','theme',0,0,'','123123'); //$info = \internalApi\ucenter\Message::addComment(1,0,0,'bbs','theme',0,0,'','123123');
print_r($info); //print_r($info);
//$info = \internalApi\ucenter\Message::addLike(1,0,0,'bbs','theme',0,0,''); //$info = \internalApi\ucenter\Message::addLike(1,0,0,'bbs','theme',0,0,'');
...@@ -30,4 +30,8 @@ print_r($info); ...@@ -30,4 +30,8 @@ print_r($info);
//print_r($info); //print_r($info);
//$info = \internalApi\ucenter\Message::deleteLiked(1,'bbs','theme',0); //$info = \internalApi\ucenter\Message::deleteLiked(1,'bbs','theme',0);
//print_r($info); //print_r($info);
\ No newline at end of file
//
$info = \internalApi\ucenter\Message::pushMsg(1,0,0,'bbs','theme',0);
print_r($info);
...@@ -57,9 +57,9 @@ class Message extends Client ...@@ -57,9 +57,9 @@ class Message extends Client
* @param string $extra * @param string $extra
* @return mixed * @return mixed
*/ */
public static function addComment($userId, $title, $sourceUrl, $from, $type, $commentId, $replyUserId, $replyedComment = '',$extra = '') public static function addComment($userId, $title, $sourceUrl, $from, $type, $commentId, $replyUserId, $replyedComment = '', $extra = '')
{ {
return self::call('message.addComment', compact('userId', 'title', 'sourceUrl', 'from', 'type', 'commentId', 'replyUserId', 'replyedComment','extra')); return self::call('message.addComment', compact('userId', 'title', 'sourceUrl', 'from', 'type', 'commentId', 'replyUserId', 'replyedComment', 'extra'));
} }
/** /**
...@@ -118,4 +118,19 @@ class Message extends Client ...@@ -118,4 +118,19 @@ class Message extends Client
{ {
return self::call('message.deleteLiked', compact('userId', 'from', 'type', 'sourceId')); return self::call('message.deleteLiked', compact('userId', 'from', 'type', 'sourceId'));
} }
}
\ No newline at end of file /**
* @param $title 消息biaot
* @param $url url地址
* @param $desc 描述
* @param int $userId 用户id 0=>代表全部
* @param int $from 来自
* @param int $type 类型
* @return mixed
*/
public static function pushMsg($title, $url, $desc, $userId = 0, $from = 4, $type = 0)
{
return self::call('message.pushMsg', compact('title', 'url', 'desc', 'userId','from','type'));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment