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
02095469
Commit
02095469
authored
Jun 30, 2017
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户中心提供短信发送服务
parent
a73a25d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
2 deletions
+51
-2
ucenter_basic.php
example/ucenter_basic.php
+3
-1
client_config_prod.php
src/client_config_prod.php
+1
-1
Message.php
src/ucenter/Message.php
+47
-0
No files found.
example/ucenter_basic.php
View file @
02095469
...
...
@@ -10,5 +10,7 @@ use internalApi\ucenter\Member;
require
__DIR__
.
'/_init.php'
;
Member
::
setDebug
();
$info
=
Member
::
getMemberInfo
(
12
);
print_r
(
$info
);
\ No newline at end of file
print_r
(
$info
);
src/client_config_prod.php
View file @
02095469
...
...
@@ -20,6 +20,6 @@ return [
'code'
=>
[
'apiUrl'
=>
'http://code.ibanshou.cn/site/api-server'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
''
'clientSecret'
=>
'
2LMbaS2Ac9a2cPPBlZwq
'
]
];
\ No newline at end of file
src/ucenter/Message.php
0 → 100644
View file @
02095469
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/30
* Time: 15:08
*/
namespace
internalApi\ucenter
;
use
internalApi\base\Client
;
/**
* 用户中心消息服务
*
* @package internalApi\ucenter
*/
class
Message
extends
Client
{
/**
* 向指定号码发送短信
*
* @param string $tel
* @param string $content
* @param string $signature 短信签名,中括号【】中的内容
* @return bool|string 成功返回 true,失败返回错误文件
*/
public
static
function
sendSms
(
$tel
,
$content
,
$signature
)
{
return
self
::
call
(
'message.sendSms'
,
compact
(
'tel'
,
'content'
,
'signature'
));
}
/**
* 向指定用户发送短信
*
* @param int $uid
* @param string $content
* @param string $signature 短信签名,中括号【】中的内容
* @return bool|string 成功返回 true,失败返回错误文件
*/
public
static
function
sendSmsByUid
(
$uid
,
$content
,
$signature
)
{
return
self
::
call
(
'message.sendSmsByUid'
,
compact
(
'uid'
,
'content'
,
'signature'
));
}
}
\ No newline at end of file
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