mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修改短信服务库
This commit is contained in:
parent
65d98b6ed7
commit
6ba8d643db
@ -37,7 +37,7 @@ class Config extends Controller
|
||||
{
|
||||
$this->title = '商城参数配置';
|
||||
$this->applyCsrfToken('save');
|
||||
$this->query = ExtendService::querySmsBalance();
|
||||
$this->query = ExtendService::queryChinaSmsBalance();
|
||||
$this->query2 = ExtendService::querySmsBalance2();
|
||||
$this->fetch();
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ class Center extends Member
|
||||
$this->error('获取短信模板失败,联系管理员配置!');
|
||||
}
|
||||
$cache = cache($cachekey);
|
||||
if (ExtendService::sendSms($this->mid, $phone, str_replace('{code}', $code, $content))) {
|
||||
if (ExtendService::sendChinaSms($this->mid, $phone, str_replace('{code}', $code, $content))) {
|
||||
$dtime = ($cache['time'] + 120 < time()) ? 0 : (120 - time() + $cache['time']);
|
||||
$this->success('短信验证码发送成功!', ['time' => $dtime]);
|
||||
} else {
|
||||
|
@ -41,7 +41,7 @@ class ExtendService
|
||||
{
|
||||
|
||||
/**
|
||||
* 发送短信验证码
|
||||
* 发送国内短信验证码
|
||||
* @param string $mid 会员ID
|
||||
* @param string $phone 手机号
|
||||
* @param string $content 短信内容
|
||||
@ -50,7 +50,7 @@ class ExtendService
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public static function sendSms($mid, $phone, $content, $productid = '676767')
|
||||
public static function sendChinaSms($mid, $phone, $content, $productid = '676767')
|
||||
{
|
||||
$tkey = date("YmdHis");
|
||||
$data = [
|
||||
@ -68,12 +68,12 @@ class ExtendService
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询短信余额
|
||||
* 查询国内短信余额
|
||||
* @return array
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public static function querySmsBalance()
|
||||
public static function queryChinaSmsBalance()
|
||||
{
|
||||
$tkey = date("YmdHis");
|
||||
$data = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user