// +---------------------------------------------------------------------- namespace app\member\controller; use think\Db; class Question extends Base { private $brands=[ 1=>['title'=>'深圳市文化金融服务中心','infor'=>'战略中心','txt'=>'深圳市文化金融服务中心(深圳文化产权交易所)是文化和旅游部产业发展司委托的文化和旅游产业专项债券及投资基金融资对接交流活动承接单位,在文化和旅游部产业发展司的支持下,联合各地文化和旅游厅(局)累计举办文化和旅游产业专项债券及投资基金融资对接交流活动16场次。深圳市文化金融服务中心(深圳文化产权交易所)积极为各地文化和旅游企业(项目)提供政策咨询与辅导、路演推介、资金对接等服务,累计服务文化和旅游企业上千家。'], 2=>['title'=>'文化金融(艺术资产)交易中心','infor'=>'要素交易和投融资服务','txt'=>''], 3=>['title'=>'国有业务','infor'=>'招拍挂中心','txt'=>''], 7=>['title'=>'区域合作中心','infor'=>'开发合作区域','txt'=>''], 8=>['title'=>'乡村振兴(古建资产管理)计划中心','infor'=>'乡村振兴平台','txt'=>''], 10=>['title'=>'沉浸式要素交易平台','infor'=>'文旅资产交易','txt'=>''] ]; public function index(){ $list=Db::name('news')->field('n_id,n_title')->where(['n_kind'=>18,'n_status'=>1])->order('n_order,n_time desc')->limit(100)->select(); $this->assign('list',$list); return $this->view->fetch(); } public function detail(){ $id=input('id'); $current=Db::name('news')->field('n_id,n_title,n_content,n_cid')->where(['n_id'=>$id,'n_kind'=>18,'n_status'=>1])->find(); $this->assign('current',$current); $cid=''; if($current)$cid=$current['n_cid']; $list=Db::name('news')->field('n_id,n_title')->where(['n_kind'=>18,'n_cid'=>$cid,'n_id'=>['neq',$id],'n_status'=>1])->order('n_order,n_time desc')->limit(20)->select(); $this->assign('list',$list); return $this->view->fetch(); } public function showlist(){ $keyword=input('keyword'); $this->assign("keyword",$keyword); $where=['n_kind'=>18,'n_status'=>1]; if($keyword){ $where['n_title|n_content']=['like','%'.$keyword.'%']; } foreach ($this->brands as $k=>$vo){ $where['n_cid']=$k; $list=Db::name('news')->field('n_id,n_title,n_content')->where($where)->order('n_order,n_time desc')->limit(20)->select(); $this->brands[$k]['list']=$list; } $this->assign("brands",$this->brands); return $this->view->fetch(); } }