| 1234567891011121314151617181920212223242526 | <?phpnamespace app\enterprise\common;use app\BaseController;use app\common\middleware\Auth;/** * Description of EnterpriseController * * @author sgq */class EnterpriseController extends BaseController {    protected $middleware = [Auth::class];    protected $user;    //put your code here    public function __construct(\think\App $app) {        parent::__construct($app);        $this->user = session("user");        if ($this->user["usertype"] != 2)            session("user", null);    }}
 |