<?php /** * Created by PhpStorm. * User: Administrator * Date: 2018/12/24 * Time: 18:51 */ namespace app\index\controller; use app\index\model\PageHtmlModel; use cmf\controller\WeChatBaseController; use think\Db; class IndexController extends WeChatBaseController { //授权 function _initialize() { //判断用户是否微信浏览器打开 $this->isWechat(); //判断是否手机端 $this->isMobile(); //微信授权 parent::_initialize(); $this->checkWeChatUserLogin(); //阻止拉黑用户 $this->ban(); } //主页 public function index(){ //首页缩略图 $PageHtmlModel = new PageHtmlModel(); $page_html = $PageHtmlModel->findData(array('id'=>1)); $this->assign( array( 'page_html'=>$page_html, 'title'=>'保单托管', ) ); return $this->fetch(); } }