|
@@ -1,6 +1,6 @@
|
|
|
<!-- 底部导航组件 -->
|
|
|
<template>
|
|
|
- <view class="tabBar">
|
|
|
+ <view class="tabBar" :style="{'padding-bottom': paddingBottomHeight + 'rpx'}">
|
|
|
<!-- 运输 -->
|
|
|
<view class="tab-bar-box">
|
|
|
<view class="null-box"></view>
|
|
@@ -32,13 +32,25 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ paddingBottomHeight: 0, //苹果X以上手机底部适配高度
|
|
|
currentRoute:"",
|
|
|
userType:"",
|
|
|
totalCount:0,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
-
|
|
|
+ let that = this;
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success: function (res) {
|
|
|
+ let model = ['X', 'XR', 'XS', '11', '12', '13', '14', '15'];
|
|
|
+ model.forEach(item => {
|
|
|
+ //适配iphoneX以上的底部,给tabbar一定高度的padding-bottom
|
|
|
+ if(res.model.indexOf(item) != -1 && res.model.indexOf('iPhone') != -1) {
|
|
|
+ that.paddingBottomHeight = 40;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
onShow(){
|