1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace app\common\controllers;
- use app\common\components\SiteUrl;
- use Yii;
- /**
- * 用户中心基类
- */
- class UController extends FController
- {
- public $layout = 'uc';
- public $tableConfig;//列表页配置
- public $tableTitle;//列表页表头
- public $topLeftTableMenu;
- public $topRightTableMenu;
- public $operTableMenu;
- public $assetsUrl;
- public function behaviors()
- {
- parent::behaviors();
- return [
- [
- 'class' => 'app\common\filters\FrontEndAuthFilter',
- 'except' => ['login','register','forgetpwd','vip']
- ],
- [
- 'class' => 'app\common\filters\FrontEndLoginedFilter',
- 'only' => ['login','register']
- ],
- [
- 'class' => 'app\common\filters\FrontEndTokenFilter',
- 'except' => ['login','register','forgetpwd']
- ],
- ];
- }
- public function init()
- {
- parent::init();
- $this->navList = $this->getNavData(3);
- $this->breadcrumbs[] = ['label' => '用户中心','url' =>SiteUrl::ucenter()];
- $asset = \app\assets\PcAsset::register(Yii::$app->getView());
- $this->assetsUrl = $asset->baseUrl;
- }
- }
|