Commit f707ff9023b2b852a1ee522d5abc3bf3e40e6d62

Authored by wangfan
1 parent 5f869ca0

c端预定

@@ -85,16 +85,24 @@ Page({ @@ -85,16 +85,24 @@ Page({
85 this.getClassNameFlag=true; 85 this.getClassNameFlag=true;
86 //this.getPos(); 86 //this.getPos();
87 if(this.data.hasSuggestion) return; 87 if(this.data.hasSuggestion) return;
88 - await getApp().getSystemInfo();  
89 - let sys=getApp().system;  
90 - if(sys.system.toLowerCase().indexOf('ios')>-1){ 88 + //导航栏自适应
  89 + let systemInfo = wx.getSystemInfoSync();
  90 + let reg = /ios/i;
  91 + let pt = 20;//导航状态栏上内边距
  92 + let h = 44;//导航状态栏高度
  93 + if(reg.test(systemInfo.system)){
  94 + pt = systemInfo.statusBarHeight;
  95 + h = 44;
91 this.transverseViewHeight=transverseViewHeight+20; 96 this.transverseViewHeight=transverseViewHeight+20;
  97 + }else{
  98 + pt = systemInfo.statusBarHeight;
  99 + h = 48;
92 } 100 }
93 - console.log('onShow',sys,sys.windowHeight,sys.windowHeight-this.transverseViewHeight) 101 + console.log('onShow',systemInfo,systemInfo.windowHeight,systemInfo.windowHeight-this.transverseViewHeight)
94 this.setData({ 102 this.setData({
95 - [`map.height`]: sys.windowHeight-this.transverseViewHeight,  
96 - searchAddrTop:sys.statusBarHeight  
97 - *(sys.system.toLowerCase().indexOf('ios')>-1?2:sys.pixelRatio), 103 + [`map.height`]: systemInfo.windowHeight-this.transverseViewHeight,
  104 + statusBarHeight: pt,
  105 + titleBarHeight:h,
98 }) 106 })
99 this.getPos(); 107 this.getPos();
100 }, 108 },
@@ -16,9 +16,13 @@ @@ -16,9 +16,13 @@
16 subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ" 16 subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ"
17 style="width: 100%; height: {{map.height}}px;"></map> 17 style="width: 100%; height: {{map.height}}px;"></map>
18 <formids url="/pages/reserve/search" style="position: fixed;"> 18 <formids url="/pages/reserve/search" style="position: fixed;">
19 - <cover-view class="searchAddr flex-ll" style="top: {{searchAddrTop}}rpx;">  
20 - <cover-image class="icon" src="http://qn.colorcun.com/custom/lite-online/image/search26.png"></cover-image>  
21 - <cover-view class="title">{{hasSuggestion?suggestion.title:'请输入位置'}}</cover-view> 19 + <cover-view
  20 + class="flex-vc"
  21 + style="position:fixed;top:{{statusBarHeight}}px;left:0;height: {{titleBarHeight}}px; line-height: {{titleBarHeight}}px;">
  22 + <cover-view class="searchAddr flex-ll">
  23 + <cover-image class="icon" src="http://qn.colorcun.com/custom/lite-online/image/search26.png"></cover-image>
  24 + <cover-view class="title">{{hasSuggestion?suggestion.title:'请输入位置'}}</cover-view>
  25 + </cover-view>
22 </cover-view> 26 </cover-view>
23 </formids> 27 </formids>
24 </view> 28 </view>
@@ -88,16 +88,13 @@ @@ -88,16 +88,13 @@
88 } 88 }
89 89
90 .searchAddr { 90 .searchAddr {
91 - position: fixed;  
92 - top: 50rpx;  
93 - left: 38rpx; 91 + margin-left: 38rpx;
94 width: 450rpx; 92 width: 450rpx;
95 height: 60rpx; 93 height: 60rpx;
96 background-color: #fefefe; 94 background-color: #fefefe;
97 border-radius: 30rpx; 95 border-radius: 30rpx;
98 line-height: 60rpx; 96 line-height: 60rpx;
99 color:#999999; 97 color:#999999;
100 - line-height: 60rpx;  
101 font-size: 28rpx; 98 font-size: 28rpx;
102 } 99 }
103 .searchAddr .icon{ 100 .searchAddr .icon{
1 <!--pages/reserve/search.wxml--> 1 <!--pages/reserve/search.wxml-->
2 <nav>请输入位置</nav> 2 <nav>请输入位置</nav>
3 <view class="pages"> 3 <view class="pages">
4 - <view class="searchAddr flex-ll" style="top: {{searchAddrTop}}rpx;"> 4 + <view class="searchAddr flex-ll">
5 <image class="icon" src="http://qn.colorcun.com/custom/lite-online/image/search26.png"></image> 5 <image class="icon" src="http://qn.colorcun.com/custom/lite-online/image/search26.png"></image>
6 <input style="width: 100%;" placeholder="请输入位置" 6 <input style="width: 100%;" placeholder="请输入位置"
7 type="text" confirm-type="done" 7 type="text" confirm-type="done"