Selaa lähdekoodia

Merge branch 'release/1.3.2'

gemercheung 2 vuotta sitten
vanhempi
commit
60eed9b5d1

+ 1 - 1
packages/qjkankan-editor/.env.prod

@@ -7,4 +7,4 @@ VUE_APP_PROXY_URL_ROOT='https://www.4dkankan.com'
 VUE_APP_PROXY_URL='https://www.4dkankan.com/qjkankan/'
 VUE_APP_ORIGIN=
 VUE_APP_URL_FILL=/qjkankan
-VUE_APP_DEBBUG_FLAG=0510-01
+VUE_APP_DEBBUG_FLAG=0512-01

+ 1 - 1
packages/qjkankan-editor/.env.testprod

@@ -7,4 +7,4 @@ VUE_APP_PROXY_URL_ROOT='https://test.4dkankan.com'
 VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_ORIGIN=
 VUE_APP_URL_FILL=/qjkankan
-VUE_APP_DEBBUG_FLAG=0510-01
+VUE_APP_DEBBUG_FLAG=0512-01

+ 1 - 1
packages/qjkankan-editor/someData.json

@@ -38,7 +38,7 @@
   "id": "",
   "remindTime": 1,
   "status": 0,
-  "isShowOpeningAnimation": true,
+  "isShowOpeningAnimation": false,
   "openingAnimationType": "小行星开场",
   "backgroundMusic": {
     "id": "",

+ 9 - 5
packages/qjkankan-editor/src/core/hotspot.js

@@ -38,7 +38,14 @@ const convertBaseStyle = (dest, origin) => {
         // normal
         dest.style.fontSize = origin.fontSize
         dest.style.position = origin.titlePosition
-
+        // 兼容旧数据
+ 
+        if ('visible' in origin && typeof origin.visible == "boolean") {
+            dest.visible = origin.visible ? 0 : 1
+            origin.titleDisplayMode = origin.visible ? 'always' : 'never'
+            delete origin.visible
+            dest.style.position = "top"
+        }
         if (origin && origin.titleDisplayMode == "always") {
             dest.visible = 0
         }
@@ -48,10 +55,7 @@ const convertBaseStyle = (dest, origin) => {
         if (origin && origin.titleDisplayMode == "hover") {
             dest.visible = 2
         }
-        if ('visible' in origin && typeof origin.visible == "boolean") {
-            dest.visible = origin.visible ? 0 : 1
-            dest.style.position = "top"
-        }
+
         dest.style.borderColor = '';
         dest.style.fillColor = 'rgba(0,0,0,0.8)';
         dest.style.textColor = 'rgba(255,255,255,1)';

+ 1 - 1
packages/qjkankan-editor/src/mixins/debuggerHelper.js

@@ -5,7 +5,7 @@ export const debuggerHelper = (show = true) => {
         // log.setColors({
         var css = "background: #28b561; color:#fff;font-size:14px;padding:5px;";
 
-        console.log(`%c 👉:当前版本::---> 1.3.1--${process.env.VUE_APP_DEBBUG_FLAG}`,css);
+        console.log(`%c 👉:当前版本::---> 1.3.2--${process.env.VUE_APP_DEBBUG_FLAG}`,css);
 
     }
 

+ 1 - 1
packages/qjkankan-editor/src/views/base/openingAnimationSettings.vue

@@ -58,7 +58,7 @@ export default {
   },
   mounted() {
     if (this.info.isShowOpeningAnimation === undefined) {
-      this.$set(this.info, 'isShowOpeningAnimation', true)
+      this.$set(this.info, 'isShowOpeningAnimation', false)
     }
     if (!this.info.openingAnimationType) {
       this.$set(this.info, 'openingAnimationType', this.openingTypeList[0])

+ 1 - 1
packages/qjkankan-editor/src/views/hotspot/EditPanel.vue

@@ -250,7 +250,7 @@ export default {
     hotspot: {
       handler(val) {
         // console.error("this.hotspot", val);
-        // console.error("hotspot", val);
+        console.warn("hotspot", val);
         this.$bus.emit("edithotspot", val);
         // console.log("this.$bus", this.$bus);
         // this.$getKrpano().call("removeJQHotspot(" + val.name + ");");

+ 12 - 0
packages/qjkankan-kankan-view/src/components/Tags/constant.js

@@ -41,5 +41,17 @@ export const custom = () => {
             icon: 'web',
             name: t('common.link'),
         },
+        text: {
+            icon: 'pic',
+            upload: true,
+            uploadPlace: t('common.upload') + t('common.image'),
+            accept: `.jpg,.png`,
+            multiple: true,
+            name: t('common.image'),
+            maxSize: 5 * 1024 * 1024,
+            maxNum: 9,
+            // othPlaceholder: '支持JPG、PNG图片格式,单张不超过5MB,最多支持上传9张。',
+            othPlaceholder: t('tag.toolbox.metaImageTips', { form: 'jpg/png', size: '5MB', maxlength: '9' }),
+        },
     }
 }

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

@@ -7,4 +7,4 @@ VUE_APP_URL_FILL=/qjkankan
 
 # 接口请求地址
 VUE_APP_APIS_URL=https://www.4dkankan.com/
-VUE_APP_DEBBUG_FLAG=0510-01
+VUE_APP_DEBBUG_FLAG=0512-01

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

@@ -6,4 +6,4 @@ VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_URL_FILL=/qjkankan
 # 接口请求地址
 VUE_APP_APIS_URL=https://test.4dkankan.com/
-VUE_APP_DEBBUG_FLAG=0509-01
+VUE_APP_DEBBUG_FLAG=0512-033

+ 1 - 1
packages/qjkankan-view/public/showMobile.html

@@ -11,7 +11,7 @@
     <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/lib/iconfontVR/iconfont.css"/>
     <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/lib/iconfontV1.2.0/iconfont.css"/>
     <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/lib/swiper/swiper-bundle.min.css" />
-    <script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script> 
+    <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script> 
     <link rel="icon" href="./favicon.png" />
     <title>-</title>
   </head>

+ 25 - 9
packages/qjkankan-view/src/components/UIGather/control.vue

@@ -154,8 +154,12 @@ const customLink = computed(() => store.getters["scene/customLink"]);
 const fdkkmetadata = computed(() => store.getters["fdkk/metadata"]);
 const fdkkBGM = computed(() => store.getters["fdkk/fdkkBGM"]);
 
-const setExplanation = () => {
-  if ("audioUrl" in currentScene.value) {
+const setExplanation = (from) => {
+  if (
+    "explanation" in currentScene.value &&
+    "audioUrl" in currentScene.value.explanation
+  ) {
+    console.log("设置解说", from);
     let { audioUrl, openByDefault, repeat } = currentScene.value.explanation;
     showCommentaryPlaying.value = false;
     store.commit("functions/setCommentaryUrl", {
@@ -165,30 +169,42 @@ const setExplanation = () => {
     });
     useSoundPlayer.player.isLock = false;
     useSoundPlayer.player.watchPlay();
-  }
+  } 
+};
+const stopExplanation = () => {
+  useSoundPlayer.player.isLock = true;
+  soundPlayer.paused();
 };
-const resetExplanation = () => {
+const resumeExplanation = () => {
+  useSoundPlayer.player.isLock = false;
+  useSoundPlayer.player.watchPlay();
+};
+const resetExplanation = (from) => {
+  console.log("清空解说", from);
   store.commit("functions/setCommentaryUrl", "");
   useSoundPlayer.player.isLock = true;
   soundPlayer.pause();
 };
 watch([isShowCover, isDoneforCover], (val) => {
   if (val[0] && val[1]) {
-    setExplanation();
+    resumeExplanation(2);
   }
 });
 watchEffect(() => {
   if (currentScene.value.explanation) {
     let { audioUrl } = currentScene.value.explanation;
 
-    if (audioUrl && !unref(isShowCover)) {
+    if (audioUrl) {
       //解说有变,初始化按钮状态
-      setExplanation();
+      setExplanation(1);
     } else {
-      resetExplanation();
+      resetExplanation(1);
     }
   } else {
-    resetExplanation();
+    resetExplanation(2);
+  }
+  if (unref(isShowCover)) {
+    stopExplanation();
   }
 });
 

+ 35 - 10
packages/qjkankan-view/src/components/UIGather/mobile/control.vue

@@ -34,39 +34,64 @@ const isShowCover = computed(
   () => metadata.value.coverInfo?.isShowCover || false
 );
 
-const setExplanation = () => {
-  if ("audioUrl" in currentScene.value) {
+const setExplanation = (from) => {
+  if (
+    "explanation" in currentScene.value &&
+    "audioUrl" in currentScene.value.explanation
+  ) {
+    console.log("设置解说", from);
     let { audioUrl, openByDefault, repeat } = currentScene.value.explanation;
+    // showCommentaryPlaying.value = false;
     store.commit("functions/setCommentaryUrl", {
       src: audioUrl,
       loop: repeat,
       openByDefault: openByDefault,
     });
-
     useSoundPlayer.player.isLock = false;
     useSoundPlayer.player.watchPlay();
   }
 };
-const resetExplanation = () => {
+const stopExplanation = (from) => {
+  console.log("stop解说", from);
+  useSoundPlayer.player.isLock = true;
+  soundPlayer.paused();
+  setTimeout(() => soundPlayer.paused(), 100);
+};
+const resumeExplanation = () => {
+  console.log("resume解说");
+  useSoundPlayer.player.isLock = false;
+  useSoundPlayer.player.watchPlay();
+};
+const resetExplanation = (from) => {
+  console.log("清空解说", from);
   store.commit("functions/setCommentaryUrl", "");
   useSoundPlayer.player.isLock = true;
-  soundPlayer.pause();
+  soundPlayer.paused();
 };
 watch([isShowCover, isDoneforCover], (val) => {
   if (val[0] && val[1]) {
-    setExplanation();
+    resumeExplanation(2);
+  }
+  if (val[0] && !val[1]) {
+    stopExplanation(2);
   }
 });
+
 watchEffect(() => {
   if (currentScene.value.explanation) {
     let { audioUrl } = currentScene.value.explanation;
-    if (audioUrl && !unref(isShowCover)) {
-      setExplanation();
+
+    if (audioUrl) {
+      //解说有变,初始化按钮状态
+      setExplanation(1);
+      if (unref(isShowCover)) {
+        stopExplanation(1);
+      }
     } else {
-      resetExplanation();
+      resetExplanation(1);
     }
   } else {
-    resetExplanation();
+    resetExplanation(2);
   }
 });
 </script>

+ 1 - 1
packages/qjkankan-view/src/components/assembly/Opening.vue

@@ -106,7 +106,7 @@ import { useApp } from "@/app";
 import { useI18n, getLocale } from "@/i18n";
 
 const { t } = useI18n({ useScope: "global" });
-const zIndex = ref(1);
+const zIndex = ref(1000);
 const useZIndex = () => {
   zIndex.value++;
   return unref(zIndex);

+ 0 - 337
packages/qjkankan-view/src/components/assembly/OpeningMobile copy.vue

@@ -1,337 +0,0 @@
-<template>
-  <!-- 视频 -->
-  <div
-    class="videocon"
-    v-if="coverData.coverSelect.indexOf('video') > -1 && showVideo"
-    :style="{
-      backgroundColor: `${coverData.videoColorSelec}`,
-    }"
-  >
-    <video
-      v-if="coverData.videoMo"
-      x5-playsinline="true"
-      playsinline="true"
-      webkit-playsinline="true"
-      class="video"
-      ref="openvideo$"
-      preload
-      autoplay
-      :poster="coverData.videoMoIcon"
-      :class="coverData.videoMoLoc == 'center' ? 'contain' : 'cover'"
-      :src="coverData.videoMo"
-      :controls="Boolean(coverData.coverVideoControl)"
-      muted
-    ></video>
-
-    <img
-      v-show="playing"
-      @click.stop="bofang"
-      class="bofang"
-      :src="require('@/assets/images/default/bofang.png')"
-      alt=""
-    />
-
-    <div @click.stop="jumpVideo" class="jump">
-      {{
-        countdownVideo > 0
-          ? $t("common.jumpTips", { second: countdownVideo })
-          : $t("common.jump")
-      }}
-    </div>
-  </div>
-
-  <!-- 图片 -->
-
-  <div
-    class="imgcon"
-    v-if="coverData.coverSelect.toLowerCase().indexOf('img') > -1 && showImg"
-    @click="closeImg"
-  >
-    <div
-      @click="closeImg"
-      class="image-front"
-      :style="{
-        backgroundImage: `url(${coverData.coverPc})`,
-        backgroundSize: coverData.coverMoLoc == 'center' ? 'contain' : 'cover',
-      }"
-    ></div>
-    <div
-      class="img-background"
-      v-if="coverData.coverMoLoc !== 'full'"
-      :style="{
-        backgroundImage:
-          coverData.coverImgBac == 'imgTile'
-            ? `url(${coverData.coverBac})`
-            : `none`,
-        backgroundColor:
-          coverData.coverImgBac == 'imgTile'
-            ? `none`
-            : `${coverData.imgColorSelec}`,
-      }"
-    ></div>
-    <div @click.stop="closeImg" class="jump">
-      {{
-        countdownImg > 0
-          ? $t("common.jumpTips", { second: countdownImg })
-          : $t("common.jump")
-      }}
-    </div>
-  </div>
-</template>
-<script setup>
-import { ref, watch, computed, onMounted, defineProps, unref } from "vue";
-import { useStore } from "vuex";
-import { useApp } from "@/app";
-import { useI18n, getLocale } from "@/i18n";
-
-const { t } = useI18n({ useScope: "global" });
-
-const props = defineProps({
-  coverData: {
-    type: [Boolean, Object],
-    default: () => {
-      return {};
-    },
-  },
-});
-const store = useStore();
-const openvideo$ = ref(null);
-const playing = ref(true);
-
-const show = ref(true);
-const countdownImg = ref(3);
-const countdownVideo = ref(3);
-const timer = ref(null);
-
-const showVideo = ref(true);
-const showImg = ref(true);
-
-const currentScene = computed(() => store.getters["scene/currentScene"]);
-
-const closeImg = (isCall = false) => {
-  useApp().then((app) => {
-    showImg.value = false;
-    if (props.coverData.coverSelect.toLowerCase().indexOf("and") > -1) {
-      if (props.coverData.coverImageOrder == "later") {
-        showVideo.value = true;
-        showVideoDaoji();
-      }
-      app.render();
-    } else {
-      app.render();
-    }
-  });
-};
-
-const closeVideo = (isCall = false) => {
-  useApp().then((app) => {
-    showVideo.value = false;
-    if (!isCall) {
-      app.render();
-    }
-  });
-};
-
-const showImgDaoji = (cb = () => {}) => {
-  timer.value = setInterval(() => {
-    countdownImg.value--;
-    if (countdownImg.value == 0) {
-      clearInterval(timer.value);
-      timer.value = null;
-      cb();
-
-      return;
-    }
-  }, 1000);
-};
-
-const showVideoDaoji = (isCall = false) => {
-  timer.value = setInterval(() => {
-    countdownVideo.value--;
-    if (countdownVideo.value == 0) {
-      clearInterval(timer.value);
-      timer.value = null;
-      return;
-    }
-  }, 1000);
-};
-
-const jumpVideo = (isCall = false) => {
-  closeVideo(isCall);
-  if (isCall) {
-    showImg.value = true;
-    showImgDaoji();
-  }
-};
-
-// 执行图片封面
-const executeImg = () => {
-  showImgDaoji(() => {
-    closeImg();
-  });
-};
-
-onMounted(() => {
-  console.log("coverData", unref(props.coverData));
-  switch (true) {
-    case props.coverData.coverSelect.toLowerCase().indexOf("and") > -1:
-      if (props.coverData.coverImageOrder == "before") {
-        // 倒计时结束需要唤起图片
-        showVideoDaoji(true);
-        showImg.value = false;
-      } else {
-        showImgDaoji(true);
-        showVideo.value = false;
-      }
-
-      break;
-    case props.coverData.coverSelect.toLowerCase().indexOf("video") > -1:
-      showVideoDaoji(() => {
-        props.coverData.coverVideoInWay == 1 && closeVideo();
-      });
-      break;
-    case props.coverData.coverSelect.toLowerCase().indexOf("img") > -1:
-      showImgDaoji(() => {
-        props.coverData.coverImageInWay == 1 && closeImg();
-      });
-      break;
-    default:
-      break;
-  }
-  if (props.coverData.coverSelect) {
-  }
-
-  if (openvideo$.value) {
-    openvideo$.value.addEventListener("ended", () => {
-      if (props.coverData.coverVideoInWay) {
-        closeVideo();
-      }
-    });
-
-    openvideo$.value.addEventListener("playing", () => {
-      if (playing.value) {
-        playing.value = false;
-      }
-    });
-
-    openvideo$.value.addEventListener("pause", () => {
-      if (!playing.value) {
-        playing.value = true;
-      }
-    });
-
-    document.addEventListener(
-      "WeixinJSBridgeReady",
-      () => {
-        console.log("WeixinJSBridgeReady", openvideo$.value);
-        openvideo$.value.play();
-      },
-      false
-    );
-  }
-}),
-  useApp().then((app) => {
-    app.Scene.on("ready", () => {
-      if (show.value) {
-        show.value = false;
-      }
-    });
-  });
-</script>
-<style lang="scss" scoped>
-.imgcon,
-.videocon {
-  position: fixed;
-  left: 0;
-  right: 0;
-  top: 0;
-  bottom: 0;
-  width: 100%;
-  height: 100%;
-}
-
-.imgcon {
-  background-position: center;
-  z-index: 10;
-  .image-front,
-  .img-background {
-    background-position: center;
-    width: 100%;
-    height: 100%;
-    position: absolute;
-
-    top: 0;
-    z-index: 1;
-    bottom: 0;
-    left: 0;
-  }
-  .img-background {
-    background-repeat: repeat;
-  }
-  .image-front {
-    z-index: 10;
-  }
-}
-
-.videocon {
-  text-align: center;
-
-  > video {
-    max-width: inherit;
-    height: auto;
-    min-height: 100%;
-    top: 50%;
-    left: 50%;
-    z-index: 99;
-    display: inline-block;
-    transform: translate(-50%, -50%);
-    position: absolute;
-  }
-
-  .contain {
-    height: 100%;
-  }
-
-  .cover {
-    height: 100%;
-    width: 100%;
-    object-fit: cover;
-  }
-
-  .bofang {
-    position: absolute;
-    top: 50%;
-    transform: translate(-50%, -50%);
-    left: 50%;
-    width: 80px;
-    height: 80px;
-    z-index: 99999;
-    pointer-events: none;
-  }
-}
-
-.zidxhigh {
-  z-index: 99;
-}
-
-.jump {
-  position: absolute;
-  right: 15px;
-  top: 20px;
-  background: rgba(255, 255, 255, 0.5);
-  text-align: center;
-  line-height: 28px;
-  font-size: 16px;
-  z-index: 999;
-  color: #333333;
-  border-radius: 1px;
-  padding: 4px 12px;
-  cursor: pointer;
-}
-
-@keyframes loading {
-  100% {
-    left: -900px;
-  }
-}
-</style>

+ 1 - 1
packages/qjkankan-view/src/components/assembly/OpeningMobile.vue

@@ -109,7 +109,7 @@ import { useApp } from "@/app";
 import { useI18n, getLocale } from "@/i18n";
 
 const { t } = useI18n({ useScope: "global" });
-const zIndex = ref(1);
+const zIndex = ref(1000);
 const useZIndex = () => {
   zIndex.value++;
   return unref(zIndex);

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

@@ -86,6 +86,15 @@ onMounted(async () => {
     isShowOpeningAnimation.value = data.isShowOpeningAnimation
       ? Number(data.isShowOpeningAnimation)
       : 0;
+    //TODO 兼容1.2.0或以下数据
+    if (
+      !("isShowOpeningAnimation" in data) &&
+      "openingAnimationType" in data &&
+      data.openingAnimationType.length > 0
+    ) {
+      console.log("小行星没有开关,但有openingAnimationType强制开启");
+      isShowOpeningAnimation.value = 1;
+    }
     store.commit("scene/setScenes", data.scenes);
     store.commit(
       "scene/setPassword",
@@ -180,7 +189,7 @@ onMounted(async () => {
       },
       passQueryParameters: true,
     });
-    console.log("gemer", currentScene.value.icon);
+
 
     coverInfo.value = data.coverInfo || {};
     app.Scene.lock();
@@ -190,6 +199,7 @@ onMounted(async () => {
     }
 
     if (isHavePano) {
+
       app.Scene.on("sceneReady", () => {
         if (app.krpanoDom) {
           let defaultMask = `%SWFPATH%/skin/masking_${lang}.png`;

+ 9 - 0
packages/qjkankan-view/src/pages/showMobile.vue

@@ -82,6 +82,15 @@ onMounted(async () => {
     isShowOpeningAnimation.value = data.isShowOpeningAnimation
       ? Number(data.isShowOpeningAnimation)
       : 0;
+    //TODO 兼容1.2.0或以下数据
+    if (
+      !("isShowOpeningAnimation" in data) &&
+      "openingAnimationType" in data &&
+      data.openingAnimationType.length > 0
+    ) {
+      console.log("小行星没有开关,但有openingAnimationType强制开启");
+      isShowOpeningAnimation.value = 1;
+    }
     store.commit("scene/setScenes", data.scenes);
     store.commit(
       "scene/setPassword",

+ 24 - 2
packages/qjkankan-view/src/store/modules/scene.js

@@ -1,3 +1,24 @@
+
+/**
+ * 兼容自定主义按键为中文的处理器
+ */
+const covertCustomButton = (data) => {
+  return data.map(item => {
+    if ('type' in item) {
+      if (item.type == '链接') item.type = 'link'
+      if (item.type == '电话') item.type = 'phone'
+
+    }
+    if ('openMethod' in item) {
+      if (item.openMethod == '弹出层打开') item.openMethod = '_self'
+      if (item.openMethod == '新窗口打开') item.openMethod = '_target'
+    }
+    console.log('当前转换数据!',item);
+    return item
+  })
+
+}
+
 export default {
   namespaced: true,
   state() {
@@ -44,9 +65,9 @@ export default {
       let metadata = getters.metadata
       if (metadata.customButton) {
         let temp = JSON.parse(JSON.stringify(metadata.customButton))
-        return temp.find(item => item.type == 'link')
+        const res = covertCustomButton(temp);
+        return res.find(item => item.type == 'link')
       }
-
       return {}
     },
 
@@ -56,6 +77,7 @@ export default {
       if (metadata.customButton) {
         console.log(metadata.customButton);
         let temp = JSON.parse(JSON.stringify(metadata.customButton))
+        const res = covertCustomButton(temp);
         return temp.find(item => item.type == 'phone')
       }
 

+ 1 - 1
packages/qjkankan-view/src/utils/debuggerHelper.js

@@ -5,7 +5,7 @@ export const debuggerHelper = (show = true) => {
         // log.setColors({
         var css = "background: #28b561; color:#fff;font-size:14px;padding:5px;";
 
-        console.log(`%c 👉:当前版本::---> 1.3.1--${process.env.VUE_APP_DEBBUG_FLAG}`,css);
+        console.log(`%c 👉:当前版本::---> 1.3.2--${process.env.VUE_APP_DEBBUG_FLAG}`,css);
 
     }
 

+ 17 - 11
packages/qjkankan-view/src/utils/sound.js

@@ -19,7 +19,7 @@ const retryPlay = player => {
         $player.removeEventListener('touchstart', onclick)
 
         //判断是否第一次进入或者是否已点击过
-        if (player.pauseFromOther||CLICKFIRST) {
+        if (player.pauseFromOther || CLICKFIRST) {
             return
         }
         CLICKFIRST = true
@@ -102,11 +102,17 @@ class AudioPlayer extends QJKanKan.MITT.Emiter {
         if (!this.isPlay) {
             return
         }
+
         this.sound.pause()
         if (fromOther) {
             this.pauseFromOther = true
         }
     }
+    paused() {
+        console.log('hard-paused')
+        this.sound && this.sound.pause()
+        this.isPlay = false
+    }
     stop() {
         this.sound.stop()
     }
@@ -137,7 +143,7 @@ class MusicPlayer extends AudioPlayer {
                             if (!player.pauseFromOther) {
                                 this.play()
                             }
-                        } catch (error) {}
+                        } catch (error) { }
 
                     },
                     false
@@ -178,15 +184,15 @@ class MusicPlayer extends AudioPlayer {
                         //         parent.document.addEventListener('WeixinJSBridgeReady', ready)
                         //     }
                         // } else {
-                            if (autoplay) {
-                                setTimeout(() => {
-                                    this.play()
-                                }, 50);
-                            }
-                            else {
-                                retryPlay(this)
-                            }
-                            // ready()
+                        if (autoplay) {
+                            setTimeout(() => {
+                                this.play()
+                            }, 50);
+                        }
+                        else {
+                            retryPlay(this)
+                        }
+                        // ready()
                         // }
 
                     })