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
d17775da
Commit
d17775da
authored
Jul 05, 2017
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加获取和同步用户信息接口
parent
22ca8703
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
ucenter_basic.php
example/ucenter_basic.php
+3
-1
Member.php
src/ucenter/Member.php
+23
-0
Message.php
src/ucenter/Message.php
+2
-2
No files found.
example/ucenter_basic.php
View file @
d17775da
...
...
@@ -12,5 +12,7 @@ require __DIR__.'/_init.php';
Member
::
setDebug
();
$info
=
Member
::
getMemberInfo
(
12
);
//$info = Member::getMemberInfo(12);
$info
=
Member
::
getSyncByMobile
(
'18019580609'
);
//$info = Member::getSyncByUid(40);
print_r
(
$info
);
src/ucenter/Member.php
View file @
d17775da
...
...
@@ -13,9 +13,32 @@ use internalApi\base\Client;
class
Member
extends
Client
{
public
static
function
getMemberInfo
(
$uid
)
{
return
self
::
call
(
'member.getInfo'
,
compact
(
'uid'
));
}
/**
* 根据手机号获取用户数据并触发用户中心同步
*
* @param string $tel
* @return array|false
*/
public
static
function
getSyncByMobile
(
$tel
)
{
return
self
::
call
(
'member.getSyncByMobile'
,
compact
(
'tel'
));
}
/**
* 获取已有uid的用户并触发用户中心同步
*
* @param string $uid
* @return array|false
*/
public
static
function
getSyncByUid
(
$uid
)
{
return
self
::
call
(
'member.getSyncByUid'
,
compact
(
'uid'
));
}
}
\ No newline at end of file
src/ucenter/Message.php
View file @
d17775da
...
...
@@ -24,7 +24,7 @@ class Message extends Client
* @param string $tel
* @param string $content
* @param string $signature 短信签名,中括号【】中的内容
* @return bool|string 成功返回 true,失败返回错误文
件
* @return bool|string 成功返回 true,失败返回错误文
本
*/
public
static
function
sendSms
(
$tel
,
$content
,
$signature
)
{
...
...
@@ -37,7 +37,7 @@ class Message extends Client
* @param int $uid
* @param string $content
* @param string $signature 短信签名,中括号【】中的内容
* @return bool|string 成功返回 true,失败返回错误文
件
* @return bool|string 成功返回 true,失败返回错误文
本
*/
public
static
function
sendSmsByUid
(
$uid
,
$content
,
$signature
)
{
...
...
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