许成详 6 years ago
parent
commit
039791f8ce
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      src/pages/user/mainPage/index.vue

+ 7
- 1
src/pages/user/mainPage/index.vue View File

5
         <router-view></router-view>
5
         <router-view></router-view>
6
       </div>
6
       </div>
7
     </div>
7
     </div>
8
-    <nav class="flex-h">
8
+    <nav class="flex-h" :style="{paddingBottom: isIphoneX ? '.1rem' : '0'}">
9
       <router-link :to="{name:item.pathName,query:{}}" v-if="showTabBar" class="flex-item" active-class="active" v-for="(item, index) in tabBar" :key="index">
9
       <router-link :to="{name:item.pathName,query:{}}" v-if="showTabBar" class="flex-item" active-class="active" v-for="(item, index) in tabBar" :key="index">
10
         <div>
10
         <div>
11
           <img v-if="index==0" class="centerLabel" src="../../../common/icon/tabBar-icon-1.png" alt="">
11
           <img v-if="index==0" class="centerLabel" src="../../../common/icon/tabBar-icon-1.png" alt="">
24
   name: '',
24
   name: '',
25
   data () {
25
   data () {
26
     return {
26
     return {
27
+      isIphoneX: false,
27
       tabBar: [{
28
       tabBar: [{
28
         pathName: 'indexPage',
29
         pathName: 'indexPage',
29
         name: '城的空间'
30
         name: '城的空间'
45
   components: {
46
   components: {
46
   },
47
   },
47
   created () {
48
   created () {
49
+    var aHeight = document.documentElement.clientHeight,
50
+      aWidth = document.documentElement.clientWidth
51
+    if (aHeight === 375 && aWidth === 724) {
52
+      this.isIphoneX = true
53
+    }
48
     if (!this.userInfo.customer.MapUser || !this.$route.query.hideTabbar) {
54
     if (!this.userInfo.customer.MapUser || !this.$route.query.hideTabbar) {
49
       this.showTabBar = true
55
       this.showTabBar = true
50
     }
56
     }