Ver código fonte

修改条件

rkljw 5 meses atrás
pai
commit
a0bf359685
1 arquivos alterados com 1 adições e 12 exclusões
  1. 1 12
      app/JsonRpc/NewsService.php

+ 1 - 12
app/JsonRpc/NewsService.php

@@ -160,18 +160,7 @@ class NewsService implements NewsServiceInterface
             array_push($where,['article.status','=',$data['status']]);
 
         }
-        if(isset($data['catid'])){
-            $where[] =   ['article.catid',$data['catid']];
-            $where[] =   ['article.status', '1'];
-        }elseif(isset($data['keyword'])){
-            $where[] =   ['article.title','like','%'.$data['keyword'].'%'];
-            $where[] =   ['article.status', '1'];
-        }else{
-            $where[] =   ['article.catid',$data['catid']];
-            $where[] =   ['article.title','like','%'.$data['keyword'].'%'];
-            $where[] =   ['article.status', '1'];
-        }
-        
+
         $rep = Article::where($where)
             ->whereNotIn('status',[404])
             ->leftJoin('category','article.catid','category.id')