|
@@ -54,15 +54,16 @@ class Sms |
|
@@ -54,15 +54,16 @@ class Sms |
54
|
$ip = request()->ip();
|
54
|
$ip = request()->ip();
|
55
|
$sms = \app\common\model\Sms::create(['event' => $event, 'mobile' => $mobile, 'code' => $code, 'ip' => $ip, 'createtime' => $time]);
|
55
|
$sms = \app\common\model\Sms::create(['event' => $event, 'mobile' => $mobile, 'code' => $code, 'ip' => $ip, 'createtime' => $time]);
|
56
|
$sms_config = config('option.sms');
|
56
|
$sms_config = config('option.sms');
|
|
|
57
|
+ $signature = '【小区焦点】';
|
57
|
$tKey = time();
|
58
|
$tKey = time();
|
58
|
$password = md5(md5($sms_config['sms_pwd']) . $tKey);
|
59
|
$password = md5(md5($sms_config['sms_pwd']) . $tKey);
|
59
|
$date = array(
|
60
|
$date = array(
|
60
|
'username' => $sms_config['sms_user'], //用户名
|
61
|
'username' => $sms_config['sms_user'], //用户名
|
61
|
'password' => $password, //密码
|
62
|
'password' => $password, //密码
|
62
|
'tKey' => $tKey, //tKey
|
63
|
'tKey' => $tKey, //tKey
|
63
|
- 'signature' => '【小区焦点】',
|
64
|
+ 'signature' => $signature,
|
64
|
'mobile' => $mobile,
|
65
|
'mobile' => $mobile,
|
65
|
- 'content' => '提醒您,您的验证码是:' .$code.',十分钟之内有效,请勿向他人泄漏您的验证码',
|
66
|
+ 'content' => '提醒您,您的验证码是:' .$code.',十分钟之内有效,请勿向他人泄漏您的验证码。'.$signature,
|
66
|
);
|
67
|
);
|
67
|
$result = httpPost($sms_config['url'], $date);
|
68
|
$result = httpPost($sms_config['url'], $date);
|
68
|
// $result = Hook::listen('sms_send', $sms, null, true);
|
69
|
// $result = Hook::listen('sms_send', $sms, null, true);
|