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
27b1db56
Commit
27b1db56
authored
Dec 19, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容首页 TAB 超出组件
parent
d5dcb753
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
52 deletions
+24
-52
App.vue
vedio/App.vue
+4
-23
recommendVideo.vue
vedio/components/home/recommendVideo.vue
+1
-1
home.vue
vedio/pages/home.vue
+19
-28
No files found.
vedio/App.vue
View file @
27b1db56
...
...
@@ -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
;
...
...
@@ -49,30 +52,7 @@
}
catch
(
e
)
{
console
.
log
(
e
);
}
uni
.
getSystemInfo
({
success
:
(
res
=>
{
this
.
globalData
.
clientHeight
=
res
.
windowHeight
-
50
;
})
});
// checkUpdate(this);
// #ifdef H5
if
(
window
.
location
.
host
===
'www.baosheji.cn'
)
{
var
icp
=
document
.
createElement
(
'div'
);
icp
.
innerText
=
'京ICP备18032652号'
;
icp
.
style
.
color
=
'white'
;
icp
.
style
.
textAlign
=
'center'
;
icp
.
style
.
position
=
'fixed'
;
icp
.
style
.
bottom
=
'0'
;
icp
.
style
.
left
=
'0'
;
icp
.
style
.
right
=
'0'
;
icp
.
style
.
zIndex
=
'100'
;
document
.
body
.
appendChild
(
icp
);
}
// #endif
},
onShow
:
function
(
options
)
{
this
.
globalData
.
resetLogin
=
true
...
...
@@ -96,6 +76,7 @@
// baseUrl: 'http://192.168.110.71:8301/miniApi',
titleButtonWidth
:
38
,
clientHeight
:
0
,
tabHeight
:
0
,
token
:
''
,
userId
:
0
,
inviteUId
:
''
,
...
...
vedio/components/home/recommendVideo.vue
View file @
27b1db56
...
...
@@ -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 @
27b1db56
<
template
>
<view
class=
"body"
>
<view
style=
"height: 92%;
"
>
<view
: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"
>
<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"
>
<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"
:style=
"
{'height': tabHeight + 'px'}
">
<view
class=
"editItem"
@
click=
"!isFullChoice?fullChoice():noChoice()"
>
{{
!
isFullChoice
?
'全选'
:
'全不选'
}}
</view>
...
...
@@ -87,11 +81,6 @@
import
common
from
'@/mixins/common'
;
const
app
=
getApp
();
// 首页
// import indexPage from "@/pages/index/index.vue";
// import recommendPage from "@/pages/recommend/recommend.vue";
// import userPage from "@/pages/my/my.vue";
import
indexPage
from
"@/components/home/index.vue"
;
import
recommendPage
from
"@/components/home/recommend.vue"
;
import
userPage
from
"@/components/home/my.vue"
;
...
...
@@ -110,7 +99,9 @@
currentPage
:
0
,
showEditBar
:
false
,
isFullChoice
:
false
,
isShowBlackBar
:
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