更新目录结构

This commit is contained in:
2023-10-21 21:18:46 +08:00
parent 664295167d
commit 1153b13299
298 changed files with 3032 additions and 2173 deletions

View File

@@ -9,8 +9,23 @@
namespace app\controller;
use app\BaseController;
use think\facade\Cache;
use app\services\system\DictionaryService;
class Base extends BaseController{
public $data = ['code' => 1, 'data' => '', 'message' => ''];
public function initialize(){
$this->cacheData($this->request); //缓存基础数据
}
protected function cacheData($request) {
$diction = Cache::get('diction');
if(!$diction){
$service = app()->make(DictionaryService::class);
$data = $service->getDictionaryAll();
Cache::set('diction', $data);
}
}
}