Commit f707ff9023b2b852a1ee522d5abc3bf3e40e6d62

Authored by wangfan
1 parent 5f869ca0

c端预定

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