no message

This commit is contained in:
kuaifan 2022-11-09 17:19:08 +08:00
parent 78ab3c591a
commit bb4b09134f
2 changed files with 7 additions and 7 deletions

View File

@ -241,24 +241,24 @@ class IndexController extends InvokeController
$path = "uploads/android";
$dirPath = public_path($path);
$lists = Base::readDir($dirPath);
$ipkFile = null;
$apkFile = null;
foreach ($lists as $file) {
if (!str_ends_with($file, '.ipk')) {
if (!str_ends_with($file, '.apk')) {
continue;
}
if ($ipkFile && strtotime($ipkFile['time']) > fileatime($file)) {
if ($apkFile && strtotime($apkFile['time']) > fileatime($file)) {
continue;
}
$fileName = Base::leftDelete($file, $dirPath);
$ipkFile = [
$apkFile = [
'name' => substr($fileName, 1),
'time' => date("Y-m-d H:i:s", fileatime($file)),
'size' => Base::readableBytes(filesize($file)),
'url' => Base::fillUrl($path . $fileName),
];
}
if ($ipkFile) {
$files = array_merge([$ipkFile], $files);
if ($apkFile) {
$files = array_merge([$apkFile], $files);
}
return view('desktop', ['version' => $name, 'files' => $files]);
}

@ -1 +1 @@
Subproject commit bfecdb441ab81fee42a63f28008709fab7e1186e
Subproject commit 9ec6375d8da6d06a680a378c05267e3480062efd