许成详 6 gadus atpakaļ
vecāks
revīzija
039791f8ce
1 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  1. 7
    1
      src/pages/user/mainPage/index.vue

+ 7
- 1
src/pages/user/mainPage/index.vue Parādīt failu

@@ -5,7 +5,7 @@
5 5
         <router-view></router-view>
6 6
       </div>
7 7
     </div>
8
-    <nav class="flex-h">
8
+    <nav class="flex-h" :style="{paddingBottom: isIphoneX ? '.1rem' : '0'}">
9 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 10
         <div>
11 11
           <img v-if="index==0" class="centerLabel" src="../../../common/icon/tabBar-icon-1.png" alt="">
@@ -24,6 +24,7 @@ export default {
24 24
   name: '',
25 25
   data () {
26 26
     return {
27
+      isIphoneX: false,
27 28
       tabBar: [{
28 29
         pathName: 'indexPage',
29 30
         name: '城的空间'
@@ -45,6 +46,11 @@ export default {
45 46
   components: {
46 47
   },
47 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 54
     if (!this.userInfo.customer.MapUser || !this.$route.query.hideTabbar) {
49 55
       this.showTabBar = true
50 56
     }