...
|
...
|
@@ -21,6 +21,11 @@ class IndexController extends HomeBaseController |
|
|
$serverModel = new ServerController();
|
|
|
//统计访问量
|
|
|
$serverModel->statistics();
|
|
|
|
|
|
//banner轮播图
|
|
|
$coverImg = $this->getCoverImg(CityCategoryModel::indexImg,3);
|
|
|
$this->assign('coverImg',$coverImg);
|
|
|
|
|
|
//星球奇境,城市分类
|
|
|
$res['asia'] = $this->getCity(CityCategoryModel::asia);
|
|
|
$res['europe'] = $this->getCity(CityCategoryModel::europe);
|
...
|
...
|
@@ -155,6 +160,18 @@ class IndexController extends HomeBaseController |
|
|
return $res;
|
|
|
}
|
|
|
|
|
|
//获取封面图
|
|
|
public function getCoverImg($type,$limit){
|
|
|
$res = Db::name('image')
|
|
|
->where(['type'=>$type])
|
|
|
->field('id,image')
|
|
|
->limit($limit)
|
|
|
->order('weigh desc')
|
|
|
->select()
|
|
|
->toArray();
|
|
|
return $res;
|
|
|
}
|
|
|
|
|
|
//根据月份查询文章(星享体验)
|
|
|
private function getMonthArticle($month){
|
|
|
$position = CityCategoryModel::xxty;
|
...
|
...
|
|