Commit 02095469 authored by 杨培's avatar 杨培

用户中心提供短信发送服务

parent a73a25d6
......@@ -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);
......@@ -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
<?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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment