videoWorkService = new VideoWorkService(); } /** * 视频作品列表。 * * GET /api/v1/video-work/list * * 请求参数: * - `platform`:平台编号,传 `all` 时不过滤 * - `vuid`:账号ID,传 `all` 时不过滤 * - `page`:页码 * - `page_size`:每页数量 * * 返回结构: * - `filters`:平台与账号筛选项 * - `summary`:顶部统计卡片 * - `pagination`:分页信息 * - `list`:作品卡片列表 */ public function index() { try { $payload = $this->request->payload ?? null; if (!$payload || empty($payload['userid'])) { return Response::error('未登录', 401); } $result = $this->videoWorkService->getVideoList((int) $payload['userid'], [ 'platform' => $this->request->get('platform', 'all'), 'vuid' => $this->request->get('vuid', 'all'), 'page' => (int) $this->request->get('page', 1), 'page_size' => (int) $this->request->get('page_size', 12), ]); return Response::success($result); } catch (\Exception $exception) { return Response::error($exception->getMessage(), $exception->getCode() ?: 500); } } }