Commit 6c27cc8283668ab154aa6846603d770e825a039b

Authored by vking
1 parent 3e2d5cc8

blue ui other

@@ -42,10 +42,6 @@ Page({ @@ -42,10 +42,6 @@ Page({
42 commentLabel:res.data, 42 commentLabel:res.data,
43 }) 43 })
44 }) 44 })
45 - wx.setNavigationBarColor({  
46 - frontColor:'#000000',  
47 - backgroundColor:'#ffffff',  
48 - })  
49 }, 45 },
50 GetSellerDetail(){ 46 GetSellerDetail(){
51 let options=this.options 47 let options=this.options
@@ -156,6 +152,27 @@ Page({ @@ -156,6 +152,27 @@ Page({
156 */ 152 */
157 onShow: function () { 153 onShow: function () {
158 this.selectComponent('#getpos').getPos(); 154 this.selectComponent('#getpos').getPos();
  155 +
  156 + this._observer = wx.createIntersectionObserver(this)
  157 + this._observer
  158 + .relativeTo('.scroll-view')
  159 + .observe('.swiper-view', (res) => {
  160 + console.log('sv.observe',res)
  161 + if(res.intersectionRatio > 0){
  162 + wx.setNavigationBarColor({
  163 + frontColor:'#ffffff',
  164 + backgroundColor:'#ffffff',
  165 + })
  166 + }else{
  167 + wx.setNavigationBarColor({
  168 + frontColor:'#000000',
  169 + backgroundColor:'#ffffff',
  170 + })
  171 + }
  172 + this.setData({
  173 + hasNav: res.intersectionRatio == 0
  174 + })
  175 + })
159 }, 176 },
160 177
161 /** 178 /**
1 <!--pages/reserve/detail.wxml--> 1 <!--pages/reserve/detail.wxml-->
2 <wxs src="../../utils/util.wxs" module="util" /> 2 <wxs src="../../utils/util.wxs" module="util" />
  3 +<scroll-view class="scroll-view" scroll-y style="height: 100vh;">
3 <page loading="{{loading}}"> 4 <page loading="{{loading}}">
4 - <nav hasHome wx:if="{{hasNav}}">{{seller.sellername}}</nav> 5 + <nav hasHome wx:if="{{hasNav}}" id='nav'>{{seller.sellername}}</nav>
5 <view class="swiper-view"> 6 <view class="swiper-view">
6 <swiper class="swiper-image" 7 <swiper class="swiper-image"
7 indicator-dots="{{false}}" autoplay="{{false}}" 8 indicator-dots="{{false}}" autoplay="{{false}}"
@@ -20,7 +21,9 @@ @@ -20,7 +21,9 @@
20 {{currentView}}/{{seller.envi_image.length}} 21 {{currentView}}/{{seller.envi_image.length}}
21 </view> 22 </view>
22 </view> 23 </view>
23 - <view class="view margin-lr-sm radius bg-white padding text-black" style="margin-top: -50rpx; position: relative;z-index: 1;"> 24 + <view class="view margin-lr-sm radius bg-white padding text-black"
  25 + id="seller-base"
  26 + style="margin-top: -50rpx; position: relative;z-index: 1;">
24 <view class="view flex justify-start margin-bottom-sm"> 27 <view class="view flex justify-start margin-bottom-sm">
25 <view class="view flex-treble"> 28 <view class="view flex-treble">
26 <view class="text-bold text-44"> 29 <view class="text-bold text-44">
@@ -212,6 +215,7 @@ @@ -212,6 +215,7 @@
212 </view> 215 </view>
213 </view> 216 </view>
214 </page> 217 </page>
  218 +</scroll-view>
215 <getpos id="getpos" bindpos="onpos"></getpos> 219 <getpos id="getpos" bindpos="onpos"></getpos>
216 <as-phone id="as"></as-phone> 220 <as-phone id="as"></as-phone>
217 <discount id="discount" seller="{{seller}}" wx:if="{{seller}}" 221 <discount id="discount" seller="{{seller}}" wx:if="{{seller}}"