Commit 4333579578aaf6c34010280524ce4881648423fe

Authored by vking
1 parent 6c27cc82

blue ui other

Showing 1 changed file with 19 additions and 19 deletions
... ... @@ -152,27 +152,27 @@ Page({
*/
onShow: function () {
this.selectComponent('#getpos').getPos();
this._observer = wx.createIntersectionObserver(this)
this._observer
.relativeTo('.scroll-view')
.observe('.swiper-view', (res) => {
console.log('sv.observe',res)
if(res.intersectionRatio > 0){
wx.setNavigationBarColor({
frontColor:'#ffffff',
backgroundColor:'#ffffff',
})
}else{
wx.setNavigationBarColor({
frontColor:'#000000',
backgroundColor:'#ffffff',
if(wx.createIntersectionObserver){
this._observer = wx.createIntersectionObserver(this)
this._observer
.relativeTo('.scroll-view')
.observe('.swiper-view', (res) => {
if(res.intersectionRatio > 0){
wx.setNavigationBarColor({
frontColor:'#ffffff',
backgroundColor:'#ffffff',
})
}else{
wx.setNavigationBarColor({
frontColor:'#000000',
backgroundColor:'#ffffff',
})
}
this.setData({
hasNav: res.intersectionRatio == 0
})
}
this.setData({
hasNav: res.intersectionRatio == 0
})
})
}
},
/**
... ...