Przeglądaj źródła

匹配设置开关与次数

lizhen_gitee 1 rok temu
rodzic
commit
02f414f619
1 zmienionych plików z 2 dodań i 2 usunięć
  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