|
...
|
...
|
@@ -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
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|