修复ios 状态栏错位

修复ios 状态栏错位
This commit is contained in:
weilanwl
2019-09-17 02:03:28 +08:00
parent 0b10b63a47
commit cec4e9f600
9 changed files with 39 additions and 15 deletions

View File

@@ -13,12 +13,18 @@
}; };
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN || MP-QQ
Vue.prototype.StatusBar = e.statusBarHeight; Vue.prototype.StatusBar = e.statusBarHeight;
let custom = wx.getMenuButtonBoundingClientRect(); let capsule = wx.getMenuButtonBoundingClientRect();
Vue.prototype.Custom = custom; if (capsule) {
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight; Vue.prototype.Custom = capsule;
// Vue.prototype.capsuleSafe = uni.upx2px(750) - capsule.left + uni.upx2px(750) - capsule.right;
Vue.prototype.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
} else {
Vue.prototype.CustomBar = e.statusBarHeight + 50;
}
// #endif // #endif
// #ifdef MP-ALIPAY // #ifdef MP-ALIPAY
Vue.prototype.StatusBar = e.statusBarHeight; Vue.prototype.StatusBar = e.statusBarHeight;

View File

@@ -47,7 +47,7 @@
</view> </view>
</view> </view>
<view class="margin radius bg-gradual-green shadow-blur"> <view class="margin radius bg-gradual-green shadow-blur">
<image src="https://image.weilanwl.com/gif/wave.gif" mode="scaleToFill" class="gif-black response" style="height:100upx"></image> <image src="https://raw.githubusercontent.com/weilanwl/ColorUI/master/demo/images/wave.gif" mode="scaleToFill" class="gif-black response" style="height:100upx"></image>
</view> </view>
<view class="margin flex"> <view class="margin flex">
<view class="bg-black flex-sub margin-right radius shadow-lg"> <view class="bg-black flex-sub margin-right radius shadow-lg">

View File

@@ -9,9 +9,13 @@ App({
wx.getSystemInfo({ wx.getSystemInfo({
success: e => { success: e => {
this.globalData.StatusBar = e.statusBarHeight; this.globalData.StatusBar = e.statusBarHeight;
let custom = wx.getMenuButtonBoundingClientRect(); let capsule = wx.getMenuButtonBoundingClientRect();
this.globalData.Custom = custom; if (capsule) {
this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight; this.globalData.Custom = capsule;
this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
} else {
this.globalData.CustomBar = e.statusBarHeight + 50;
}
} }
}) })
}, },

View File

@@ -43,6 +43,7 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
}, },
"usingComponents": { "usingComponents": {
"cu-custom":"/colorui/components/cu-custom" "cu-custom": "/colorui/components/cu-custom"
} },
"sitemapLocation": "sitemap21.json"
} }

View File

@@ -7,7 +7,7 @@
<view class="margin-top-sm"> <view class="margin-top-sm">
<text>By:文晓港</text> <text>By:文晓港</text>
</view> </view>
<image src="https://image.weilanwl.com/gif/wave.gif" mode="scaleToFill" class="gif-wave"></image> <image src="https://raw.githubusercontent.com/weilanwl/ColorUI/master/demo/images/wave.gif" mode="scaleToFill" class="gif-wave"></image>
</view> </view>
<view class="padding flex text-center text-grey bg-white shadow-warp"> <view class="padding flex text-center text-grey bg-white shadow-warp">
<view class="flex flex-sub flex-direction solid-right"> <view class="flex flex-sub flex-direction solid-right">

View File

@@ -42,7 +42,7 @@
</view> </view>
</view> </view>
<view class="margin radius bg-gradual-green shadow-blur"> <view class="margin radius bg-gradual-green shadow-blur">
<image src="https://image.weilanwl.com/gif/wave.gif" mode="scaleToFill" class="gif-black response" style="height:100rpx"></image> <image src="https://raw.githubusercontent.com/weilanwl/ColorUI/master/demo/images/wave.gif" mode="scaleToFill" class="gif-black response" style="height:100rpx"></image>
</view> </view>
<view class="margin flex"> <view class="margin flex">
<view class="bg-black flex-sub margin-right radius shadow-lg"> <view class="bg-black flex-sub margin-right radius shadow-lg">

View File

@@ -18,6 +18,8 @@
"hidedInDevtools": [] "hidedInDevtools": []
}, },
"isGameTourist": false, "isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": { "condition": {
"search": { "search": {
"current": -1, "current": -1,

7
demo/sitemap21.json Normal file
View File

@@ -0,0 +1,7 @@
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}

View File

@@ -36,9 +36,13 @@ App({
wx.getSystemInfo({ wx.getSystemInfo({
success: e => { success: e => {
this.globalData.StatusBar = e.statusBarHeight; this.globalData.StatusBar = e.statusBarHeight;
let custom = wx.getMenuButtonBoundingClientRect(); let capsule = wx.getMenuButtonBoundingClientRect();
this.globalData.Custom = custom; if (capsule) {
this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight; this.globalData.Custom = capsule;
this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
} else {
this.globalData.CustomBar = e.statusBarHeight + 50;
}
} }
}) })
}, },