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