<?php // +---------------------------------------------------------------------- // | bronet [ 以客户为中心 以奋斗者为本 ] // +---------------------------------------------------------------------- // | Copyright (c) 2013-2017 http://www.bronet.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- namespace app\portal\controller; use cmf\controller\HomeBaseController; use EasyWeChat\Foundation\Application; use think\Db; class IndexController extends HomeBaseController { public function index() { //首页关于我们 $about_data = Db::name('portal_post') -> where('id',1) -> find(); $about_data['post_content'] = cmf_replace_content_file_url(htmlspecialchars_decode($about_data['post_content'])); $this -> assign('about_data',$about_data); //首页中心设备 $shebei_data = Db::name('portal_post') -> where('id',2) -> find(); $shebei_data['post_content'] = cmf_replace_content_file_url(htmlspecialchars_decode($shebei_data['post_content'])); $this -> assign('shebei_data',$shebei_data); return $this->fetch(':index'); } }