Browse Source

样式修复

dreamnight 5 years ago
parent
commit
44c07dd19d
1 changed files with 7 additions and 6 deletions
  1. 7 6
      src/pages/index.vue

+ 7 - 6
src/pages/index.vue

@@ -8,7 +8,7 @@
               v-if="bannerList.length"
               v-if="bannerList.length"
               v-show="!isSticky"
               v-show="!isSticky"
               :style="{
               :style="{
-                Top: `${navHeight}rpx`
+                Top: `${logoTop}rpx`
               }">
               }">
           <view class="index-logo">
           <view class="index-logo">
             <image src="../static/common/logo_bt.png" />
             <image src="../static/common/logo_bt.png" />
@@ -24,14 +24,11 @@
         </view>
         </view>
       </view>
       </view>
       <view class="activity-flow"
       <view class="activity-flow"
-            v-show="!isSticky"
-            :style="{
-              paddingTop: '20rpx'
-            }">
+            v-show="!isSticky">
         <activity-flow></activity-flow>
         <activity-flow></activity-flow>
       </view>
       </view>
     </view>
     </view>
-    <view class="index-body u-m-t-36">
+    <view class="index-body u-m-t-56">
       <u-sticky :enable="enable"
       <u-sticky :enable="enable"
                 offset-top="0"
                 offset-top="0"
                 h5-nav-height="0"
                 h5-nav-height="0"
@@ -141,6 +138,9 @@ export default {
   computed: {
   computed: {
     navHeight () {
     navHeight () {
       return (uni.getSystemInfoSync().statusBarHeight * 2) + 16
       return (uni.getSystemInfoSync().statusBarHeight * 2) + 16
+    },
+    logoTop () {
+      return (uni.getMenuButtonBoundingClientRect().top * 2)
     }
     }
   },
   },
   onShow () {
   onShow () {
@@ -333,6 +333,7 @@ export default {
     }
     }
   }
   }
   .activity-flow {
   .activity-flow {
+    padding-top: 36px;
     background-color: #fff;
     background-color: #fff;
   }
   }
   .index-tabs {
   .index-tabs {