Showing
3 changed files
with
30 additions
and
3 deletions
| @@ -12,6 +12,8 @@ Page({ | @@ -12,6 +12,8 @@ Page({ | ||
| 12 | data: { | 12 | data: { |
| 13 | loading:0, | 13 | loading:0, |
| 14 | currentView:1, | 14 | currentView:1, |
| 15 | + meTop:20, | ||
| 16 | + hasBack:true, | ||
| 15 | }, | 17 | }, |
| 16 | 18 | ||
| 17 | /** | 19 | /** |
| @@ -42,6 +44,11 @@ Page({ | @@ -42,6 +44,11 @@ Page({ | ||
| 42 | commentLabel:res.data, | 44 | commentLabel:res.data, |
| 43 | }) | 45 | }) |
| 44 | }) | 46 | }) |
| 47 | + if(getCurrentPages().length==1){ | ||
| 48 | + this.setData({ | ||
| 49 | + hasBack:false, | ||
| 50 | + }) | ||
| 51 | + } | ||
| 45 | }, | 52 | }, |
| 46 | GetSellerDetail(){ | 53 | GetSellerDetail(){ |
| 47 | let options=this.options | 54 | let options=this.options |
| @@ -152,10 +159,16 @@ Page({ | @@ -152,10 +159,16 @@ Page({ | ||
| 152 | */ | 159 | */ |
| 153 | onShow: function () { | 160 | onShow: function () { |
| 154 | this.selectComponent('#getpos').getPos(); | 161 | this.selectComponent('#getpos').getPos(); |
| 162 | + if(wx.getMenuButtonBoundingClientRect){ | ||
| 163 | + let rect=wx.getMenuButtonBoundingClientRect() | ||
| 164 | + this.setData({ | ||
| 165 | + meTop:rect.top-5, | ||
| 166 | + }) | ||
| 167 | + } | ||
| 155 | if(wx.createIntersectionObserver){ | 168 | if(wx.createIntersectionObserver){ |
| 156 | this._observer = wx.createIntersectionObserver(this) | 169 | this._observer = wx.createIntersectionObserver(this) |
| 157 | this._observer | 170 | this._observer |
| 158 | - .relativeTo('.scroll-view') | 171 | + .relativeTo('.me') |
| 159 | .observe('.swiper-view', (res) => { | 172 | .observe('.swiper-view', (res) => { |
| 160 | if(res.intersectionRatio > 0){ | 173 | if(res.intersectionRatio > 0){ |
| 161 | wx.setNavigationBarColor({ | 174 | wx.setNavigationBarColor({ |
| 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;"> | ||
| 4 | <page loading="{{loading}}"> | 3 | <page loading="{{loading}}"> |
| 4 | + <navigator open-type="navigateBack" wx:if="{{hasBack}}"> | ||
| 5 | + <view style="top:{{meTop}}px;" | ||
| 6 | + class="me view flex flex-direction align-center justify-center round"> | ||
| 7 | + <image src="http://nosqn.colorcun.com/back-white.png" style="width: 18rpx;height: 32rpx;"></image> | ||
| 8 | + </view> | ||
| 9 | + </navigator> | ||
| 5 | <nav hasHome wx:if="{{hasNav}}" id='nav'>{{seller.sellername}}</nav> | 10 | <nav hasHome wx:if="{{hasNav}}" id='nav'>{{seller.sellername}}</nav> |
| 6 | <view class="swiper-view"> | 11 | <view class="swiper-view"> |
| 7 | <swiper class="swiper-image" | 12 | <swiper class="swiper-image" |
| @@ -215,7 +220,7 @@ | @@ -215,7 +220,7 @@ | ||
| 215 | </view> | 220 | </view> |
| 216 | </view> | 221 | </view> |
| 217 | </page> | 222 | </page> |
| 218 | -</scroll-view> | 223 | + |
| 219 | <getpos id="getpos" bindpos="onpos"></getpos> | 224 | <getpos id="getpos" bindpos="onpos"></getpos> |
| 220 | <as-phone id="as"></as-phone> | 225 | <as-phone id="as"></as-phone> |
| 221 | <discount id="discount" seller="{{seller}}" wx:if="{{seller}}" | 226 | <discount id="discount" seller="{{seller}}" wx:if="{{seller}}" |
| @@ -145,3 +145,12 @@ page{ | @@ -145,3 +145,12 @@ page{ | ||
| 145 | line-height: 52rpx; | 145 | line-height: 52rpx; |
| 146 | text-align: center; | 146 | text-align: center; |
| 147 | } | 147 | } |
| 148 | + | ||
| 149 | +.me{ | ||
| 150 | + width: 84rpx; | ||
| 151 | + height: 84rpx; | ||
| 152 | + position: fixed; | ||
| 153 | + left:30rpx; | ||
| 154 | + top:40rpx; | ||
| 155 | + z-index: 9; | ||
| 156 | +} |
-
Please register or login to post a comment