mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-28 04:40:37 +00:00
no message
This commit is contained in:
parent
78ab3c591a
commit
bb4b09134f
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user