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
c6ae228b
Commit
c6ae228b
authored
Dec 19, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容首页 TAB 超出组件
parent
63e8ebf7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
30 deletions
+23
-30
App.vue
vedio/App.vue
+5
-7
recommendVideo.vue
vedio/components/home/recommendVideo.vue
+1
-1
home.vue
vedio/pages/home.vue
+17
-22
No files found.
vedio/App.vue
View file @
c6ae228b
...
...
@@ -19,6 +19,9 @@
// #endif
this
.
globalData
.
windowWidth
=
res
.
windowWidth
;
this
.
globalData
.
clientHeight
=
res
.
windowHeight
-
this
.
globalData
.
windowWidth
/
7
;
this
.
globalData
.
tabHeight
=
this
.
globalData
.
windowWidth
/
7
;
// 抖音
// #ifdef MP-TOUTIAO
this
.
globalData
.
statusBarHeight
=
0
;
...
...
@@ -51,12 +54,6 @@
}
// checkUpdate(this);
uni
.
getSystemInfo
({
success
:
(
res
=>
{
this
.
globalData
.
clientHeight
=
res
.
windowHeight
-
65
})
});
},
onShow
:
function
(
options
)
{
this
.
globalData
.
resetLogin
=
true
...
...
@@ -79,7 +76,8 @@
// baseUrl: 'http://test.mints-id.com/camera-api/miniApi',
// baseUrl: 'http://192.168.110.71:8301/miniApi',
titleButtonWidth
:
38
,
clientHeight
:
0
,
clientHeight
:
0
,
tabHeight
:
0
,
token
:
''
,
userId
:
0
,
inviteUId
:
''
,
...
...
vedio/components/home/recommendVideo.vue
View file @
c6ae228b
...
...
@@ -6,7 +6,7 @@
<view
v-if=
"Math.abs(displayIndex-index)==0"
style=
"height: 100%;"
@
click=
"tapVideoHover()"
>
<tt-video-player
v-if=
"Math.abs(displayIndex-index)==0"
:id=
"'remmend'+list.vedioId"
:album-id=
"list.douyinAlbumId"
:episode-id=
"list.douyinEpisodeId"
:cloud-type=
"1"
version=
"1"
object-fit=
"
contain
"
:controls=
"controls"
:poster=
"data.coverImage"
:loop=
"!isplay"
object-fit=
"
fill
"
:controls=
"controls"
:poster=
"data.coverImage"
:loop=
"!isplay"
:autoplay=
"false"
:enable-progress-gesture=
"false"
:show-loading=
"true"
@
play=
"startPlay"
:show-fullscreen-btn=
"false"
@
controlstoggle=
"controlstoggle"
@
ended=
"ended"
/>
</view>
...
...
vedio/pages/home.vue
View file @
c6ae228b
<
template
>
<view
class=
"body"
>
<view
:style=
"
{'height': clientHeight + 'px'}">
<view
v-if=
"clientHeight!=0"
:style=
"
{'height': clientHeight + 'px'}">
<indexPage
v-show=
"currentPage==0"
ref=
"index"
/>
<recommendPage
v-on:showEditBarH=
"showEditBarH"
v-on:changeBottomBarColor=
"changeBottomBarColor"
v-show=
"currentPage==1"
ref=
"recommend"
/>
<userPage
v-show=
"currentPage==2"
ref=
"user"
/>
</view>
<view
v-if=
"!isShowBlackBar"
class=
"tabs-bar"
style=
"height: 65px;"
>
<view
:class=
"currentPage==0?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
@
click=
"tabChange(0)"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<view
v-if=
"!isShowBlackBar"
class=
"tabs-bar"
:style=
"
{'height': tabHeight + 'px'}">
<view
:class=
"currentPage==0?'tab active': 'tab'"
@
click=
"tabChange(0)"
>
<view
style=
"margin-top: 15rpx;"
>
<image
v-if=
"currentPage==0"
class=
"tabs-image"
src=
"/static/tab/index_selected.png"
mode=
"heightFix"
>
</image>
...
...
@@ -17,18 +16,16 @@
</view>
剧场
</view>
<view
:class=
"currentPage == 1?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
@
click=
"tabChange(1)"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<view
:class=
"currentPage == 1?'tab active': 'tab'"
@
click=
"tabChange(1)"
>
<view
style=
"margin-top: 15rpx;"
>
<image
v-if=
"currentPage==1"
class=
"tabs-image"
src=
"/static/tab/promote_selected.png"
mode=
"heightFix"
></image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/promote_unselected.png"
mode=
"heightFix"
></image>
</view>
推荐
</view>
<view
:class=
"currentPage == 2?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
@
click=
"tabChange(2)"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<view
:class=
"currentPage == 2?'tab active': 'tab'"
@
click=
"tabChange(2)"
>
<view
style=
"margin-top: 15rpx;"
>
<image
v-if=
"currentPage==2"
class=
"tabs-image"
src=
"/static/tab/my_selected.png"
mode=
"heightFix"
>
</image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/my_unselected.png"
mode=
"heightFix"
></image>
...
...
@@ -37,10 +34,9 @@
</view>
</view>
<view
v-if=
"isShowBlackBar"
class=
"tabs-bar2"
style=
"height: 65px;"
>
<view
:class=
"currentPage==0?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
@
click=
"tabChange(0)"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<view
v-if=
"isShowBlackBar"
class=
"tabs-bar2"
:style=
"
{'height': tabHeight + 'px'}">
<view
:class=
"currentPage==0?'tab active': 'tab'"
@
click=
"tabChange(0)"
>
<view
style=
"margin-top: 15rpx;"
>
<image
v-if=
"currentPage==0"
class=
"tabs-image"
src=
"/static/tab/index_selected.png"
mode=
"heightFix"
>
</image>
...
...
@@ -48,18 +44,16 @@
</view>
剧场
</view>
<view
:class=
"currentPage == 1?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
@
click=
"tabChange(1)"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<view
:class=
"currentPage == 1?'tab active': 'tab'"
@
click=
"tabChange(1)"
>
<view
style=
"margin-top: 15rpx;"
>
<image
v-if=
"currentPage==1"
class=
"tabs-image"
src=
"/static/tab/promote_selected.png"
mode=
"heightFix"
></image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/promote_unselected.png"
mode=
"heightFix"
></image>
</view>
推荐
</view>
<view
:class=
"currentPage == 2?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
@
click=
"tabChange(2)"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<view
:class=
"currentPage == 2?'tab active': 'tab'"
@
click=
"tabChange(2)"
>
<view
style=
"margin-top: 15rpx;"
>
<image
v-if=
"currentPage==2"
class=
"tabs-image"
src=
"/static/tab/my_selected.png"
mode=
"heightFix"
>
</image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/my_unselected.png"
mode=
"heightFix"
></image>
...
...
@@ -68,7 +62,7 @@
</view>
</view>
<view
v-if=
"showEditBar"
class=
"editBar"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
>
<view
v-if=
"showEditBar"
class=
"editBar"
>
<view
class=
"editItem"
@
click=
"!isFullChoice?fullChoice():noChoice()"
>
{{
!
isFullChoice
?
'全选'
:
'全不选'
}}
</view>
...
...
@@ -112,6 +106,7 @@
isFullChoice
:
false
,
isShowBlackBar
:
false
,
clientHeight
:
app
.
globalData
.
clientHeight
,
tabHeight
:
app
.
globalData
.
tabHeight
,
}
},
onLoad
(
options
)
{
...
...
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