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
2a371adb
Commit
2a371adb
authored
Dec 24, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复首页加载不全
parent
827fdd54
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
72 deletions
+22
-72
App.vue
vedio/App.vue
+0
-5
index.vue
vedio/components/home/index.vue
+5
-7
home.vue
vedio/pages/home.vue
+17
-60
No files found.
vedio/App.vue
View file @
2a371adb
...
...
@@ -19,9 +19,6 @@
// #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
;
...
...
@@ -76,8 +73,6 @@
// baseUrl: 'http://test.mints-id.com/camera-api/miniApi',
// baseUrl: 'http://192.168.110.71:8301/miniApi',
titleButtonWidth
:
38
,
clientHeight
:
0
,
tabHeight
:
0
,
token
:
''
,
userId
:
0
,
inviteUId
:
''
,
...
...
vedio/components/home/index.vue
View file @
2a371adb
...
...
@@ -13,7 +13,7 @@
<image
:src=
"maskImage2"
mode=
"widthFix"
></image>
</view>
<scroll-view
s
tyle=
"height: 100%;"
scroll-y
@
scroll=
"onScroll"
>
<scroll-view
s
croll-y
:style=
"
{'height': clientHeight + 'px'}"
@scroll="onScroll">
<view
class=
"content"
>
<swiper
class=
"banner"
:indicator-dots=
"true"
:autoplay=
"true"
:interval=
"2000"
:duration=
"500"
>
<swiper-item
v-for=
"banner in bannerList"
:key=
"banner.vedioId"
@
click=
"handleBanner(banner)"
>
...
...
@@ -213,13 +213,11 @@
loadStatus
:
'loadmore'
};
},
created
()
{
const
res
=
tt
.
getSystemInfoSync
();
this
.
clientHeight
=
res
.
windowHeight
-
res
.
windowWidth
/
7
},
mounted
()
{
let
that
=
this
uni
.
getSystemInfo
({
success
:
(
res
=>
{
this
.
clientHeight
=
res
.
windowHeight
-
50
;
})
});
// 匹配视频
this
.
showFirstDialog
();
},
...
...
vedio/pages/home.vue
View file @
2a371adb
<
template
>
<view
class=
"body"
>
<view
v-if=
"clientHeight!=0"
:style=
"
{'height': clientHeight + 'px
'}">
<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"
:style=
"
{'height': tabHeight + 'px'}">
<view
:class=
"currentPage==0?'tab active': 'tab'"
@
click=
"tabChange(0)"
>
<view
class=
"tabs-bar"
:style=
"'height:'+tabHeight+'px;background-color:'+(isShowBlackBar?'#000000':'#FFFFFF')"
>
<view
:class=
"currentPage==0?'tab active': 'tab'"
@
click=
"tabChange(0)"
:style=
"'color:'+(isShowBlackBar?'#FFFFFF':'#000000')"
>
<view
style=
"margin-top: 15rpx;"
>
<image
v-if=
"currentPage==0"
class=
"tabs-image"
src=
"/static/tab/index_selected.png"
mode=
"heightFix"
>
...
...
@@ -16,8 +17,8 @@
</view>
剧场
</view>
<view
:class=
"currentPage == 1?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'
"
@
click=
"tabChange(1
)"
>
<view
:class=
"currentPage == 1?'tab active': 'tab'"
@
click=
"tabChange(1)
"
:style=
"'color:'+(isShowBlackBar?'#FFFFFF':'#000000'
)"
>
<view
style=
"margin-top: 15rpx;"
>
<image
v-if=
"currentPage==1"
class=
"tabs-image"
src=
"/static/tab/promote_selected.png"
mode=
"heightFix"
></image>
...
...
@@ -25,36 +26,8 @@
</view>
推荐
</view>
<view
:class=
"currentPage == 2?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
@
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>
</view>
我的
</view>
</view>
<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>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/index_unselected.png"
mode=
"heightFix"
></image>
</view>
剧场
</view>
<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'"
@
click=
"tabChange(2)"
>
<view
:class=
"currentPage == 2?'tab active': 'tab'"
@
click=
"tabChange(2)"
:style=
"'color:'+(isShowBlackBar?'#FFFFFF':'#000000')"
>
<view
style=
"margin-top: 15rpx;"
>
<image
v-if=
"currentPage==2"
class=
"tabs-image"
src=
"/static/tab/my_selected.png"
mode=
"heightFix"
>
</image>
...
...
@@ -83,11 +56,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"
;
...
...
@@ -107,8 +75,8 @@
showEditBar
:
false
,
isFullChoice
:
false
,
isShowBlackBar
:
false
,
clientHeight
:
app
.
globalData
.
clientHeight
,
tabHeight
:
app
.
globalData
.
tabHeight
,
clientHeight
:
0
,
tabHeight
:
0
,
}
},
onLoad
(
options
)
{
...
...
@@ -159,6 +127,11 @@
}
},
created
()
{
const
res
=
tt
.
getSystemInfoSync
()
this
.
tabHeight
=
res
.
windowWidth
/
7
this
.
clientHeight
=
res
.
windowHeight
-
res
.
windowWidth
/
7
},
mounted
()
{
// 渲染完成 初始化首页数据
this
.
loadComponentData
();
...
...
@@ -227,6 +200,8 @@
<
style
lang=
"scss"
>
.body
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
background-color
:
#f5f5f5
;
}
...
...
@@ -245,22 +220,4 @@
width
:
50%
;
}
}
.tabs-bar2
{
display
:
flex
;
background-color
:
black
;
.tab
{
height
:
110rpx
;
flex
:
1
;
text-align
:
center
;
font-size
:
26rpx
;
font-weight
:
bold
;
color
:
white
;
&
.active
{
color
:
#F8425A
;
}
}
}
</
style
>
\ No newline at end of file
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