mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update ExtendService.php
This commit is contained in:
parent
b1b5bbd259
commit
ad50d6469f
@ -84,11 +84,7 @@ class ExtendService
|
|||||||
if (empty($content) || stripos($content, '{code}') === false) {
|
if (empty($content) || stripos($content, '{code}') === false) {
|
||||||
$content = '您的验证码为{code},请在十分钟内完成操作!';
|
$content = '您的验证码为{code},请在十分钟内完成操作!';
|
||||||
}
|
}
|
||||||
cache($ckey, ['phone' => $phone, 'code' => $code, 'time' => time()], 600);
|
cache($ckey, $cache = ['phone' => $phone, 'code' => $code, 'time' => time()], 600);
|
||||||
if (empty($content) || strpos($content, '{code}') === false) {
|
|
||||||
return [0, '获取短信模板失败,联系管理员配置!', []];
|
|
||||||
}
|
|
||||||
$cache = cache($ckey);
|
|
||||||
if (self::sendChinaSms($mid, $phone, str_replace('{code}', $code, $content))) {
|
if (self::sendChinaSms($mid, $phone, str_replace('{code}', $code, $content))) {
|
||||||
$dtime = ($cache['time'] + $wait < time()) ? 0 : ($wait - time() + $cache['time']);
|
$dtime = ($cache['time'] + $wait < time()) ? 0 : ($wait - time() + $cache['time']);
|
||||||
return [1, '短信验证码发送成功!', ['time' => $dtime]];
|
return [1, '短信验证码发送成功!', ['time' => $dtime]];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user