Commit 77f88714 authored by June's avatar June

fixed:首页顶部状态栏标题滚动控制颜色

parent bb8c5b9c
...@@ -306,33 +306,14 @@ export default { ...@@ -306,33 +306,14 @@ export default {
this.navBg = 'rgba(255, 255, 255, 1)' this.navBg = 'rgba(255, 255, 255, 1)'
} else { } else {
uni.setNavigationBarColor({ uni.setNavigationBarColor({
frontColor: '#fff', frontColor: '#ffffff',
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
animation: true animation: true,
fail: e=> console.log(e)
}) })
this.navColor = '#fff' this.navColor = '#fff'
this.navBg = 'rgba(255, 255, 255, 0)' this.navBg = 'rgba(255, 255, 255, 0)'
} }
// console.log(e.detail.scrollTop)
// const opacity = (e.detail.scrollTop / 250).toFixed(1)
// if(opacity > 5) return
// if(opacity > 1) {
// uni.setNavigationBarColor({
// frontColor: '#000000',
// backgroundColor: '#ffffff',
// animation: true
// })
// this.navColor = '#333'
// }
// if(opacity < 0.2) {
// uni.setNavigationBarColor({
// frontColor: '#ffffff',
// backgroundColor: '#ffffff',
// animation: true,
// })
// this.navColor = '#fff'
// }
// this.navBg = `rgba(255, 255, 255, ${opacity})`
}, 300), }, 300),
purchase(e) { purchase(e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment