You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
627 B

<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 10/3/2019
* Time: 2:32 PM
*/
namespace app\admin\controller;
use think\Controller;
use think\Env;
use think\Session;
class BaseController extends Controller
{
public function _initialize()
{
//跳过前台因出现PHP语句的报错
if (!Env::get("debug.reportingNotice")) {
error_reporting(E_ALL & ~E_NOTICE);
}
//当前台没有传数据过来时,刷新页面
$id = Session::get('id');
if (!$id) {
return $this->redirect('Login/index');
}
}
}