Commit fa78adf0 authored by zhoujun's avatar zhoujun

验证码

parent 24a50f3d
......@@ -42,9 +42,9 @@ class ToolController extends Controller
return $this->jsonReturn(4003, "当天手机发送短信达上限");
}
$authcode = $this->genAuthCode(6);
//$authcode = $this->genAuthCode(6);
// $authcode = 666666;
$authcode = 666666;
Cache::put("sms_auth_code:" . $mobile, $authcode, $expireSeconds);
Cache::put("sms:limit_mobile:" . $mobile, 1, 60);
......@@ -53,9 +53,9 @@ class ToolController extends Controller
Cache::put("sms:limit_mobile_daily:" . $mobile . ":" . $todayDate, $mobileDayLimit +1, 3600*24);
$aliyunsms = new Aliyunsms();
$ret = $aliyunsms->send($mobile, $authcode);
// $ret = 1;
//$aliyunsms = new Aliyunsms();
//$ret = $aliyunsms->send($mobile, $authcode);
$ret = 1;
if ($ret == 1) {
return $this->jsonReturn(0, "验证码发送成功");
}else {
......
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