Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
bcf7c42d
Commit
bcf7c42d
authored
Dec 20, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
试听课程以及未听的不保存轨迹
parent
5051ea4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
pages/courseDetail/courseDetail.vue
+20
-16
No files found.
pages/courseDetail/courseDetail.vue
View file @
bcf7c42d
...
...
@@ -474,18 +474,20 @@
},
// // 暂停播放
async
pause
()
{
console
.
log
(
'pause'
)
this
.
isPauseFlag
=
true
;
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
)
}
const
result
=
await
this
.
saveVideoPlayback
()
if
(
result
==
'success'
&&
this
.
newCourseInfo
.
fileId
){
console
.
log
(
'新的课程要进行赋值查询了'
)
this
.
fileId
=
this
.
newCourseInfo
.
fileId
;
this
.
courseInfo
.
packFileId
=
this
.
newCourseInfo
.
packFileId
;
this
.
playbackId
=
null
;
this
.
courseDetail
();
if
(
this
.
courseInfo
.
status
!=
1
){
console
.
log
(
'pause'
)
this
.
isPauseFlag
=
true
;
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
)
}
const
result
=
await
this
.
saveVideoPlayback
()
if
(
result
==
'success'
&&
this
.
newCourseInfo
.
fileId
){
console
.
log
(
'新的课程要进行赋值查询了'
)
this
.
fileId
=
this
.
newCourseInfo
.
fileId
;
this
.
courseInfo
.
packFileId
=
this
.
newCourseInfo
.
packFileId
;
this
.
playbackId
=
null
;
this
.
courseDetail
();
}
}
},
timeupdate
(
e
)
{
...
...
@@ -574,10 +576,12 @@
this
.
videoContext
=
uni
.
createVideoContext
(
'myVideo'
);
},
onUnload
()
{
this
.
videoContext
.
pause
();
this
.
saveVideoPlayback
();
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
)
if
(
this
.
courseInfo
.
status
!=
1
&&
this
.
viewTime
!=
0
)
{
this
.
videoContext
.
pause
();
this
.
saveVideoPlayback
();
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment