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
d08f9d2d
Commit
d08f9d2d
authored
Jun 07, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
a7841521
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
29 deletions
+42
-29
home.vue
vedio/pages/home.vue
+42
-29
No files found.
vedio/pages/home.vue
View file @
d08f9d2d
...
...
@@ -117,13 +117,13 @@
let
index
=
options
.
index
??
''
if
(
index
!=
''
&&
index
!=
undefined
)
{
this
.
currentPage
=
index
}
// #ifdef MP-TOUTIAO
tt
.
setNavigationBarColor
({
frontColor
:
'#000000'
,
backgroundColor
:
'#ffffff'
})
}
// #ifdef MP-TOUTIAO
tt
.
setNavigationBarColor
({
frontColor
:
'#000000'
,
backgroundColor
:
'#ffffff'
})
// #endif
if
(
wx
.
setVisualEffectOnCapture
)
{
...
...
@@ -133,17 +133,16 @@
},
})
}
}
},
onShow
()
{
try
{
// 在子组件重写show()代替onShow()
if
(
this
.
currentPage
==
0
)
{
this
.
$refs
.
index
.
show
();
this
.
$refs
.
index
.
show
();
}
else
if
(
this
.
currentPage
==
1
)
{
//
this.$refs.recommend.show();
this
.
$refs
.
recommend
.
show
();
}
else
if
(
this
.
currentPage
==
2
)
{
this
.
$refs
.
user
.
show
();
}
...
...
@@ -151,6 +150,20 @@
}
},
onHide
()
{
try
{
// 在子组件重写show()代替onShow()
if
(
this
.
currentPage
==
0
)
{
this
.
$refs
.
index
.
hide
();
}
else
if
(
this
.
currentPage
==
1
)
{
this
.
$refs
.
recommend
.
hide
();
}
else
if
(
this
.
currentPage
==
2
)
{
this
.
$refs
.
user
.
hide
();
}
}
catch
(
e
)
{
}
},
mounted
()
{
// 渲染完成 初始化首页数据
this
.
loadComponentData
();
...
...
@@ -180,22 +193,22 @@
}
},
changeBottomBarColor
(
b
)
{
this
.
isShowBlackBar
=
b
// #ifdef MP-TOUTIAO
if
(
b
){
tt
.
setNavigationBarColor
({
frontColor
:
'#ffffff'
,
backgroundColor
:
'#000000'
})
}
else
{
tt
.
setNavigationBarColor
({
frontColor
:
'#000000'
,
backgroundColor
:
'#ffffff'
})
}
// #endif
this
.
isShowBlackBar
=
b
// #ifdef MP-TOUTIAO
if
(
b
)
{
tt
.
setNavigationBarColor
({
frontColor
:
'#ffffff'
,
backgroundColor
:
'#000000'
})
}
else
{
tt
.
setNavigationBarColor
({
frontColor
:
'#000000'
,
backgroundColor
:
'#ffffff'
})
}
// #endif
},
showEditBarH
(
b
)
{
this
.
showEditBar
=
b
...
...
@@ -218,7 +231,7 @@
<
style
lang=
"scss"
>
.body
{
height
:
100%
;
height
:
100%
;
background-color
:
#f5f5f5
;
}
...
...
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