|
@@ -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();
|
|
|
}
|
|
|
|