浏览代码

邮件发送频繁

lizhen_gitee 6 月之前
父节点
当前提交
395e464719
共有 3 个文件被更改,包括 2 次插入4 次删除
  1. 1 1
      application/api/controller/Ems.php
  2. 1 1
      application/api/lang/en/ems.php
  3. 0 2
      application/common/library/Ems.php

+ 1 - 1
application/api/controller/Ems.php

@@ -34,7 +34,7 @@ class Ems extends Api
 
         $last = Emslib::get($email, $event);
         if ($last && time() - $last['createtime'] < 60) {
-            $this->error(__('发送频繁'));
+            $this->error(__('发送频繁,请一分钟后在试'));
         }
         if ($event) {
             $userinfo = User::getByEmail($email);

+ 1 - 1
application/api/lang/en/ems.php

@@ -2,7 +2,7 @@
 
 return [
     '操作成功' => 'Operation successful',
-    '发送频繁' => 'Frequent sending',
+    '发送频繁,请一分钟后在试' => 'Frequent sending, wait one minute',
     '已被注册' => 'Registered',
     '已被占用' => 'Occupied',
     '未注册' => 'Unregistered',

+ 0 - 2
application/common/library/Ems.php

@@ -32,7 +32,6 @@ class Ems
      */
     public static function get($email, $event = 'default')
     {
-        $event = 'default';
         $ems = \app\common\model\Ems::
         where(['email' => $email, 'event' => $event])
             ->order('id', 'DESC')
@@ -202,7 +201,6 @@ class Ems
      */
     public static function flush($email, $event = 'default')
     {
-        $event = 'default';
         \app\common\model\Ems::
         where(['email' => $email])
             ->delete();