diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php index 962fbbf58..b3ebc4ebc 100755 --- a/app/Http/Controllers/IndexController.php +++ b/app/Http/Controllers/IndexController.php @@ -237,6 +237,29 @@ class IndexController extends InvokeController 'url' => Base::fillUrl($path . $fileName), ]; } + // + $path = "uploads/android"; + $dirPath = public_path($path); + $lists = Base::readDir($dirPath); + $ipkFile = null; + foreach ($lists as $file) { + if (!str_ends_with($file, '.ipk')) { + continue; + } + if ($ipkFile && strtotime($ipkFile['time']) > fileatime($file)) { + continue; + } + $fileName = Base::leftDelete($file, $dirPath); + $ipkFile = [ + '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); + } return view('desktop', ['version' => $name, 'files' => $files]); } // 下载 diff --git a/app/Models/Meeting.php b/app/Models/Meeting.php index 202530770..92ba18bbc 100644 --- a/app/Models/Meeting.php +++ b/app/Models/Meeting.php @@ -12,7 +12,7 @@ namespace App\Models; * @property int|null $userid 创建人 * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at - * @property \Illuminate\Support\Carbon|null $end_at + * @property string|null $end_at * @property \Illuminate\Support\Carbon|null $deleted_at * @method static \Illuminate\Database\Eloquent\Builder|Meeting newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Meeting newQuery() diff --git a/app/Models/ProjectTaskPushLog.php b/app/Models/ProjectTaskPushLog.php index 25d562cfa..05d14b8f3 100644 --- a/app/Models/ProjectTaskPushLog.php +++ b/app/Models/ProjectTaskPushLog.php @@ -16,17 +16,12 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property int|null $type 提醒类型:0 任务开始提醒,1 距离到期提醒,2到期超时提醒 * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at - * @property \Illuminate\Support\Carbon|null $deleted_at * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog newQuery() * @method static \Illuminate\Database\Query\Builder|ProjectTaskPushLog onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog query() * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereCreatedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereDeletedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereEmail($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereId($value) - * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereIsSend($value) - * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereSendError($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereTaskId($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereType($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereUpdatedAt($value) diff --git a/app/Models/UserDelete.php b/app/Models/UserDelete.php index 96958f766..3c9803d48 100644 --- a/app/Models/UserDelete.php +++ b/app/Models/UserDelete.php @@ -11,9 +11,9 @@ use App\Module\Base; * @property int $id * @property int|null $operator 操作人员 * @property int|null $userid 用户id - * @property string|null $email 邮箱账号 + * @property string|null $email 邮箱帐号 * @property string|null $reason 注销原因 - * @property string|null $cache 会员资料缓存 + * @property string $cache 会员资料缓存 * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @method static \Illuminate\Database\Eloquent\Builder|UserDelete newModelQuery() diff --git a/app/Models/WebSocketDialogMsgRead.php b/app/Models/WebSocketDialogMsgRead.php index 8a1a0c7c3..e7ccef355 100644 --- a/app/Models/WebSocketDialogMsgRead.php +++ b/app/Models/WebSocketDialogMsgRead.php @@ -10,7 +10,7 @@ use Carbon\Carbon; * @property int $id * @property int|null $dialog_id 对话ID * @property int|null $msg_id 消息ID - * @property int|null $userid 发送会员ID + * @property int|null $userid 接收会员ID * @property int|null $mention 是否提及(被@) * @property int|null $email 是否发了邮件 * @property int|null $after 在阅读之后才添加的记录 diff --git a/app/Models/clearHelper.php b/app/Models/clearHelper.php new file mode 100755 index 000000000..c06af8433 --- /dev/null +++ b/app/Models/clearHelper.php @@ -0,0 +1,23 @@ +