Showing
3 changed files
with
5 additions
and
4 deletions
| @@ -25,6 +25,7 @@ Component({ | @@ -25,6 +25,7 @@ Component({ | ||
| 25 | disHome:false, | 25 | disHome:false, |
| 26 | disBack:false, | 26 | disBack:false, |
| 27 | }, | 27 | }, |
| 28 | + barHeight:68, | ||
| 28 | attached(){ | 29 | attached(){ |
| 29 | let disBack = false; | 30 | let disBack = false; |
| 30 | let disHome = false; | 31 | let disHome = false; |
| @@ -39,9 +40,10 @@ Component({ | @@ -39,9 +40,10 @@ Component({ | ||
| 39 | } | 40 | } |
| 40 | } | 41 | } |
| 41 | this.setData({ | 42 | this.setData({ |
| 42 | - statusBarHeight: getApp().system.statusBarHeight, | 43 | + statusBarHeight: getApp().system.statusBarHeight*getApp().system.pixelRatio, |
| 43 | disHome: disHome, | 44 | disHome: disHome, |
| 44 | disBack: disBack, | 45 | disBack: disBack, |
| 46 | + statusBarHeightFull:68 + getApp().system.statusBarHeight*getApp().system.pixelRatio, | ||
| 45 | }) | 47 | }) |
| 46 | console.log('this.setData',this.data); | 48 | console.log('this.setData',this.data); |
| 47 | }, | 49 | }, |
| 1 | <!--components/nav/nav.wxml--> | 1 | <!--components/nav/nav.wxml--> |
| 2 | <view class="nav-main" style="background-color: {{backgroundColor}};color:{{color}};"> | 2 | <view class="nav-main" style="background-color: {{backgroundColor}};color:{{color}};"> |
| 3 | - <view class="nav" style="padding-top: {{statusBarHeight*2}}rpx;"> | 3 | + <view class="nav" style="margin-top: {{statusBarHeight}}rpx;"> |
| 4 | <view class="flex-lr part"> | 4 | <view class="flex-lr part"> |
| 5 | <view class="opt flex-ll"> | 5 | <view class="opt flex-ll"> |
| 6 | <view class="back flex-vc" bindtap="back" wx:if="{{disBack}}"> | 6 | <view class="back flex-vc" bindtap="back" wx:if="{{disBack}}"> |
| @@ -20,4 +20,4 @@ | @@ -20,4 +20,4 @@ | ||
| 20 | 20 | ||
| 21 | </view> | 21 | </view> |
| 22 | </view> | 22 | </view> |
| 23 | -<view class="nav-main-space" style="height: {{statusBarHeight*2+68}}rpx;"></view> | 23 | +<view class="nav-main-space" style="height: {{statusBarHeightFull}}rpx;"></view> |
-
Please register or login to post a comment