审查视图

app/index/controller/IndexController.php 974 字节
王晓刚 authored
1 2 3 4 5 6 7 8 9
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/24
 * Time: 18:51
 */
namespace app\index\controller;
王晓刚 authored
10
use app\index\model\PageHtmlModel;
王晓刚 authored
11 12 13 14 15 16 17 18
use cmf\controller\WeChatBaseController;
use think\Db;

class IndexController extends WeChatBaseController
{
    //授权
    function _initialize()
    {
王晓刚 authored
19 20
        //判断用户是否微信浏览器打开
        $this->isWechat();
王晓刚 authored
21 22
        //判断是否手机端
        $this->isMobile();
王晓刚 authored
23 24 25 26 27
        //微信授权
        parent::_initialize();
        $this->checkWeChatUserLogin();
        //阻止拉黑用户
        $this->ban();
王晓刚 authored
28
    }
王晓刚 authored
29
    //主页
王晓刚 authored
30
    public function index(){
王晓刚 authored
31 32 33
        //首页缩略图
        $PageHtmlModel = new PageHtmlModel();
        $page_html = $PageHtmlModel->findData(array('id'=>1));
王晓刚 authored
34 35 36 37 38 39
        $this->assign(
            array(
                'page_html'=>$page_html,
                'title'=>'保单托管',
                )
        );
王晓刚 authored
40
        return $this->fetch();
王晓刚 authored
41
    }
王晓刚 authored
42
王晓刚 authored
43
}