瀏覽代碼

匹配设置开关与次数

lizhen_gitee 1 年之前
父節點
當前提交
02f414f619
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      application/api/controller/Index.php

+ 2 - 2
application/api/controller/Index.php

@@ -237,8 +237,8 @@ class Index extends Api
         $times_limit_redis = 'pipei_times_limit_'.$user_id;
         $user_times = Cache::get($times_limit_redis) ?: 0;
 
-        if($user_times >= $times_limit){
-            $this->error('今日已匹配次数上限');
+        if($times_limit > 0 && $user_times >= $times_limit){
+            $this->error('今日已超匹配上限'.$times_limit.'次');
         }
 
         //where