|
|
@@ -324,8 +324,16 @@ class JiamengController extends HomeBaseController
|
|
|
//排行
|
|
|
$paihang = Db::name('jiameng')->field('id,title,logo,touzi_level,mendian,hits')->where('catid', $info['catid'])->where('status', 1)->order('hits desc')->limit(5)->select();
|
|
|
//动态
|
|
|
- $about_news = Db::name('news')->field('id,title,thumb,create_time')->where(['ncatid' => 1, 'status' => 1])->order('id desc')->limit(6)->select();
|
|
|
- $brand_news = Db::name('news')->field('id,title,thumb,create_time')->where(['catid' => $info['catid'], 'status' => 1])->order('id desc')->limit(6)->select();
|
|
|
+ // $about_news = Db::name('news')->field('id,title,thumb,create_time')->where(['ncatid' => 1, 'status' => 1])->order('id desc')->limit(6)->select();
|
|
|
+ // $brand_news = Db::name('news')->field('id,title,thumb,create_time')->where(['catid' => $info['catid'], 'status' => 1])->order('id desc')->limit(6)->select();
|
|
|
+
|
|
|
+ $about_news = Db::name('news')->field('id,title,thumb,create_time')->where(['status' => 1])
|
|
|
+ ->where('create_time','lt',$info['create_time'])
|
|
|
+ ->order('id desc')->limit(6)->select();
|
|
|
+ $brand_news = Db::name('news')->field('id,title,thumb,create_time')->where(['status' => 1])
|
|
|
+ ->where('create_time','gt',$info['create_time'])
|
|
|
+ ->limit(6)->select();
|
|
|
+
|
|
|
//热门加盟
|
|
|
$hot_jm = Db::name('jiameng')->field('id,title,hits')->where('catid', $info['catid'])->where('status', 1)->order('hits desc')->limit(20)->select();
|
|
|
//最新加盟
|
|
|
@@ -351,7 +359,7 @@ class JiamengController extends HomeBaseController
|
|
|
$this->assign('hot_jm', $hot_jm);
|
|
|
$this->assign('zx_jm', $zx_jm);
|
|
|
$this->assign('jx_jm', $jx_jm);
|
|
|
- $this->assign('about_news', $about_news);
|
|
|
+ $this->assign('about_news', array_reverse($about_news->toArray()));
|
|
|
$this->assign('brand_news', $brand_news);
|
|
|
$this->assign('paihang', $paihang);
|
|
|
$this->assign('hot_cate', $hot_cate);
|