shaogen1995 2 年 前
コミット
bce88301a9
2 ファイル変更23 行追加6 行削除
  1. 14 5
      SWKK/src/components/Rbottom.vue
  2. 9 1
      SWKK/src/views/Home.vue

+ 14 - 5
SWKK/src/components/Rbottom.vue

@@ -83,16 +83,22 @@
             @click="cutGoods(index)"
             class="swiper-slide"
             v-for="(item, index) in list"
-            :class="{ active: acList === index && playing }"
+            :class="{ active: (acList === index && playing) || (clickBottomAc&&acList === index) }"
             :key="index"
           >
             <img :src="item.list[0].enter.cover" alt="" />
             <div
               class="plan"
-              v-show="acList === index&& playing"
+              v-show="(acList === index && playing) || (clickBottomAc&&acList === index)"
               :style="{ width: progressPart + '%' }"
             ></div>
-            <p :class="{txtActive:acList === index && playing}">{{ item.name }}</p>
+            <p
+              :class="{
+                txtActive: (acList === index && playing) || (clickBottomAc&&acList === index),
+              }"
+            >
+              {{ item.name }}
+            </p>
           </div>
           <div class="swiper-slide" style="pointer-events: none"></div>
         </div>
@@ -123,7 +129,7 @@ import Swiper from "./swiper.js";
 export default {
   name: "Rbottom",
   components: {},
-  props: ["acList", "progressPart", "playing"],
+  props: ["acList", "progressPart", "playing", "clickBottomAc"],
   data() {
     //这里存放数据
     return {
@@ -170,6 +176,9 @@ export default {
   //方法集合
   methods: {
     cutGoods(index) {
+      this.$emit("update:clickBottomAc", false);
+      
+
       this.$emit("daoLanCut", index);
       this.leftList[0].done = false;
       if (window.bacMusic) {
@@ -456,7 +465,7 @@ export default {
           height: 4px;
           background-color: #930909;
         }
-        .txtActive{
+        .txtActive {
           color: #930909;
         }
       }

+ 9 - 1
SWKK/src/views/Home.vue

@@ -32,6 +32,7 @@
       :acList="partId"
       :playing="playing"
       :progressPart="progressPart"
+      :clickBottomAc.sync="clickBottomAc"
     />
 
     <!-- 左上名字和介绍 -->
@@ -73,6 +74,7 @@ export default {
       disable: false,
       playing: false,
       sonInfo: null,
+      clickBottomAc: false,
     };
   },
   //监听属性 类似于data概念
@@ -130,6 +132,9 @@ export default {
       player.pause();
       await player.selectPart(index);
       this.disable = false;
+
+      
+      this.clickBottomAc = true;
     },
 
     // 切换楼层
@@ -354,7 +359,10 @@ export default {
         this.$refs.RbottomRef.leftCut(num);
       }
     });
-
+    // 每次移动了点位就会触发
+    kankan.Camera.on("flying.started", (pano) => {
+      this.clickBottomAc = false;
+    });
     this.kankan = kankan;
   },
   beforeCreate() {}, //生命周期 - 创建之前