From f9a4083cea3292b7feca2032f386aec7d4e20e2d Mon Sep 17 00:00:00 2001 From: xcw <727612669@qq.com> Date: Thu, 16 Mar 2023 18:09:57 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=98=E6=9C=80=E6=96=B0=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagesB/play-video/play-video.nvue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pagesB/play-video/play-video.nvue b/pagesB/play-video/play-video.nvue index c854426..3c8b513 100644 --- a/pagesB/play-video/play-video.nvue +++ b/pagesB/play-video/play-video.nvue @@ -63,15 +63,17 @@ onUnload() { console.log('页面销毁了') let course_video_id = this.videoList[this.currentIndex].course_video_id; - let params = { - course_video_id:course_video_id, - duration:parseInt(this.currentTime), - } - this.$requst.get('/api/course/create-browse-records',params).then(res=>{ - if(res.code == 0) { - console.log('观影记录提交成功',this.currentTime) + if(course_video_id) { + let params = { + course_video_id:course_video_id, + duration:parseInt(this.currentTime), } - }) + this.$requst.get('/api/course/create-browse-records',params).then(res=>{ + if(res.code == 0) { + console.log('观影记录提交成功',this.currentTime) + } + }) + } }, methods:{ // 视频滑动结束