shish 5 лет назад
Родитель
Сommit
ceb91fc553
1 измененных файлов с 16 добавлено и 12 удалено
  1. 16 12
      app-hd/controllers/PublicController.php

+ 16 - 12
app-hd/controllers/PublicController.php

@@ -1,20 +1,24 @@
 <?php
+
 namespace hd\controllers;
+
 use common\components\baseController;
+use common\components\dict;
+use Yii;
 
-/**
- * 后台公共类
- */
-class PublicController extends baseController{
+class PublicController extends baseController
+{
 
-	public $webTitle		= '管理后台';
-	public $webDescription	= '';
-	public $webKeyword		= '';
-	public $version;//公共静态文件版本号
+    public $webTitle = '管理后台';
+    public $webDescription = '';
+    public $webKeyword = '';
+    public $version;//公共静态文件版本号
 
-	public function beforeAction($action){
-		$this->version		= '0.021';
-		return parent::beforeAction($action);
-	}
+    public function beforeAction($action)
+    {
+        $this->version = '0.021';
+        Yii::$app->params['ptStyle'] = dict::getDict('ptStyle', 'hd');
+        return parent::beforeAction($action);
+    }
 
 }