gemercheung пре 2 година
родитељ
комит
7b16776f58

+ 79 - 71
packages/qjkankan-editor/src/views/material/popup/videoPreviewer.vue

@@ -2,11 +2,22 @@
   <popup v-if="ifShow">
     <div class="preview-wrapper">
       <div class="title">
-        <i class="iconfont icon-material_video title-icon"/>
-        {{title}}
+        <i class="iconfont icon-material_video title-icon" />
+        {{ title }}
       </div>
-      <img class="close-btn" :src="require('@/assets/images/icons/material_preview_close@2x.png')" @click=onClickClose />
-      <video class="video" controls controlslist="nodownload noremoteplayback noplaybackrate" disablePictureInPicture autoplay :src="videoSrc"></video>
+      <img
+        class="close-btn"
+        :src="require('@/assets/images/icons/material_preview_close@2x.png')"
+        @click="onClickClose"
+      />
+      <video
+        class="video"
+        controls
+        controlslist="nodownload noremoteplayback noplaybackrate"
+        disablePictureInPicture
+        autoplay
+        :src="videoSrc"
+      ></video>
     </div>
   </popup>
 </template>
@@ -15,86 +26,83 @@
 import Popup from "@/components/shared/popup";
 
 export default {
-  props: {
+  props: {},
+  components: {
+    Popup,
   },
-  components:{
-    Popup
-  },
-  data(){
+  data() {
     return {
       ifShow: false,
-      title: '',
-      videoSrc: '',
-    }
-  },
-  computed: {
-  },
-  watch: {
+      title: "",
+      videoSrc: "",
+    };
   },
-  methods:{
-    show(title = '', videoSrc) {
+  computed: {},
+  watch: {},
+  methods: {
+    show(title = "", videoSrc) {
       if (!videoSrc) {
-        return
+        return;
       }
-      this.title = title
-      this.videoSrc = videoSrc
-      this.ifShow = true
+      this.title = title;
+      this.videoSrc = videoSrc;
+      this.ifShow = true;
     },
     onClickClose() {
-      this.ifShow = false
-    }
+      this.ifShow = false;
+    },
   },
   mounted() {
-    this.$bus.on('clickEsc',()=>{
-      this.onClickClose()
-    })
+    this.$bus.on("clickEsc", () => {
+      this.onClickClose();
+    });
   },
-}
+};
 </script>
 
 <style scoped lang="less">
-  .preview-wrapper {
-    position: fixed;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    .title {
-      position: absolute;
-      top: 16px;
-      left: 30px;
-      z-index: 2;
-      height: 36px;
-      font-size: 14px;
-      color: #FFFFFF;
-      background: rgba(0, 0, 0, 0.6);
-      border-radius: 18px;
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      padding-left: 16px;
-      padding-right: 16px;
-      .title-icon {
-        margin-right: 6px;
-      }
-    }
-    .close-btn {
-      position: absolute;
-      top: 16px;
-      right: 30px;
-      width: 36px;
-      height: 36px;
-      z-index: 2;
-      cursor: pointer;
-    }
-    .video {
-      position: absolute;
-      width: 960px;
-      height: 540px;
-      top: 50%;
-      left: 50%;
-      transform: translate(-50%, -50%);
-      z-index: 1;
+.preview-wrapper {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  .title {
+    position: absolute;
+    top: 16px;
+    left: 30px;
+    z-index: 2;
+    height: 36px;
+    font-size: 14px;
+    color: #ffffff;
+    background: rgba(0, 0, 0, 0.6);
+    border-radius: 18px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    padding-left: 16px;
+    padding-right: 16px;
+    .title-icon {
+      margin-right: 6px;
     }
   }
-</style>
+  .close-btn {
+    position: absolute;
+    top: 16px;
+    right: 30px;
+    width: 36px;
+    height: 36px;
+    z-index: 2;
+    cursor: pointer;
+  }
+  .video {
+    position: absolute;
+    width: 960px;
+    height: 540px;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    z-index: 1;
+  }
+}
+</style>

+ 1 - 1
packages/qjkankan-view/.env.testdev

@@ -8,4 +8,4 @@ VUE_APP_URL_FILL=
 # 接口请求地址
 VUE_APP_APIS_URL=https://test.4dkankan.com/
 VUE_APP_DEBBUG_FLAG=0516-03
-VUE_APP_DEBBUG_NOTIFY=1
+VUE_APP_DEBBUG_NOTIFY=0

+ 1 - 1
packages/qjkankan-view/src/pages/show.vue

@@ -112,7 +112,7 @@ onMounted(async () => {
     // 所有audio入口
 
     const currentSceneData = firstScene || data.scenes[0];
-    store.dispatch("audio/initNormalBGM", data.backgroundMusic.ossPath);
+    store.dispatch("audio/initNormalBGM", data.backgroundMusic.ossPath || "");
     store.commit("scene/setCurrentScene", currentSceneData);
 
     // 过滤空分组

+ 1 - 1
packages/qjkankan-view/src/pages/showMobile.vue

@@ -117,7 +117,7 @@ onMounted(async () => {
 
     const currentSceneData = firstScene || data.scenes[0];
     // debugger;
-    store.dispatch("audio/initNormalBGM", data.backgroundMusic.ossPath);
+    store.dispatch("audio/initNormalBGM", data.backgroundMusic.ossPath || "");
     store.commit("scene/setCurrentScene", currentSceneData);
 
     // 过滤空分组