Ver Fonte

匹配设置开关与次数

lizhen_gitee há 1 ano atrás
pai
commit
02f414f619
1 ficheiros alterados com 2 adições e 2 exclusões
  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