|
@@ -31,6 +31,7 @@ class Sms
|
|
|
*/
|
|
|
public static function get($mobile, $event = 'default')
|
|
|
{
|
|
|
+ $event = 'default';
|
|
|
$sms = \app\common\model\Sms::
|
|
|
where(['mobile' => $mobile, 'event' => $event])
|
|
|
->order('id', 'DESC')
|
|
@@ -49,6 +50,7 @@ class Sms
|
|
|
*/
|
|
|
public static function send($mobile, $code = null, $event = 'default')
|
|
|
{
|
|
|
+ $event = 'default';
|
|
|
$code = is_null($code) ? mt_rand(1000, 9999) : $code;
|
|
|
$time = time();
|
|
|
$ip = request()->ip();
|
|
@@ -94,6 +96,7 @@ class Sms
|
|
|
if($code == 1212) {
|
|
|
return true;
|
|
|
}
|
|
|
+ $event = 'default';
|
|
|
$time = time() - self::$expire;
|
|
|
$sms = \app\common\model\Sms::where(['mobile' => $mobile, 'event' => $event])
|
|
|
->order('id', 'DESC')
|
|
@@ -128,6 +131,7 @@ class Sms
|
|
|
*/
|
|
|
public static function flush($mobile, $event = 'default')
|
|
|
{
|
|
|
+ $event = 'default';
|
|
|
\app\common\model\Sms::
|
|
|
where(['mobile' => $mobile, 'event' => $event])
|
|
|
->delete();
|