切换导航条
此项目
正在载入...
登录
潘浩文
/
scoreshop
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
潘浩文
6 years ago
提交
51957217813fa780999fc716e43a389b9be8b52a
1 个父辈
7af8e52f
1 个管道 的构建
通过
耗费 0 秒
1
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
5 行增加
和
11 行删除
app/portal/service/CCPRestSmsSDK.php
app/portal/service/SendTemplateSMS.php → app/portal/service/SendTemplateSMSService.php
app/portal/service/CCPRestSmsSDK.php
查看文件 @
5195721
...
...
@@ -13,7 +13,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
namespace
app\portal\service
;
class
REST
{
private
$AccountSid
;
private
$AccountToken
;
...
...
app/portal/service/SendTemplateSMS.php → app/portal/service/SendTemplateSMS
Service
.php
查看文件 @
5195721
...
...
@@ -12,8 +12,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
namespace
app\portal\service
;
class
Mobile
{
class
Mobile
{
/**
* 发送模板短信
* @param to 手机号码集合,用英文逗号分开
...
...
@@ -53,11 +53,12 @@ class Mobile
$result
=
$rest
->
sendTemplateSMS
(
$to
,
$datas
,
$tempId
);
if
(
$result
==
NULL
)
{
echo
"result error!"
;
break
;
return
2
;
}
if
(
$result
->
statusCode
!=
0
)
{
echo
"error code :"
.
$result
->
statusCode
.
"<br>"
;
echo
"error msg :"
.
$result
->
statusMsg
.
"<br>"
;
return
0
;
//TODO 添加错误处理逻辑
}
else
{
echo
"Sendind TemplateSMS success!<br/>"
;
...
...
@@ -65,15 +66,9 @@ class Mobile
$smsmessage
=
$result
->
TemplateSMS
;
echo
"dateCreated:"
.
$smsmessage
->
dateCreated
.
"<br/>"
;
echo
"smsMessageSid:"
.
$smsmessage
->
smsMessageSid
.
"<br/>"
;
return
1
;
//TODO 添加成功处理逻辑
}
}
//Demo调用
//**************************************举例说明***********************************************************************
//*假设您用测试Demo的APP ID,则需使用默认模板ID 1,发送手机号是13800000000,传入参数为6532和5,则调用方式为 *
//*result = sendTemplateSMS("13800000000" ,array('6532','5'),"1"); *
//*则13800000000手机号收到的短信内容是:【云通讯】您使用的是云通讯短信模板,您的验证码是6532,请于5分钟内正确输入 *
//*********************************************************************************************************************
}
?>
...
...
请
注册
或
登录
后发表评论