jwyu 2 年之前
父节点
当前提交
62e4940d8c
共有 4 个文件被更改,包括 21 次插入3 次删除
  1. 4 0
      src/layout/Index.vue
  2. 10 0
      src/layout/component/Header.vue
  3. 1 1
      src/router/index.js
  4. 6 2
      src/views/activity/List.vue

+ 4 - 0
src/layout/Index.vue

@@ -1,5 +1,6 @@
 <script setup>
 <script setup>
 import Aside from "./component/Aside.vue";
 import Aside from "./component/Aside.vue";
+import Header from './component/Header.vue'
 import { useStore } from "vuex";
 import { useStore } from "vuex";
 import { computed, ref,watch } from "vue";
 import { computed, ref,watch } from "vue";
 import moment from "moment";
 import moment from "moment";
@@ -156,6 +157,8 @@ store.state.audioData.INS=globalAudioIns
 <template>
 <template>
   <div class="layout-wrap">
   <div class="layout-wrap">
     <el-container style="width: 100%;height:100%">
     <el-container style="width: 100%;height:100%">
+      <el-header><Header></Header></el-header>
+      <el-container>
       <Aside></Aside>
       <Aside></Aside>
       <el-main>
       <el-main>
         <img v-if="$route.meta.hasBack" @click="goBack" class="back-icon" src="@/assets/icon-back.png" alt="">
         <img v-if="$route.meta.hasBack" @click="goBack" class="back-icon" src="@/assets/icon-back.png" alt="">
@@ -221,6 +224,7 @@ store.state.audioData.INS=globalAudioIns
           </template>
           </template>
         </el-popover>
         </el-popover>
       </div>
       </div>
+      </el-container>
     </el-container>
     </el-container>
 
 
     <!-- 全局音频模块 -->
     <!-- 全局音频模块 -->

+ 10 - 0
src/layout/component/Header.vue

@@ -0,0 +1,10 @@
+<script setup>
+
+</script>
+
+<template>
+    <div>
+        <span>头部</span>
+        <div id="report-search-box"></div>
+    </div>
+</template>

+ 1 - 1
src/router/index.js

@@ -5,7 +5,7 @@ const routes=[
   {
   {
     path: "/",
     path: "/",
     name: "Layout",
     name: "Layout",
-    redirect:'/activity/list',
+    // redirect:'/activity/list',
     component: ()=>import("@/layout/Index.vue"),
     component: ()=>import("@/layout/Index.vue"),
   },
   },
 
 

+ 6 - 2
src/views/activity/List.vue

@@ -214,7 +214,7 @@ const aduioIconPlay=new URL('../../assets/audio-doing-white.png', import.meta.ur
 const aduioIconPaused=new URL('../../assets/audio-pause.png', import.meta.url).href
 const aduioIconPaused=new URL('../../assets/audio-pause.png', import.meta.url).href
 const aduioIconDefault=new URL('../../assets/audio-pause-3.png', import.meta.url).href
 const aduioIconDefault=new URL('../../assets/audio-pause-3.png', import.meta.url).href
 
 
-
+let showSearch=ref(false)
 onMounted(() => {
 onMounted(() => {
   //向小程序发送消息
   //向小程序发送消息
   let postData = {
   let postData = {
@@ -224,6 +224,7 @@ onMounted(() => {
     shareImg:'https://hzstatic.hzinsights.com/static/icon/hzyb/activitylist_share.jpg'
     shareImg:'https://hzstatic.hzinsights.com/static/icon/hzyb/activitylist_share.jpg'
   };
   };
   wx.miniProgram.postMessage({ data: postData });
   wx.miniProgram.postMessage({ data: postData });
+  showSearch.value=true
 });
 });
 
 
 onActivated(()=>{//解决从详情返回到列表 分享时还是详情问题
 onActivated(()=>{//解决从详情返回到列表 分享时还是详情问题
@@ -244,6 +245,9 @@ onActivated(()=>{//解决从详情返回到列表 分享时还是详情问题
 
 
 <template>
 <template>
     <div class="activity-list-page" ref="listWrap" @scroll="listWrapScroll">
     <div class="activity-list-page" ref="listWrap" @scroll="listWrapScroll">
+        <teleport to="#report-search-box">
+            
+        </teleport>
         <el-affix>
         <el-affix>
             <div class="top-nav-wrap">
             <div class="top-nav-wrap">
                 <div class="nav-first">
                 <div class="nav-first">
@@ -308,7 +312,7 @@ onActivated(()=>{//解决从详情返回到列表 分享时还是详情问题
                 </div>
                 </div>
             </li>
             </li>
         </ul>
         </ul>
-         <p style="text-align:center;color:#666" v-if="listData.list.length>0&&listData.finished">没有更多了~</p>
+        <p style="text-align:center;color:#666" v-if="listData.list.length>0&&listData.finished">没有更多了~</p>
     </div>
     </div>
 </template>
 </template>