Depart.php 858 字节
<?php

namespace app\inspection\controller;

use app\common\controller\Frontend;

class Depart extends Frontend
{

    protected $noNeedLogin = [];
    protected $noNeedRight = '*';
    protected $layout = '';

    public function _initialize()
    {
        parent::_initialize();

        $this->model = new \app\admin\model\inspection\Depart;
    }

    public function list()
    {
        $list1 = $this->model
            ->where('pid', 1)
            ->where(['type' => '0'])
            ->paginate(10, '', ['query' => $this->request->param()]);
        $list2 = $this->model
            ->where('pid', 2)
            ->where(['type' => '0'])
            ->paginate(10, '', ['query' => $this->request->param()]);
        $this->view->assign('list1', $list1);
        $this->view->assign('list2', $list2);
        return $this->view->fetch();
    }

}