mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
no message
This commit is contained in:
parent
78ab3c591a
commit
bb4b09134f
@ -241,24 +241,24 @@ class IndexController extends InvokeController
|
|||||||
$path = "uploads/android";
|
$path = "uploads/android";
|
||||||
$dirPath = public_path($path);
|
$dirPath = public_path($path);
|
||||||
$lists = Base::readDir($dirPath);
|
$lists = Base::readDir($dirPath);
|
||||||
$ipkFile = null;
|
$apkFile = null;
|
||||||
foreach ($lists as $file) {
|
foreach ($lists as $file) {
|
||||||
if (!str_ends_with($file, '.ipk')) {
|
if (!str_ends_with($file, '.apk')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($ipkFile && strtotime($ipkFile['time']) > fileatime($file)) {
|
if ($apkFile && strtotime($apkFile['time']) > fileatime($file)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$fileName = Base::leftDelete($file, $dirPath);
|
$fileName = Base::leftDelete($file, $dirPath);
|
||||||
$ipkFile = [
|
$apkFile = [
|
||||||
'name' => substr($fileName, 1),
|
'name' => substr($fileName, 1),
|
||||||
'time' => date("Y-m-d H:i:s", fileatime($file)),
|
'time' => date("Y-m-d H:i:s", fileatime($file)),
|
||||||
'size' => Base::readableBytes(filesize($file)),
|
'size' => Base::readableBytes(filesize($file)),
|
||||||
'url' => Base::fillUrl($path . $fileName),
|
'url' => Base::fillUrl($path . $fileName),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if ($ipkFile) {
|
if ($apkFile) {
|
||||||
$files = array_merge([$ipkFile], $files);
|
$files = array_merge([$apkFile], $files);
|
||||||
}
|
}
|
||||||
return view('desktop', ['version' => $name, 'files' => $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