Commit ae814d261dd2bbb42628327d2155ac2118041181

Authored by wangfan
1 parent 4df2ef29

seller nav

@@ -25,7 +25,7 @@ Component({ @@ -25,7 +25,7 @@ Component({
25 disHome:false, 25 disHome:false,
26 disBack:false, 26 disBack:false,
27 }, 27 },
28 - barHeight:68, 28 +
29 attached(){ 29 attached(){
30 let disBack = false; 30 let disBack = false;
31 let disHome = false; 31 let disHome = false;
@@ -39,11 +39,13 @@ Component({ @@ -39,11 +39,13 @@ Component({
39 disHome = true; 39 disHome = true;
40 } 40 }
41 } 41 }
  42 + let wxBarHeight=68;
  43 + let statusBarHeight=getApp().system.statusBarHeight*getApp().system.pixelRatio;
42 this.setData({ 44 this.setData({
43 - statusBarHeight: getApp().system.statusBarHeight*getApp().system.pixelRatio, 45 + statusBarHeight: statusBarHeight,
44 disHome: disHome, 46 disHome: disHome,
45 disBack: disBack, 47 disBack: disBack,
46 - statusBarHeightFull:68 + getApp().system.statusBarHeight*getApp().system.pixelRatio, 48 + statusBarHeightFull:wxBarHeight + statusBarHeight,
47 }) 49 })
48 console.log('this.setData',this.data); 50 console.log('this.setData',this.data);
49 }, 51 },
1 <!--components/nav/nav.wxml--> 1 <!--components/nav/nav.wxml-->
2 -<view class="nav-main" style="background-color: {{backgroundColor}};color:{{color}};">  
3 - <view class="nav" style="margin-top: {{statusBarHeight}}rpx;">  
4 - <view class="flex-lr part">  
5 - <view class="opt flex-ll">  
6 - <view class="back flex-vc" bindtap="back" wx:if="{{disBack}}">  
7 - <image class="back-image" src="http://qn.colorcun.com/custom/lite-yd/image/back.png"></image> 2 +<view class="nav-main-space" style="height: {{statusBarHeightFull}}rpx;">
  3 + <view class="nav-main" style="background-color: {{backgroundColor}};color:{{color}};">
  4 + <view class="nav" style="margin-top: {{statusBarHeight}}rpx;">
  5 + <view class="flex-lr part">
  6 + <view class="opt flex-ll">
  7 + <view class="back flex-vc" bindtap="back" wx:if="{{disBack}}">
  8 + <image class="back-image" src="http://qn.colorcun.com/custom/lite-yd/image/back.png"></image>
  9 + </view>
  10 + <view class="home flex-vc" bindtap="home" wx:if="{{disHome}}">
  11 + <image class="home-image" src="http://qn.colorcun.com/custom/lite-yd/image/home.svg"></image>
  12 + </view>
8 </view> 13 </view>
9 - <view class="home flex-vc" bindtap="home" wx:if="{{disHome}}">  
10 - <image class="home-image" src="http://qn.colorcun.com/custom/lite-yd/image/home.svg"></image> 14 + <view class="title" bindtap="home">
  15 + <slot></slot>
  16 + </view>
  17 + <view class="opt">
  18 + <view></view>
11 </view> 19 </view>
12 </view> 20 </view>
13 - <view class="title" bindtap="home">  
14 - <slot></slot>  
15 - </view>  
16 - <view class="opt">  
17 - <view></view>  
18 - </view>  
19 - </view>  
20 21
  22 + </view>
21 </view> 23 </view>
22 </view> 24 </view>
23 -<view class="nav-main-space" style="height: {{statusBarHeightFull}}rpx;"></view>