格式化代码;新增全局数据存储工具;

This commit is contained in:
2024-02-22 22:30:39 +08:00
parent f4c1fc9210
commit 667608d233
5 changed files with 80 additions and 19 deletions

View File

@@ -4,6 +4,7 @@
use app\common\exception\EventException;
use app\common\service\AuthService;
use app\common\tools\StoreValueTools;
use think\exception\HttpResponseException;
use think\facade\App;
use think\facade\Cache;
@@ -349,3 +350,13 @@ function format_bytes($size, $delimiter = '')
return round($size, 2) . $delimiter . $units[$i];
}
function get_store_value($key, $default = null)
{
return StoreValueTools::get($key, $default);
}
function set_store_value($key, $value)
{
return StoreValueTools::set($key, $value);
}