From e6a80150f956507ee6c02da3835efd6a2ba223dc Mon Sep 17 00:00:00 2001 From: none Date: Wed, 19 Jul 2023 13:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E8=AF=BE=E7=A8=8B-=E8=AF=BE?= =?UTF-8?q?=E6=97=B6-=E5=AD=A6=E5=91=98=E7=9A=84=E5=AD=A6=E4=B9=A0?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=BF=94=E5=9B=9Evideo=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Backend/Api/V1/CourseController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Controllers/Backend/Api/V1/CourseController.php b/app/Http/Controllers/Backend/Api/V1/CourseController.php index 88aaf92b1..ab315f91f 100644 --- a/app/Http/Controllers/Backend/Api/V1/CourseController.php +++ b/app/Http/Controllers/Backend/Api/V1/CourseController.php @@ -384,6 +384,7 @@ public function videoWatchRecords($courseId, $userId) if ($chapters->isEmpty()) { foreach ($videos as $videoItem) { $tmp = [ + 'video_id' => $videoItem['id'], 'video_title' => $videoItem['title'], 'duration' => $videoItem['duration'], 'watch_seconds' => $videoWatchRecords[$videoItem['id']]['watch_seconds'] ?? 0, @@ -401,6 +402,7 @@ public function videoWatchRecords($courseId, $userId) foreach ($list as $videoItem) { $tmp = [ + 'video_id' => $videoItem['id'], 'video_title' => sprintf('%s-%s', $chapter['title'], $videoItem['title']), 'duration' => $videoItem['duration'], 'watch_seconds' => $videoWatchRecords[$videoItem['id']]['watch_seconds'] ?? 0,