Exemple #1
0
 /**
  * 前台首页轮播大图
  */
 public function getPpts($limit)
 {
     //adplace_id==1,前台首页横幅
     $datas = AdModel::where('uid', 0)->where('adplace_id', 1)->where('isuse', 1)->where('isshow', 1)->orderBy('sort', 'desc')->paginate($limit);
     $datas->limit = $limit;
     return $datas;
 }
Exemple #2
0
 /**
  * 企业宣传PPT
  */
 public function getPpts($uid, $limit)
 {
     //adplace_id==6,前台公司首页PPT
     $ads = \App\Models\Base\AdModel::where('uid', $uid)->where('adplace_id', 5)->where('isuse', 1)->where('isshow', 1)->where('fromTime', '<', time())->where('toTime', '>', time())->orderBy('sort', 'desc')->paginate($limit);
     $ads->limit = $limit;
     return $ads;
 }
Exemple #3
0
 public function ads()
 {
     //adplace_id==4,前台租赁页面右侧
     $limit = 3;
     $ads = \App\Models\Base\AdModel::where('uid', 0)->where('adplace_id', 4)->where('isuse', 1)->where('isshow', 1)->where('fromTime', '<', time())->where('toTime', '>', time())->orderBy('sort', 'desc')->paginate($limit);
     $ads->limit = $limit;
     return $ads;
 }
Exemple #4
0
 /**
  * 查询方法
  */
 public function query($isuse = 1)
 {
     $datas = AdModel::where('uid', $this->userid)->where('isuse', $isuse)->where('isshow', 1)->orderBy('sort', 'desc')->orderBy('id', 'desc')->paginate($this->limit);
     $datas->limit = $this->limit;
     return $datas;
 }
Exemple #5
0
 public function query()
 {
     $datas = AdModel::orderBy('id', 'desc')->paginate($this->limit);
     $datas->limit = $this->limit;
     return $datas;
 }
 public function ppts($limit)
 {
     $datas = \App\Models\Base\AdModel::where('uid', 0)->where('adplace_id', 1)->where('isuse', 1)->where('isshow', 1)->orderBy('sort', 'desc')->paginate($limit);
     $datas->limit = $limit;
     return $datas;
 }