소스 검색

匹配设置开关与次数

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