sunran 3 лет назад
Родитель
Сommit
b7aa734053
1 измененных файлов с 9 добавлено и 3 удалено
  1. 9 3
      src/views/zhulao/views/classRoom/index.vue

+ 9 - 3
src/views/zhulao/views/classRoom/index.vue

@@ -1,8 +1,8 @@
 <template>
 <template>
   <div class="page">
   <div class="page">
-    <van-nav-bar title="老年课堂" fixed placeholder safe-area-inset-top />
-    <van-tabs @click="clickTab" sticky offset-top="46">
-      <van-tab v-for="item in columnList" sticky :key="item.id" :title="item.title" :name="item.columnCode">
+    <van-nav-bar ref="nav" title="老年课堂" fixed />
+    <van-tabs @click="clickTab" sticky>
+      <van-tab v-for="item in columnList" :key="item.id" :title="item.title" :name="item.columnCode">
         <van-list v-model="loading" :immediate-check="false" :finished="finished" finished-text="没有更多了" @load="onLoad">
         <van-list v-model="loading" :immediate-check="false" :finished="finished" finished-text="没有更多了" @load="onLoad">
           <div v-for="(item,index) in info" :key='index' bindtap="videoCilck" @click="$router.push({path:'/newsDetails',query:{id:item.id}})">
           <div v-for="(item,index) in info" :key='index' bindtap="videoCilck" @click="$router.push({path:'/newsDetails',query:{id:item.id}})">
             <div class='videoBg' v-if='item.coverImgUrl'>
             <div class='videoBg' v-if='item.coverImgUrl'>
@@ -41,8 +41,13 @@ export default {
       finished: false,
       finished: false,
       pageNum: 1,
       pageNum: 1,
       pageSize: 10,
       pageSize: 10,
+      navheight: '46px',
     }
     }
   },
   },
+  mounted() {
+    this.navheight = this.$refs.nav.$refs.navBar.offsetHeight + 'px'
+    console.log(this.navheight, '22')
+  },
   created() {
   created() {
     this.getColumnList()
     this.getColumnList()
   },
   },
@@ -95,6 +100,7 @@ export default {
   height: 100%;
   height: 100%;
 }
 }
 .van-tabs {
 .van-tabs {
+  margin-top: 92px;
   border-bottom: 0;
   border-bottom: 0;
   ::v-deep .van-tab {
   ::v-deep .van-tab {
     font-size: 30px;
     font-size: 30px;