更新
This commit is contained in:
@@ -11,7 +11,9 @@ namespace app\controller;
|
||||
use think\App;
|
||||
use think\exception\ValidateException;
|
||||
use think\facade\View;
|
||||
use think\facade\Cache;
|
||||
use think\Validate;
|
||||
use app\model\Config;
|
||||
|
||||
class Base {
|
||||
|
||||
@@ -62,6 +64,12 @@ class Base {
|
||||
$this->app = $app;
|
||||
$this->request = $this->app->request;
|
||||
|
||||
$config = Cache::get('system_config_data');
|
||||
if (!$config) {
|
||||
$config = Config::getConfigList($this->request);
|
||||
Cache::set('system_config_data', $config);
|
||||
}
|
||||
View::assign('config', $config);
|
||||
// 控制器初始化
|
||||
$this->initialize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user