Authored by wuxiao

删除代码

... ... @@ -4,7 +4,6 @@ namespace backend\controllers;
use Yii;
use yii\web\Controller;
use yii\helpers\ArrayHelper;
use backend\components\filters\AccessControl;
/**
* Site controller
... ... @@ -28,25 +27,6 @@ class BaseController extends Controller
parent::init();
}
/**
* @inheritdoc
*/
public function behaviors()
{
return [];
return ArrayHelper::merge(parent::behaviors(), [
[
'class' => AccessControl::className(),
'rules' => [
[
'allow' => true,
'roles' => ['@'],
],
],
],
]);
}
public function beforeAction($action) {
Yii::setAlias('@web', Yii::getAlias('@admin'));
Yii::$app->setHomeUrl(Yii::getAlias('@web'));
... ...