Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh_internal_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨培培
wxh_internal_api
Commits
5a5cbcd0
Commit
5a5cbcd0
authored
Sep 21, 2017
by
夏彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加用户中心推送消息api
parent
b1bb6f28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
ucenter_message.php
example/ucenter_message.php
+7
-3
Message.php
src/ucenter/Message.php
+18
-3
No files found.
example/ucenter_message.php
View file @
5a5cbcd0
...
...
@@ -19,8 +19,8 @@ Message::setDebug();
//print_r($info);
//
$info
=
\internalApi\ucenter\Message
::
addComment
(
1
,
0
,
0
,
'bbs'
,
'theme'
,
0
,
0
,
''
,
'123123'
);
print_r
(
$info
);
//
$info = \internalApi\ucenter\Message::addComment(1,0,0,'bbs','theme',0,0,'','123123');
//
print_r($info);
//$info = \internalApi\ucenter\Message::addLike(1,0,0,'bbs','theme',0,0,'');
...
...
@@ -30,4 +30,8 @@ print_r($info);
//print_r($info);
//$info = \internalApi\ucenter\Message::deleteLiked(1,'bbs','theme',0);
//print_r($info);
\ No newline at end of file
//print_r($info);
//
$info
=
\internalApi\ucenter\Message
::
pushMsg
(
1
,
0
,
0
,
'bbs'
,
'theme'
,
0
);
print_r
(
$info
);
src/ucenter/Message.php
View file @
5a5cbcd0
...
...
@@ -57,9 +57,9 @@ class Message extends Client
* @param string $extra
* @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
{
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'
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment