<?php namespace app\portal\controller; use cmf\controller\HomeBaseController; use EasyWeChat\Foundation\Application; use think\Db; class NewController extends HomeBaseController{ //显示澳德新闻列表 public function aonew(){ $new_data = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id=b.id','LEFT') -> where("a.category_id=22") -> paginate(8); $this -> assign('data',$new_data); return $this -> fetch(); } //显示新闻内容页 public function new_content(){ $id = $this -> request -> param(); $data = Db::name('portal_post') -> where('id',$id['id']) -> find(); $data['post_content'] = cmf_replace_content_file_url(htmlspecialchars_decode($data['post_content'])); $this -> assign('data',$data); return $this -> fetch(); } //显示行业动向新闻列表 public function indu_new(){ $new_data = Db::name('portal_category_post') -> alias('a') -> join('portal_post b','a.post_id=b.id','LEFT') -> where("a.category_id=23") -> paginate(8); $this -> assign('data',$new_data); return $this -> fetch(); } }