Commit 43bb42d2 authored by wangzhengwen's avatar wangzhengwen

sms

parent 6145f0de
......@@ -38,7 +38,11 @@ class SendSms
'sms_url' => '',
'sms_user' => '',
'sms_pass' => '',
'sms_temp' => 0
'sms_temp' => 0,
'AccessKeyID'=>'',
'AccessKeySecret'=>'',
'sms_template_id'=>'',
'sms_times'=>60
);
/**
......@@ -172,7 +176,7 @@ class SendSms
}
/**
* 短信宝发送短信
* 阿里云发送短信
* @access public
* @param string $mobile 手机号
* @param string $message 短信内容
......@@ -200,9 +204,8 @@ class SendSms
if(!$mobile) return ['msg'=>'手机号不能为空','code'=>0];
if(!$code) return ['msg'=>'短信验证码不能为空','code'=>0];
$template_id = $tpid ? $tpid : $this->config['sms_template_id'];
$template_id = $tpid ? $tpid : vconfig('sms_template_id');
AlibabaCloud::accessKeyClient($this->config['AccessKeyID'], $this->config['AccessKeySecret'])
->regionId('cn-hangzhou')
->asDefaultClient();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment