|
|
@ -161,10 +161,11 @@ |
|
|
|
$sms = new AliyunSms($accessKeyId, $accessKeySecret, $signName, $templateCode); |
|
|
|
$sms = new AliyunSms($accessKeyId, $accessKeySecret, $signName, $templateCode); |
|
|
|
$code = substr(str_shuffle('0123456789'),0,6); |
|
|
|
$code = substr(str_shuffle('0123456789'),0,6); |
|
|
|
$templateParam = array( |
|
|
|
$templateParam = array( |
|
|
|
'code' => $code // 模板中变量的值 |
|
|
|
// 'code' => $code // 模板中变量的值 |
|
|
|
|
|
|
|
'code' => '123456' // 模板中变量的值 |
|
|
|
); |
|
|
|
); |
|
|
|
$result = $sms->sendSMS($phone, $templateParam); |
|
|
|
// $result = $sms->sendSMS($phone, $templateParam); |
|
|
|
if(!$result) Tool_Fnc::apiMsg('短信发送失败', '500'); |
|
|
|
// if(!$result) Tool_Fnc::apiMsg('短信发送失败', '500'); |
|
|
|
$data['phone'] = $phone; |
|
|
|
$data['phone'] = $phone; |
|
|
|
$data['code'] = $code; |
|
|
|
$data['code'] = $code; |
|
|
|
$data['created'] = date("Y-m-d H:i:s",time()); |
|
|
|
$data['created'] = date("Y-m-d H:i:s",time()); |
|
|
|