Commit b7def8ec authored by Morson's avatar Morson

开放用户中心验证码服务

parent 59750efe
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2021/03/11
* Time: 15:08
*/
namespace internalApi\ucenter;
use internalApi\base\ApiException;
use internalApi\base\Client;
use internalApi\base\ClientException;
/**
* 用户中心验证码服务
*
* @package internalApi\ucenter
*/
class PhoneCode extends Client
{
/**
* 向指定手机号码发送验证码
* @param string $phone 手机号码
* @param string $type
* @return mixed
* @throws ApiException
* @throws ClientException
*/
public static function send(string $phone, $type = '')
{
return self::invoke('/phoneCode/send', func_get_args());
}
/**
* @param string $phone 手机号码
* @param string $code 验证码
* @return mixed
* @throws ApiException
* @throws ClientException
*/
public static function check(string $phone, string $code)
{
return self::invoke('/phoneCode/check', func_get_args());
}
}
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