|
|
@ -7,7 +7,7 @@
|
|
|
|
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
|
|
|
|
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
namespace Sdk\Model;
|
|
|
|
namespace Common\Model;
|
|
|
|
|
|
|
|
|
|
|
|
use Think\Model;
|
|
|
|
use Think\Model;
|
|
|
|
|
|
|
|
|
|
|
@ -37,10 +37,10 @@ class SmsLogModel extends Model
|
|
|
|
'30974' => '{1}您的验证码为{2},10分钟内有效,为保证账户安全,请勿向他人泄露验证信息。',
|
|
|
|
'30974' => '{1}您的验证码为{2},10分钟内有效,为保证账户安全,请勿向他人泄露验证信息。',
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
public function sendCode($strPhone, $type = '')
|
|
|
|
public function sendCode($strPhone, $code = '')
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$params[0] = self::$sms_sign['001'];
|
|
|
|
$params[0] = self::$sms_sign['001'];
|
|
|
|
$params[1] = rand(100000, 999999);
|
|
|
|
$params[1] = $code;
|
|
|
|
$str = self::getContent(self::$msgContent['30974'], $params);
|
|
|
|
$str = self::getContent(self::$msgContent['30974'], $params);
|
|
|
|
$msg = $this->sms($str, $strPhone, $params[1]);
|
|
|
|
$msg = $this->sms($str, $strPhone, $params[1]);
|
|
|
|
return $msg;
|
|
|
|
return $msg;
|
|
|
@ -70,8 +70,8 @@ class SmsLogModel extends Model
|
|
|
|
public function sms($content, $phone, $code)
|
|
|
|
public function sms($content, $phone, $code)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$data = [
|
|
|
|
$data = [
|
|
|
|
'apName' => 'wmtxhy',
|
|
|
|
'apName' => C('zhongwang.smtp_account'),
|
|
|
|
'apPassword' => 'wmtxhy158',
|
|
|
|
'apPassword' => C('zhongwang.smtp_password'),
|
|
|
|
'calledNumber' => $phone,
|
|
|
|
'calledNumber' => $phone,
|
|
|
|
'content' => $content,
|
|
|
|
'content' => $content,
|
|
|
|
];
|
|
|
|
];
|
|
|
|