lqmac 1 year ago
parent 34aaa3c6d8
commit 1478ee569f
  1. 8
      application/api/controller/Sms.php

@ -35,10 +35,10 @@ class Sms extends Api
if ($last && time() - $last['createtime'] < 60) {
$this->error(__('发送频繁'));
}
$ipSendTotal = \app\common\model\Sms::where(['ip' => $this->request->ip()])->whereTime('createtime', '-1 hours')->count();
if ($ipSendTotal >= 5) {
$this->error(__('发送频繁'));
}
// $ipSendTotal = \app\common\model\Sms::where(['ip' => $this->request->ip()])->whereTime('createtime', '-1 hours')->count();
// if ($ipSendTotal >= 5) {
// $this->error(__('发送频繁'));
// }
if ($event) {
$userinfo = User::getByMobile($mobile);
if ($event == 'register' && $userinfo) {

Loading…
Cancel
Save