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
6349af9d
Commit
6349af9d
authored
Dec 15, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决点开视频重新开始播放的问题
parent
a48976d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
pages/courseDetail/courseDetail.vue
+13
-8
No files found.
pages/courseDetail/courseDetail.vue
View file @
6349af9d
...
@@ -22,10 +22,14 @@
...
@@ -22,10 +22,14 @@
<!-- 课程banner图 -->
<!-- 课程banner图 -->
<!-- v-show="!sliceshare" -->
<!-- v-show="!sliceshare" -->
<view
class=
"courseBannerBox"
v-if=
"!sliceshare"
>
<view
class=
"courseBannerBox"
v-if=
"!sliceshare"
>
<video
id=
"myVideo"
:src=
"courseInfo.filePathOss"
:initial-time=
"videoPlaybackInfo.maxViewTime"
<template
v-if=
"isRenderVideo"
>
object-fit=
"contain"
class=
"videoBox"
:poster=
"courseInfo.fileFirstImage"
:title=
"courseInfo.fileTitle"
<view>
@
loadedmetadata=
"loadedmetadata"
@
play=
"playVideo"
@
pause=
"pause"
@
ended=
"ended"
<video
id=
"myVideo"
:src=
"courseInfo.filePathOss"
:initial-time=
"videoPlaybackInfo.maxViewTime"
@
timeupdate=
"timeupdate"
></video>
object-fit=
"contain"
class=
"videoBox"
:poster=
"courseInfo.fileFirstImage"
:title=
"courseInfo.fileTitle"
@
loadedmetadata=
"loadedmetadata"
@
play=
"playVideo"
@
pause=
"pause"
@
ended=
"ended"
@
timeupdate=
"timeupdate"
></video>
</view>
</
template
>
</view>
</view>
<!-- 课程详情图 -->
<!-- 课程详情图 -->
...
@@ -46,7 +50,7 @@
...
@@ -46,7 +50,7 @@
<view
class=
"dataBox"
>
<view
class=
"dataBox"
>
<strong
v-if=
"courseInfo.status==1"
>
¥{{courseInfo.coursePrice}}
</strong>
<strong
v-if=
"courseInfo.status==1"
>
¥{{courseInfo.coursePrice}}
</strong>
<text
v-if=
"courseInfo.status==2"
style=
"color: #F15A1F;margin-right: 20rpx;"
><i
<text
v-if=
"courseInfo.status==2"
style=
"color: #F15A1F;margin-right: 20rpx;"
><i
class=
"iconfont icon-yifukuan"
></i>
已购
</text>
class=
"iconfont icon-yifukuan"
></i>
已购
{{videoPlaybackInfo.maxViewTime}}
</text>
<text>
{{courseInfo.salesNumber}}人购买
</text>
<text>
{{courseInfo.salesNumber}}人购买
</text>
</view>
</view>
...
@@ -140,6 +144,7 @@
...
@@ -140,6 +144,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
isRenderVideo
:
false
,
fileId
:
null
,
fileId
:
null
,
lecturerId
:
null
,
lecturerId
:
null
,
tabType
:
3
,
tabType
:
3
,
...
@@ -335,13 +340,12 @@
...
@@ -335,13 +340,12 @@
'cffp_userId'
),
'cffp_userId'
),
packFileId
:
this
.
courseInfo
.
packFileId
packFileId
:
this
.
courseInfo
.
packFileId
}).
then
(
res
=>
{
}).
then
(
res
=>
{
console
.
log
(
'详情页面--res'
,
res
,
1251255
)
if
(
res
[
'success'
])
{
if
(
res
[
'success'
])
{
this
.
courseInfo
=
res
[
'data'
][
'data'
];
this
.
courseInfo
=
res
[
'data'
][
'data'
];
this
.
lecturerId
=
res
[
'data'
][
'data'
][
'fileLecturerId'
];
this
.
lecturerId
=
res
[
'data'
][
'data'
][
'fileLecturerId'
];
this
.
lecturerQuery
();
this
.
lecturerQuery
();
if
(
this
.
courseInfo
.
status
===
2
)
{
if
(
this
.
courseInfo
.
status
===
2
)
{
this
.
findVideoPlayback
()
this
.
findVideoPlayback
()
;
}
}
}
}
})
})
...
@@ -406,9 +410,10 @@
...
@@ -406,9 +410,10 @@
systemType
:
1
,
systemType
:
1
,
userId
:
this
.
userId
,
userId
:
this
.
userId
,
fileId
:
this
.
fileId
,
fileId
:
this
.
fileId
,
packFileId
:
this
.
courseInfo
.
packFileId
packFileId
:
this
.
courseInfo
.
packFileId
,
}
}
api
.
findVideoPlayback
(
param
).
then
(
res
=>
{
api
.
findVideoPlayback
(
param
).
then
(
res
=>
{
this
.
isRenderVideo
=
true
;
if
(
res
[
'success'
])
{
if
(
res
[
'success'
])
{
this
.
videoPlaybackInfo
=
res
[
'data'
]
this
.
videoPlaybackInfo
=
res
[
'data'
]
}
}
...
...
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