更新目录结构

This commit is contained in:
molong committed 2023-10-21 21:18:46 +08:00
1 parent 664295167d
commit 1153b13299
298 files changed
+3032 -2173

No files matched your search

+15
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);
}
}
}