xieruidong 2 gadi atpakaļ
vecāks
revīzija
5c2e9c2c75

+ 1 - 2
application/api/controller/Common.php

@@ -47,8 +47,7 @@ class Common extends Api
         $this->validate($data,[
             'pos'=>'require',
         ]);
-        $chanId=getChanId();
-        $ads=Ad::getAd($data['pos'],$chanId);
+        $ads=Ad::getAd($data['pos']);
         $this->success('',$ads);
     }
     /**

+ 1 - 6
application/common/model/Ad.php

@@ -37,16 +37,11 @@ class Ad extends Model
     protected $readonly=[];
     
 
-    public static function getAd($pos=null,$chanId=null){
+    public static function getAd($pos=null){
         $q=self::order('sort','desc');
         if($pos){
             $q->where('pos',$pos);
         }
-        if($chanId){
-            $q->where('is_sub',1)->where('admin_id',$chanId);
-        }else{
-            $q->where('is_sub',0);
-        }
         return $q->select();
     }