Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
c2fe95b8
Commit
c2fe95b8
authored
Jun 16, 2025
by
张九刚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 Home 组件的视频弹窗逻辑,增加视频高度动态调整功能,并修复跳转链接时的参数传递
parent
85a08561
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
Home.vue
views/Home.vue
+15
-4
No files found.
views/Home.vue
View file @
c2fe95b8
...
...
@@ -53,7 +53,7 @@
<image
class=
"contentbg"
:src=
"$baseUrl + 'homepage/contentbg.png'"
alt=
""
/>
<image
class=
"contentitem"
:key=
"index"
:style=
"contentItem._style"
v-for=
"(contentItem, index) in contentImgList"
:src=
"$baseUrl + contentItem.bgUrl"
@
tap=
"jumpLink(contentItem.link, contentItem.videoUrl)"
></image>
@
tap=
"jumpLink(contentItem.link, contentItem.videoUrl
,index
)"
></image>
</view>
<view
class=
"channelbox"
>
<text
class=
"maintitle"
>
有声频道
</text>
...
...
@@ -130,7 +130,12 @@
</uni-popup>
</view>
<view
v-if=
"showVideo"
class=
"video-popup"
>
<video
:src=
"currentVideoUrl"
controls
autoplay
style=
"width: 100vw; height: 56vw;"
></video>
<video
:src=
"currentVideoUrl"
controls
autoplay
:style=
"
{ width: '100vw', height: videoHeight }"
>
</video>
<view
class=
"close-btn-bottom"
@
tap=
"closeVideo"
>
×
</view>
</view>
<RegisterLayer
v-model=
"showRegisterLayer"
/>
...
...
@@ -175,7 +180,8 @@ export default {
currentVideoUrl
:
''
,
isClickPhoneAuth
:
false
,
voiceStory
:{},
suggest
:{}
suggest
:{},
videoHeight
:
'56vw'
}
},
components
:{
...
...
@@ -280,13 +286,18 @@ export default {
jump
(
item
.
link
);
}
},
jumpLink
(
link
,
videoUrl
)
{
jumpLink
(
link
,
videoUrl
,
index
)
{
if
(
videoUrl
)
{
if
(
videoUrl
.
indexOf
(
'http'
)
===
-
1
){
videoUrl
=
this
.
$baseUrl
+
videoUrl
;
}
// 弹出视频
this
.
currentVideoUrl
=
videoUrl
;
if
(
index
===
1
){
this
.
videoHeight
=
"100vw"
;
}
else
{
this
.
videoHeight
=
"56vw"
;
}
this
.
showVideo
=
true
;
return
;
// 视频弹窗出现后,video标签的autoplay会自动播放
...
...
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