|
@@ -50,11 +50,10 @@ class Sms
|
|
|
*/
|
|
|
public static function send($mobile, $code = null, $event = 'default')
|
|
|
{
|
|
|
- $code = is_null($code) ? "0123" : $code;
|
|
|
+ $code = is_null($code) ? strval(Random::numeric(config('captcha.length'))) : $code;
|
|
|
$time = time();
|
|
|
$ip = request()->ip();
|
|
|
$sms = \app\common\model\Sms::create(['event' => $event, 'mobile' => $mobile, 'code' => $code, 'ip' => $ip, 'createtime' => $time]);
|
|
|
-
|
|
|
// \app\common\controller\Sms::main($mobile,$code);
|
|
|
\app\common\controller\Sms::main($mobile,$code);
|
|
|
if (!$sms) {
|