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
67133753
Commit
67133753
authored
Mar 31, 2018
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加需要替换的模板短信服务
parent
5e7400d5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
5 deletions
+35
-5
ucenter_message.php
example/ucenter_message.php
+8
-5
Message.php
src/ucenter/Message.php
+27
-0
No files found.
example/ucenter_message.php
View file @
67133753
...
@@ -14,6 +14,9 @@ require __DIR__.'/_init.php';
...
@@ -14,6 +14,9 @@ require __DIR__.'/_init.php';
Message
::
setDebug
();
Message
::
setDebug
();
//$ret = Message::sendTemplateSmsByUid('12', 'default_code', ['code'=>rand(1000, 9999)]);
//var_dump($ret);
//$name = uniqid('dev_');
//$name = uniqid('dev_');
//$info = \internalApi\ucenter\Message::add(1,0,0,'bbs','system',0,0);
//$info = \internalApi\ucenter\Message::add(1,0,0,'bbs','system',0,0);
//print_r($info);
//print_r($info);
...
@@ -23,8 +26,8 @@ Message::setDebug();
...
@@ -23,8 +26,8 @@ Message::setDebug();
//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,'');
print_r
(
$info
);
//
print_r($info);
//$info = \internalApi\ucenter\Message::deleteComment(1,'bbs','theme',0);
//$info = \internalApi\ucenter\Message::deleteComment(1,'bbs','theme',0);
//print_r($info);
//print_r($info);
...
@@ -32,6 +35,6 @@ print_r($info);
...
@@ -32,6 +35,6 @@ 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);
//
$info
=
\internalApi\ucenter\Message
::
pushMsg
(
1
,
0
,
0
,
'bbs'
,
'theme'
,
0
);
//
$info = \internalApi\ucenter\Message::pushMsg(1,0,0,'bbs','theme',0);
print_r
(
$info
);
//
print_r($info);
src/ucenter/Message.php
View file @
67133753
...
@@ -44,6 +44,33 @@ class Message extends Client
...
@@ -44,6 +44,33 @@ class Message extends Client
return
self
::
call
(
'message.sendSmsByUid'
,
compact
(
'uid'
,
'content'
,
'signature'
));
return
self
::
call
(
'message.sendSmsByUid'
,
compact
(
'uid'
,
'content'
,
'signature'
));
}
}
/**
* 向指定手机号发送模板短信
*
* @param string|array $tel 单个或多个号码数组
* @param string $templateId 内部短信模板ID
* @param array $templateParams 短信模板变量内容
* @param string $signature 短信签名
* @return bool|string 成功返回 true,失败返回错误文本
*/
public
static
function
sendTemplateSms
(
$tel
,
$templateId
,
$templateParams
=
[],
$signature
=
null
)
{
return
self
::
call
(
'message.sendTemplateSms'
,
compact
(
'tel'
,
'templateId'
,
'templateParams'
,
'signature'
));
}
/**
* 向指定用户发送模板短信
*
* @param int $uid
* @param string $templateId 内部短信模板ID
* @param array $templateParams 短信模板变量内容
* @param string $signature 短信签名
* @return bool|string 成功返回 true,失败返回错误文本
*/
public
static
function
sendTemplateSmsByUid
(
$uid
,
$templateId
,
$templateParams
=
[],
$signature
=
null
)
{
return
self
::
call
(
'message.sendTemplateSmsByUid'
,
compact
(
'uid'
,
'templateId'
,
'templateParams'
,
'signature'
));
}
/***
/***
* @param $userId
* @param $userId
...
...
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