feat(ota): 添加OTA版本管理功能

- 实现OTA版本列表页面,支持版本信息展示
- 添加版本名称、版本号、APK文件等字段显示
- 集成文件上传和SHA-256校验功能
- 实现强制更新开关和状态管理
- 添加发布按钮支持版本发布操作
- 集成表格增删改查基础功能
- 实现文件大小格式化显示
- 添加目标设备
This commit is contained in:
2026-04-10 09:02:22 +08:00
parent d635b405b9
commit 125518aa98

View File

@@ -55,7 +55,7 @@ class Version extends Backend
// 计算 APK 文件信息
if ($row['apk_file']) {
$fullPath = root_path() . 'public' . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . ltrim($row['apk_file'], '/');
$fullPath = ROOT_PATH . 'public' . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . ltrim($row['apk_file'], '/');
if (file_exists($fullPath)) {
$row->file_size = filesize($fullPath);
$row->sha256 = hash_file('sha256', $fullPath);