1
0
Просмотр исходного кода

feat: 雷锋故居场景隐藏热点和右侧工具栏

chenlei 1 год назад
Родитель
Сommit
140716f387
2 измененных файлов с 14 добавлено и 6 удалено
  1. 9 4
      scene/src/pages/Home.vue
  2. 5 2
      scene/src/views/gui/menu.vue

+ 9 - 4
scene/src/pages/Home.vue

@@ -28,7 +28,7 @@
         <v-title />
 
         <!-- 底部菜单 -->
-        <v-menu @toHome="showWelcome = true" />
+        <v-menu :hideTools="hideTools" @toHome="showWelcome = true" />
 
         <!-- 导览 -->
         <v-guide />
@@ -118,16 +118,18 @@ export default {
 
   data() {
     return {
-      showWelcome: true,
+      showWelcome: false,
       hotspots: "",
       loading: true,
+      /** 隐藏热点和右侧工具栏 */
+      hideTools: false
     };
   },
 
   methods: {
     hideWelcome() {
       this.showWelcome = false;
-      // window.manage.switchBgmState(true);
+      window.manage.switchBgmState(true);
     },
     getHotSpotList() {
       $.ajax({
@@ -147,7 +149,6 @@ export default {
       });
     },
   },
-
   mounted() {
     this.$nextTick(() => {
       window.evt = document.createEvent("HTMLEvents");
@@ -169,6 +170,10 @@ export default {
     });
   },
   async created() {
+    // 雷锋故居场景需求,会携带 hideCover=1
+    this.hideTools = Boolean(Number(this.$route.query.hideCover))
+    this.showWelcome = !this.hideTools
+
     // 发送访问量
     try {
       await addVisitAPI();

+ 5 - 2
scene/src/views/gui/menu.vue

@@ -147,7 +147,7 @@
             </div>
 
             <!-- 热点列表 -->
-            <div id="myHotList" @click="openInd = 1">
+            <div v-show="!hideTools" id="myHotList" @click="openInd = 1">
               <!-- 鼠标移入的显示 -->
               <div class="hoverTit">热点列表</div>
               <img src="../../assets/img/hot.png" alt="" />
@@ -182,7 +182,7 @@
       </div>
     </div>
 
-    <div class="pinBottom right hideTarget">
+    <div v-show="!hideTools" class="pinBottom right hideTarget">
       <div class="rightViewContainer clearfix">
         <div class="gui-floor">
           <div class="gui-floor-title"></div>
@@ -273,6 +273,9 @@ import Share from "./components/share.vue";
 
 export default {
   components: { HotList, Share },
+  props: {
+    hideTools: Boolean
+  },
   data() {
     return {
       isGuide: true,