更新前端文件
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
namespace app\controller;
|
||||
|
||||
use app\BaseController;
|
||||
use think\facade\Config;
|
||||
use think\facade\Cache;
|
||||
|
||||
/**
|
||||
* @title 后端公共模块
|
||||
@@ -22,13 +22,13 @@ class Admin extends BaseController {
|
||||
'\app\middleware\Admin'
|
||||
];
|
||||
|
||||
protected $data = ['meta' => ['title'=>''], 'data' => [], 'code' => 0, 'msg' => ''];
|
||||
protected $data = ['data' => [], 'code' => 0, 'msg' => ''];
|
||||
|
||||
protected function initialize(){
|
||||
$config = Config::get('system');
|
||||
$config = Cache::get('system_config');
|
||||
if (!$config) {
|
||||
$config = (new \app\model\Config())->lists();
|
||||
Config::set($config, 'system');
|
||||
Cache::set('system_config', $config);
|
||||
}
|
||||
$this->data['config'] = $config;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user