Explorar o código

fix:修改音频互斥的问题

aamin hai 1 ano
pai
achega
699265f7d9
Modificáronse 3 ficheiros con 22 adicións e 28 borrados
  1. 16 16
      src/assets/data/Model/index.ts
  2. 4 10
      src/components/Music.vue
  3. 2 2
      src/view/bldgVideo/detail/index.vue

+ 16 - 16
src/assets/data/Model/index.ts

@@ -227,8 +227,8 @@ const ModelList = [
         "4-10",
       ],
     },
-    viewTop: "12.8%",
-    viewLeft: "70.4%",
+    viewTop: "12%",
+    viewLeft: "74.6%",
     swiperImage: [
       `${baseURL}/image/swiperImage/天主堂/DJI_0312.jpg`,
       `${baseURL}/image/swiperImage/天主堂/DJI_0313.jpg`,
@@ -579,8 +579,8 @@ const ModelList = [
         "5-10",
       ],
     },
-    viewTop: "8.2% ",
-    viewLeft: "26.4%",
+    viewTop: "10.6% ",
+    viewLeft: "28.8%",
     swiperImage: [
       `${baseURL}/image/swiperImage/天主教主教公署旧址/DJI_0383.jpg`,
       `${baseURL}/image/swiperImage/天主教主教公署旧址/DJI_0385.jpg`,
@@ -701,7 +701,7 @@ const ModelList = [
       ],
     },
     viewTop: "14%",
-    viewLeft: "32.6%",
+    viewLeft: "38.6%",
     swiperImage: [
       `${baseURL}/image/swiperImage/博仁堂/DJI_0430.jpg`,
       `${baseURL}/image/swiperImage/博仁堂/DJI_0431.jpg`,
@@ -841,7 +841,7 @@ const ModelList = [
       hotel: [],
     },
     viewTop: "69.2%",
-    viewLeft: "15.2%",
+    viewLeft: "16.2%",
     swiperImage: [
       `${baseURL}/image/swiperImage/黄金塔/DJI_0535.JPG`,
       `${baseURL}/image/swiperImage/黄金塔/DJI_0571.JPG`,
@@ -869,7 +869,7 @@ const ModelList = [
       hotel: [],
     },
     viewTop: "38.6%",
-    viewLeft: "116.6%",
+    viewLeft: "112.4%",
     swiperImage: [
       `${baseURL}/image/swiperImage/衙署前门/DJI_0387.JPG`,
       `${baseURL}/image/swiperImage/衙署前门/DJI_0389.JPG`,
@@ -896,7 +896,7 @@ const ModelList = [
       hotel: [],
     },
     viewTop: "51.8%",
-    viewLeft: "112.4%",
+    viewLeft: "110.4%",
     swiperImage: [
       `${baseURL}/image/swiperImage/监狱旧址/DJI_0397.JPG`,
       `${baseURL}/image/swiperImage/监狱旧址/DJI_0398.JPG`,
@@ -925,7 +925,7 @@ const ModelList = [
       hotel: [],
     },
     viewTop: "40.4%",
-    viewLeft: "127.4%",
+    viewLeft: "123.8%",
     swiperImage: [
       `${baseURL}/image/swiperImage/小天朝/DJI_0445.JPG`,
       `${baseURL}/image/swiperImage/小天朝/DJI_0457.JPG`,
@@ -953,7 +953,7 @@ const ModelList = [
       hotel: [],
     },
     viewTop: "48.8%",
-    viewLeft: "123.8%",
+    viewLeft: "119.6%",
     swiperImage: [
       `${baseURL}/image/swiperImage/大成殿/DJI_0471.JPG`,
       `${baseURL}/image/swiperImage/大成殿/DJI_0472.JPG`,
@@ -980,7 +980,7 @@ const ModelList = [
       hotel: [],
     },
     viewTop: "26%",
-    viewLeft: "26%",
+    viewLeft: "30.2%",
     swiperImage: [
       `${baseURL}/image/swiperImage/皖江中学/DJI_0501.JPG`,
       `${baseURL}/image/swiperImage/皖江中学/DJI_0510.JPG`,
@@ -1036,7 +1036,7 @@ const ModelList = [
       hotel: [],
     },
     viewTop: "32.6%",
-    viewLeft: "93.2%",
+    viewLeft: "90.2%",
     swiperImage: [
       `${baseURL}/image/swiperImage/中国银行旧址/DJI_0483.JPG`,
 
@@ -1062,8 +1062,8 @@ const ModelList = [
       food: [],
       hotel: [],
     },
-    viewTop: "9.8% ",
-    viewLeft: "89.6%",
+    viewTop: "9.8%",
+    viewLeft: "86%",
     swiperImage: [
       `${baseURL}/image/swiperImage/中江塔/DJI_0503.JPG`,
 
@@ -1089,8 +1089,8 @@ const ModelList = [
       food: [],
       hotel: [],
     },
-    viewTop: "101.6%",
-    viewLeft: "27.8%",
+    viewTop: "98.6%",
+    viewLeft: "29%",
     swiperImage: [
       `${baseURL}/image/swiperImage/珩琅塔/DJI_0608.JPG`,
       `${baseURL}/image/swiperImage/珩琅塔/DJI_0618.JPG`,

+ 4 - 10
src/components/Music.vue

@@ -7,13 +7,7 @@ const isShow = ref(true)
 
 store.$subscribe((mutation: any, state: any) => {
   var audio = document.getElementById("music1");
-  if (state.isVideo) {
-    stateAu.value = false;
-    audio.pause();
-  } else {
-    stateAu.value = true;
-    audio.play();
-  }
+
   if (!state.isShowBGM) {
     isShow.value = false
     stateAu.value = false;
@@ -21,11 +15,11 @@ store.$subscribe((mutation: any, state: any) => {
   } else if (state.isShowBGM) {
     isShow.value = true
     if (state.isVideo) {
-      stateAu.value = true;
-      audio.play();
-    } else {
       stateAu.value = false;
       audio.pause();
+    } else {
+      stateAu.value = true;
+      audio.play();
     }
   }
 

+ 2 - 2
src/view/bldgVideo/detail/index.vue

@@ -6,10 +6,10 @@ const currentVedioName = ref("");
 const store = useVideo();
 
 const handlePlayVideo = () => {
-  store.isVideo = true;
+  store.isVideo = false;
 };
 const handlePauseVideo = (data: any) => {
-  store.isVideo = false;
+  store.isVideo = true;
 };
 
 onMounted(() => {