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
c17a95c1
Commit
c17a95c1
authored
Sep 22, 2017
by
杨培
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
eee02faf
de4a0bac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
17 deletions
+62
-17
bbs_user.php
example/bbs_user.php
+16
-0
ucenter_message.php
example/ucenter_message.php
+7
-3
User.php
src/bbs/User.php
+21
-11
Message.php
src/ucenter/Message.php
+18
-3
No files found.
example/bbs_user.php
0 → 100644
View file @
c17a95c1
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 11/09/2017
* Time: 11:54 AM
*/
use
internalApi\bbs\User
;
require
__DIR__
.
'/_init.php'
;
User
::
setDebug
(
true
);
$uid
=
42
;
$data
=
User
::
getGoldCoin
(
$uid
);
print_r
(
$data
);
\ No newline at end of file
example/ucenter_message.php
View file @
c17a95c1
...
...
@@ -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/bbs/User.php
View file @
c17a95c1
...
...
@@ -13,16 +13,26 @@ use internalApi\base\Client;
class
User
extends
Client
{
/**
* 同步更新用户基本信息
*
* @param int $uid
* @param array $data
* @return bool
*/
public
static
function
updateSync
(
$uid
,
$data
)
{
return
self
::
call
(
'user.updateSync'
,
compact
(
'uid'
,
'data'
));
}
/**
* 同步更新用户基本信息
*
* @param int $uid
* @param array $data
* @return bool
*/
public
static
function
updateSync
(
$uid
,
$data
)
{
return
self
::
call
(
'user.updateSync'
,
compact
(
'uid'
,
'data'
));
}
/**
* 获取金币
* @param $uid
* @return mixed
*/
public
static
function
getGoldCoin
(
$uid
)
{
return
self
::
call
(
'user.getGoldCoin'
,
compact
(
'uid'
));
}
}
\ No newline at end of file
src/ucenter/Message.php
View file @
c17a95c1
...
...
@@ -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 消息标题
* @param $url url地址
* @param $desc 描述
* @param int $userId 用户id 0=>代表全部
* @param int $from 来自
* @param int $type 类型 0 早报 1 求助 2 系统推送
* @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