Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uniapp_vedio
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
uniapp_vedio
Commits
4ca10570
Commit
4ca10570
authored
Oct 12, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
d939f3ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
videoDetail.vue
vedio/pagesC/video/videoDetail.vue
+7
-8
No files found.
vedio/pagesC/video/videoDetail.vue
View file @
4ca10570
...
...
@@ -5,7 +5,7 @@
<swiper-item
v-for=
"(list, index) in displaySwiperList"
:key=
"index"
:style=
"'width:100%; height:100%;'"
>
<view
:style=
"'width:100%; height:100%;'"
>
<video
v-if=
"Math.abs(displayIndex-index)==0 && list.vedioUrl"
:id=
"list.vedioIndex"
:controls=
"isqp"
:loop=
"!isplay"
:enable-progress-gesture=
"false"
:
auto-play
=
"true"
:controls=
"isqp"
:loop=
"!isplay"
:enable-progress-gesture=
"false"
:
show-progress
=
"true"
:show-play-btn=
"isqp"
:show-loading=
"true"
:show-fullscreen-btn=
"false"
@
ended=
"ended"
@
controlstoggle=
"controlstoggle"
@
click=
"tapVides()"
@
timeupdate=
"timeupdate"
:style=
"'width:100%; height:100%;'"
:src=
"list.vedioUrl"
:poster=
"data.coverImage"
...
...
@@ -270,13 +270,13 @@
data
})
=>
{
this
.
originList
=
data
.
list
if
(
this
.
isPlayNext
==
0
)
{
this
.
originIndex
=
this
.
data
.
seeIndex
-
1
}
else
{
if
(
this
.
isPlayNext
==
1
)
{
this
.
originIndex
=
this
.
data
.
recommendIndex
-
1
if
(
this
.
originIndex
>=
this
.
data
.
unlockIndex
-
1
)
{
this
.
originIndex
=
this
.
data
.
unlockIndex
-
1
}
}
else
{
this
.
originIndex
=
this
.
data
.
seeIndex
-
1
}
if
(
this
.
originIndex
>=
this
.
data
.
vedioTotal
||
this
.
originIndex
<
0
)
{
this
.
originIndex
=
0
...
...
@@ -296,7 +296,7 @@
}
else
{
this
.
current
=
0
}
this
.
isqp
=
fals
e
this
.
isqp
=
tru
e
console
.
log
(
'显示swiper Index:'
,
this
.
displayIndex
)
}
},
...
...
@@ -305,7 +305,6 @@
* @originIndex 从源数据的哪个开始显示默认0,如从其他页面跳转进来,要显示第n个,这个参数就是他的下标
*/
initSwiperData
(
originIndex
=
this
.
originIndex
)
{
this
.
isqp
=
false
console
.
log
(
'--------当前数据 Index:'
,
originIndex
)
const
originListLength
=
this
.
originList
.
length
;
// 源数据长度
const
displayList
=
[];
...
...
@@ -332,12 +331,12 @@
uni
.
createVideoContext
(
""
+
this
.
originList
[
this
.
oid
].
vedioIndex
,
this
).
stop
();
if
(
this
.
originList
[
originIndex
].
vedioIndex
>
this
.
data
.
unlockIndex
)
{
this
.
isqp
=
fals
e
this
.
isqp
=
tru
e
this
.
fenji
=
2
this
.
$refs
.
select
.
open
(
'bottom'
);
}
else
{
setTimeout
(()
=>
{
this
.
isqp
=
fals
e
this
.
isqp
=
tru
e
console
.
log
(
'qqqqqq:'
,
this
.
originList
[
originIndex
].
vedioIndex
)
// audo.play()
uni
.
createVideoContext
(
""
+
this
.
originList
[
originIndex
].
vedioIndex
,
this
).
play
();
...
...
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