Selaa lähdekoodia

Merge branch 'dev' of http://face3d.4dage.com:7005/chenzhiguang/qjkankan_v1.1.1 into dev

任一存 2 vuotta sitten
vanhempi
commit
796f0016d4

+ 5 - 5
packages/qjkankan-editor/src/components/materialSelectorForEditor.vue

@@ -560,7 +560,7 @@ import { mapMutations } from "vuex";
 import {
   getMaterialList,
   getSceneList,
-  uploadMaterial,
+  uploadMaterialOld,
   checkMStatus,
   checkUserSize,
 } from "@/api";
@@ -1166,7 +1166,7 @@ export default {
           backendId: '',
         };
 
-        itemInUploadList.abortHandler = uploadMaterial(
+        itemInUploadList.abortHandler = uploadMaterialOld(
           {
             file: eachFile
           },
@@ -1239,7 +1239,7 @@ export default {
           successInfo: null,
         };
         
-        itemInUploadList.abortHandler = uploadMaterial(
+        itemInUploadList.abortHandler = uploadMaterialOld(
           {
             file: eachFile
           },
@@ -1312,7 +1312,7 @@ export default {
           abortHandler: null,
         };
         
-        itemInUploadList.abortHandler = uploadMaterial(
+        itemInUploadList.abortHandler = uploadMaterialOld(
           {
             file: eachFile
           },
@@ -1386,7 +1386,7 @@ export default {
           abortHandler: null,
         };
         
-        itemInUploadList.abortHandler = uploadMaterial(
+        itemInUploadList.abortHandler = uploadMaterialOld(
           {
             file: eachFile
           },

+ 7 - 0
packages/qjkankan-editor/src/lang/_en.json

@@ -663,11 +663,18 @@
     "coverUpTit1":"建议1920*1080px,2M以内,jpg / gif / png格式",
     "coverUpTit2":"建议750*1624px,1M以内,jpg / gif / png格式",
     "coverUpTit3":"建议300*300px,100kb以内,jpg格式",
+    "coverUpTit4":"建议1920*1080px,5M以内,mp4格式",
+    "coverUpTit5":"建议750*1624px,5M以内,mp4格式",
     "coverImgLoc1":"居中",
     "coverImgLoc2":"全屏",
     "coverImgBacTit":"背景设置",
     "coverImgBacSelec1":"纯色填充",
     "coverImgBacSelec2":"图片平铺",
+    "coverVideoTit":"视频设置",
+    "select_video":"选择视频",
+
+
+
 
     "auto_pano": "Rotation",
     "enter_auto": "Enter the rotation mode (takes 3 mins to complete per rotation)",

+ 5 - 0
packages/qjkankan-editor/src/lang/_zh.json

@@ -674,11 +674,16 @@
     "coverUpTit1":"建议1920*1080px,2M以内,jpg / gif / png格式",
     "coverUpTit2":"建议750*1624px,1M以内,jpg / gif / png格式",
     "coverUpTit3":"建议300*300px,100kb以内,jpg格式",
+    "coverUpTit4":"建议1920*1080px,5M以内,mp4格式",
+    "coverUpTit5":"建议750*1624px,5M以内,mp4格式",
     "coverImgLoc1":"居中",
     "coverImgLoc2":"全屏",
     "coverImgBacTit":"背景设置",
     "coverImgBacSelec1":"纯色填充",
     "coverImgBacSelec2":"图片平铺",
+    "coverVideoTit":"视频设置",
+    "select_video":"选择视频",
+
     
 
     "auto_pano": "自动巡游",

+ 1 - 1
packages/qjkankan-editor/src/utils/request.js

@@ -115,7 +115,7 @@ function getCookie(objname) {
 
 export function getToken() {
   return (
-   localStorage.getItem("token") || getCookie("fdkankantoken") || ""
+     localStorage.getItem("token") || getCookie("fdkankantoken") || ""
   );
 }
 

+ 236 - 26
packages/qjkankan-editor/src/views/base/coverBase.vue

@@ -21,8 +21,8 @@
         </Option>
       </Select>
 
-      <!-- 图片设置 -->
-      <template>
+      <!-- 关于图片 -->
+      <div class="mainImgBox" v-show="SelectValue !== 'video'">
         <div class="coverImgTit">{{ coverImgTit }}</div>
         <div class="coverImgBox">
           <!-- pc图片 -->
@@ -38,7 +38,11 @@
                 <!-- 上传图片按钮 -->
                 <button
                   class="ui-button submit"
-                  @click="(isShowSelectionWindow = true), (selectingFor = 'pc')"
+                  @click="
+                    (isShowSelectionWindow = true),
+                      (selectingFor = 'pc'),
+                      (upType = 'image'),(upTypeSta='imgBac')
+                  "
                 >
                   {{ $i18n.t(`edit_settings.select_image`) }}
                 </button>
@@ -50,15 +54,15 @@
                 <!-- 选择居中和全屏 -->
                 <div class="coverImglocBox">
                   <div
-                    :class="{ active: imgLoc1 === 'centen' }"
-                    @click="imgLoc1 = 'centen'"
+                    :class="{ active: coverPcLoc === 'centen' }"
+                    @click="coverPcLoc = 'centen'"
                   >
                     <div class="inco"></div>
                     <div class="txt">{{ coverImgLoc1 }}</div>
                   </div>
                   <div
-                    :class="{ active: imgLoc1 === 'full' }"
-                    @click="imgLoc1 = 'full'"
+                    :class="{ active: coverPcLoc === 'full' }"
+                    @click="coverPcLoc = 'full'"
                   >
                     <div class="inco inco2"></div>
                     <div class="txt">{{ coverImgLoc2 }}</div>
@@ -81,7 +85,9 @@
                 <button
                   class="ui-button submit"
                   @click="
-                    (isShowSelectionWindow = true), (selectingFor = 'mobile')
+                    (isShowSelectionWindow = true),
+                      (selectingFor = 'mobile'),
+                      (upType = 'image'),(upTypeSta='imgBac')
                   "
                 >
                   {{ $i18n.t(`edit_settings.select_image`) }}
@@ -94,15 +100,15 @@
                 <!-- 选择居中和全屏 -->
                 <div class="coverImglocBox">
                   <div
-                    :class="{ active: imgLoc2 === 'centen' }"
-                    @click="imgLoc2 = 'centen'"
+                    :class="{ active: coverMoLoc === 'centen' }"
+                    @click="coverMoLoc = 'centen'"
                   >
                     <div class="inco"></div>
                     <div class="txt">{{ coverImgLoc1 }}</div>
                   </div>
                   <div
-                    :class="{ active: imgLoc2 === 'full' }"
-                    @click="imgLoc2 = 'full'"
+                    :class="{ active: coverMoLoc === 'full' }"
+                    @click="coverMoLoc = 'full'"
                   >
                     <div class="inco inco2"></div>
                     <div class="txt">{{ coverImgLoc2 }}</div>
@@ -150,7 +156,11 @@
             <div class="imgRight">
               <button
                 class="ui-button submit"
-                @click="(isShowSelectionWindow = true), (selectingFor = 'bac')"
+                @click="
+                  (isShowSelectionWindow = true),
+                    (selectingFor = 'bac'),
+                    (upType = 'image'),(upTypeSta='imgBac')
+                "
               >
                 {{ $i18n.t(`edit_settings.select_image`) }}
               </button>
@@ -161,7 +171,162 @@
             </div>
           </div>
         </div>
-      </template>
+      </div>
+
+      <!-- 关于视频 -->
+      <div class="mainVideoBox" v-show="SelectValue !== 'img'">
+        <div class="coverImgTit">
+          {{ $i18n.t(`edit_settings.coverVideoTit`) }}
+        </div>
+        <div class="coverImgBox">
+          <!-- pc视频 -->
+          <div class="coverImgBox_ll">
+            <div class="tit">{{ $i18n.t(`edit_settings.pc`) }}</div>
+            <div class="coverImgMain">
+              <SelectedImage
+                :imgSrc="info.videoPc"
+                :defaultImgSrc="require('@/assets/img/coverUpTit2.png')"
+                @cancel="clearVideoPc"
+              ></SelectedImage>
+              <div class="imgRight">
+                <!-- 上传视频按钮 -->
+                <button
+                  class="ui-button submit"
+                  @click="
+                    (isShowSelectionWindow = true),
+                      (selectingFor = 'pc'),
+                      (upType = 'video'),(upTypeSta='videoBac')
+                  "
+                >
+                  {{ $i18n.t(`edit_settings.select_video`) }}
+                </button>
+                <!-- 上传提示 -->
+                <div
+                  class="ui-remark"
+                  v-html="$i18n.t(`edit_settings.coverUpTit4`)"
+                ></div>
+                <!-- 选择居中和全屏 -->
+                <div class="coverImglocBox">
+                  <div
+                    :class="{ active: videoPcLoc === 'centen' }"
+                    @click="videoPcLoc = 'centen'"
+                  >
+                    <div class="inco"></div>
+                    <div class="txt">{{ coverImgLoc1 }}</div>
+                  </div>
+                  <div
+                    :class="{ active: videoPcLoc === 'full' }"
+                    @click="videoPcLoc = 'full'"
+                  >
+                    <div class="inco inco2"></div>
+                    <div class="txt">{{ coverImgLoc2 }}</div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="coverImgBox_rr">
+            <div class="tit">{{ $i18n.t(`edit_settings.mobile`) }}</div>
+            <!-- 移动端视频 -->
+            <div class="coverImgMain">
+              <SelectedImage
+                :imgSrc="info.videoMo"
+                :defaultImgSrc="require('@/assets/img/coverUpTit2.png')"
+                @cancel="claerVideoMo"
+              ></SelectedImage>
+              <div class="imgRight">
+                <!-- 上传视频按钮 -->
+                <button
+                  class="ui-button submit"
+                  @click="
+                    (isShowSelectionWindow = true),
+                      (selectingFor = 'mobile'),
+                      (upType = 'video'),(upTypeSta='videoBac')
+                  "
+                >
+                  {{ $i18n.t(`edit_settings.select_video`) }}
+                </button>
+                <!-- 上传提示 -->
+                <div
+                  class="ui-remark"
+                  v-html="$i18n.t(`edit_settings.coverUpTit5`)"
+                ></div>
+                <!-- 选择居中和全屏 -->
+                <div class="coverImglocBox">
+                  <div
+                    :class="{ active: videoMoLoc === 'centen' }"
+                    @click="videoMoLoc = 'centen'"
+                  >
+                    <div class="inco"></div>
+                    <div class="txt">{{ coverImgLoc1 }}</div>
+                  </div>
+                  <div
+                    :class="{ active: videoMoLoc === 'full' }"
+                    @click="videoMoLoc = 'full'"
+                  >
+                    <div class="inco inco2"></div>
+                    <div class="txt">{{ coverImgLoc2 }}</div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <!-- 视频背景设置 -->
+        <div class="coverImgBacBox">
+          <div class="tit">{{ $i18n.t(`edit_settings.coverImgBacTit`) }}</div>
+          <Select v-model="coverVideoBac">
+            <Option
+              v-for="item in coverImgBacList"
+              :key="item.type"
+              :label="item.txt"
+              :value="item.type"
+            >
+            </Option>
+          </Select>
+          <!-- 选择颜色 -->
+          <div class="imgColorSelec" v-show="coverVideoBac === 'colorFill'">
+            <div class="ll">{{ videoColorSelec }}</div>
+            <div
+              class="rr"
+              :style="`background-color: ${videoColorSelec};`"
+            ></div>
+            <ColorPicker
+              @change="videoColorSelecChange"
+              v-model="videoColorSelec"
+              :predefine="predefineColors"
+            >
+            </ColorPicker>
+          </div>
+          <!-- 选择背景图片 -->
+          <div class="imgClolrBacImg" v-show="coverVideoBac === 'imgTile'">
+            <SelectedImage
+              :imgSrc="info.videoBacImg"
+              :defaultImgSrc="require('@/assets/img/coverUpTit1.png')"
+              @cancel="onCancelBac2"
+            ></SelectedImage>
+            <!-- 上传图片按钮 -->
+            <div class="imgRight">
+              <button
+                class="ui-button submit"
+                @click="
+                  (isShowSelectionWindow = true),
+                    (selectingFor = 'bac'),
+                    (upType = 'image'),
+                    (upTypeSta='videoBac')
+                "
+              >
+                {{ $i18n.t(`edit_settings.select_image`) }}
+              </button>
+              <div
+                class="ui-remark"
+                v-html="$i18n.t(`edit_settings.coverUpTit3`)"
+              ></div>
+            </div>
+          </div>
+        </div>
+      </div>
     </div>
     <div class="dialog" style="z-index: 2000" v-if="isShowSelectionWindow">
       <MaterialSelectorForEditor
@@ -169,7 +334,8 @@
         :isMultiSelection="false"
         @cancle="isShowSelectionWindow = false"
         @submit="handleSubmitFromMaterialSelector"
-        :selectableType="['image']"
+        :selectableType="[upType]"
+        :initialMaterialType="upType"
       />
     </div>
   </div>
@@ -199,6 +365,9 @@ export default {
       coverImgLoc1: i18n.t("edit_settings.coverImgLoc1"),
       coverImgLoc2: i18n.t("edit_settings.coverImgLoc2"),
 
+      upType: "",
+      upTypeSta:'',
+
       selecList: [
         {
           txt: i18n.t("edit_settings.coverSelecVideoAndImg"),
@@ -210,9 +379,9 @@ export default {
       // 封面类型下拉框数据
       SelectValue: "videoAndImg",
       // 图片pc端位置
-      imgLoc1: "centen",
+      coverPcLoc: "centen",
       // 图片移动端位置
-      imgLoc2: "centen",
+      coverMoLoc: "centen",
       // 图片的背景设置
       coverImgBac: "colorFill",
       coverImgBacList: [
@@ -233,6 +402,15 @@ export default {
 
       isShowSelectionWindow: false,
       selectingFor: "", // 'pc', 'mobile'
+
+      // 有关上传视频
+      // 视频pc端位置
+      videoPcLoc: "centen",
+      // 视频移动端位置
+      videoMoLoc: "centen",
+      // 视频的背景设置
+      coverVideoBac: "colorFill",
+      videoColorSelec: "#c71585",
     };
   },
   computed: {
@@ -244,15 +422,24 @@ export default {
     SelectValue(val) {
       this.info.coverSelect = val;
     },
-    imgLoc1(val) {
+    coverPcLoc(val) {
       this.info.coverPcLoc = val;
     },
-    imgLoc2(val) {
+    coverMoLoc(val) {
       this.info.coverMoLoc = val;
     },
     coverImgBac(val) {
       this.info.coverImgBac = val;
     },
+    coverVideoBac(val) {
+      this.info.coverVideoBac = val;
+    },
+    videoPcLoc(val) {
+      this.info.videoPcLoc = val;
+    },
+    videoMoLoc(val) {
+      this.info.videoMoLoc = val;
+    },
   },
   methods: {
     // 图片的颜色选择器改变事件
@@ -260,13 +447,23 @@ export default {
       this.imgColorSelec = val;
       this.info.imgColorSelec = val;
     },
+    videoColorSelecChange(val) {
+      this.videoColorSelec = val;
+      this.info.videoColorSelec = val;
+    },
     handleSubmitFromMaterialSelector(selected) {
-      if (this.selectingFor === "pc") {
-        this.info.coverPc = selected[0].icon;
-      } else if (this.selectingFor === "mobile") {
-        this.info.coverMo = selected[0].icon;
+      // 点击确定的时候是选择的图片上传
+      if (this.upTypeSta === "imgBac") {
+        if (this.selectingFor === "pc") this.info.coverPc = selected[0].icon;
+        else if (this.selectingFor === "mobile")
+          this.info.coverMo = selected[0].icon;
+        else this.info.coverBac = selected[0].icon;
       } else {
-        this.info.coverBac = selected[0].icon;
+        // 视频上传
+        if (this.selectingFor === "pc") this.info.videoPc = selected[0].icon;
+        else if (this.selectingFor === "mobile")
+          this.info.videoMo = selected[0].icon;
+        else this.info.videoBacImg = selected[0].icon;
       }
       this.isShowSelectionWindow = false;
     },
@@ -279,14 +476,27 @@ export default {
     onCancelBac() {
       this.info.coverBac = "";
     },
+    // 关于视频
+    clearVideoPc() {
+      this.info.videoPc = "";
+    },
+    claerVideoMo() {
+      this.info.videoMo = "";
+    },
+    onCancelBac2() {
+      this.info.videoBacImg = "";
+    },
   },
   created() {},
   mounted() {
     if (this.info.coverSelect) this.SelectValue = this.info.coverSelect;
-    if (this.info.coverPcLoc) this.imgLoc1 = this.info.coverPcLoc;
-    if (this.info.coverMoLoc) this.imgLoc2 = this.info.coverMoLoc;
+    if (this.info.coverPcLoc) this.coverPcLoc = this.info.coverPcLoc;
+    if (this.info.coverMoLoc) this.coverMoLoc = this.info.coverMoLoc;
     if (this.info.coverImgBac) this.coverImgBac = this.info.coverImgBac;
     if (this.info.imgColorSelec) this.imgColorSelec = this.info.imgColorSelec;
+    if (this.info.videoPcLoc) this.videoPcLoc = this.info.videoPcLoc;
+    if (this.info.videoMoLoc) this.videoMoLoc = this.info.videoMoLoc;
+    if (this.info.coverVideoBac) this.coverVideoBac = this.info.coverVideoBac;
   },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前

+ 2 - 1
packages/qjkankan-kankan-view/src/locales/en.json

@@ -57,7 +57,8 @@
     "pano": "Walk<br />Click to move",
     "rotate": "Roam<br />Swipe the screen to roam the screen to roam",
     "zoom": "Zoom<br />Zoom in or out",
-    "set": "Got it"
+    "set": "Got it",
+    "no_scene": "The scene is not found"
   },
   "code": "System is busy, please try again later."
 }

+ 2 - 1
packages/qjkankan-kankan-view/src/locales/zh.json

@@ -58,6 +58,7 @@
     "pano": "行走<br />点击任意方向移动",
     "rotate": "旋转视角<br />左右滑动屏幕,旋转视觉",
     "zoom": "缩放<br />双指滑动放大或缩小视图",
-    "set": "我知道了"
+    "set": "我知道了",
+    "no_scene":"场景不存在"
   }
 }

+ 4 - 1
packages/qjkankan-kankan-view/src/pages/SMG.vue

@@ -246,7 +246,10 @@ onMounted(() => {
         window.location.replace(`/5034.html?m=` + browser.getURLParam("m"));
         break;
       case 5005:
-        window.location.replace(`/mobile.html#/404`);
+        Dialog.toast({
+            content: t('guide.no_scene'),
+            type: 'error',
+        })
         break;
     }
   });

+ 5 - 1
packages/qjkankan-kankan-view/src/pages/SPG.vue

@@ -26,6 +26,7 @@ import Password from '@/components/shared/Password.vue'
 import LoadingLogo from '@/components/shared/Loading.vue'
 import { createApp } from '@/app'
 import { listenMessage } from '@/utils/messageHandler'
+import {Dialog} from '@/global_components'
 
 
 import { ref, onMounted, computed } from 'vue'
@@ -97,7 +98,10 @@ onMounted(() => {
                 window.location.replace(`/5034.html?m=` + browser.getURLParam('m'))
                 break
             case 5005:
-                // window.location.replace(`/#/404`)
+                Dialog.toast({
+                    content: t('guide.no_scene'),
+                    type: 'error',
+                })
                 break
         }
     })

+ 2 - 1
packages/qjkankan-kankan-view/src/pages/smg.js

@@ -10,7 +10,8 @@ import SMG from "./SMG.vue";
 import Checkbrowser from '../components/shared/Checkbrowser.vue'
 import i18n, { getLocale, setI18nLanguage, loadLocaleMessages } from '../i18n'
 let App
-if (browser.detectChrome() || browser.detectSafari() || browser.detectFirefox() || browser.detectEdge() || browser.detectWeixin() || browser.detectWeixinMiniProgram() || browser.detectAlipay()) {
+if (browser.detectChrome() || browser.detectSafari() || browser.detectFirefox() || browser.detectEdge() || browser.detectWeixin() || browser.detectWeixinMiniProgram() || browser.detectAlipay()
+  || browser.detectTT()) {
   App = SMG
 } else {
   App = Checkbrowser

+ 3 - 1
packages/qjkankan-kankan-view/src/pages/spg.js

@@ -11,7 +11,9 @@ import Checkbrowser from '../components/shared/Checkbrowser.vue'
 import i18n, { getLocale, setI18nLanguage, loadLocaleMessages } from '../i18n'
 import { IsApp } from '@/utils/platform'
 let App
-if (browser.detectChrome() || browser.detectSafari() || browser.detectFirefox() || browser.detectEdge() || browser.detectWeixin() || browser.detectWeixinMiniProgram() || browser.detectAlipay()) {
+if (browser.detectChrome() || browser.detectSafari() || browser.detectFirefox() || browser.detectEdge() || browser.detectWeixin() || browser.detectWeixinMiniProgram() || browser.detectAlipay()
+    || browser.detectTT()
+) {
     App = Spg
 } else {
     if (IsApp) {

+ 13 - 0
packages/qjkankan-kankan-view/src/utils/browser.js

@@ -318,6 +318,19 @@ var browser = {
   detectApp: function () {
     return this.urlHasValue("isMiniApp");
   },
+
+  detectAlipay: function () {
+      //阿里系
+      return window.navigator.userAgent.toLowerCase().match(/Alipay/i) == 'alipay'
+  },
+
+  detectTT: function () {
+      //字节跳动 
+      return window.navigator.userAgent
+          .toLowerCase()
+          .includes("toutiaomicroapp");
+  },
+
   /**
    * 判断标签页是否切换状态
    */

+ 20 - 3
packages/qjkankan-view/src/components/Fdkk/index.vue

@@ -14,7 +14,8 @@
 
 
     <iframe allowfullscreen="true" allow="autoplay" :key="currentScene.sceneCode" v-else id="fdkkifr"
-      :src="`${isMobile ? 'smg' : 'spg'}.html?m=${currentScene.sceneCode}&lang=${lang}`" frameborder="0"></iframe>
+      :src="`${isMobile ? 'smg' : 'spg'}.html?m=${currentScene.sceneCode}&lang=${lang}`"
+      frameborder="0"></iframe>
     <!-- :src="`http://192.168.20.66:8080/${isMobile ? 'smg' : 'spg'}.html?m=${currentScene.sceneCode}`" -->
 
 
@@ -88,15 +89,31 @@ const handleMessage = (res) => {
       store.commit('fdkk/setFdkkBGM', params.music)
       if (params.music) {
         // console.log(useMusicPlayer.player,'useMusicPlayer.player');
-        useMusicPlayer.player.watchPlay(true)
         if (isMobile.value) {
+          useMusicPlayer.player.watchPlay()
           if (useMusicPlayer.player.isPlay) {
             setTimeout(() => {
               musicPlayer.play()
             }, 50);
           }
+        } else {
+          useMusicPlayer.player.watchPlay(true)
+        }
+      }
+      //如果无场景音乐,则重置为作品本身音乐
+      else {
+        if (store.getters['scene/musicURL']) {
+          if (isMobile.value) {
+            useMusicPlayer.player.watchPlay()
+            if (useMusicPlayer.player.isPlay) {
+              setTimeout(() => {
+                musicPlayer.play()
+              }, 50);
+            }
+          } else {
+            useMusicPlayer.player.watchPlay(true)
+          }
         }
-
       }
 
       // loading完毕

+ 9 - 2
packages/qjkankan-view/src/components/Pano/index.vue

@@ -58,10 +58,12 @@ watch(currentScene, (newVal, oldVal) => {
   if (newVal.type == 'pano') {
 
     //如果当前背景音乐是v4则重置
+    console.log(store.getters['fdkk/fdkkBGM'])
     if (store.getters['fdkk/fdkkBGM']) {
       store.commit('fdkk/setFdkkBGM', '')
       useMusicPlayer.player.watchPlay(true)
       if (isMobile.value) {
+        console.log(useMusicPlayer.player.isPlay,'useMusicPlayer.player.isPlay');
           if (useMusicPlayer.player.isPlay) {
             setTimeout(() => {
               musicPlayer.play()
@@ -72,7 +74,7 @@ watch(currentScene, (newVal, oldVal) => {
 
     nextTick(() => {
       loadScene(newVal);
-      console.log(currentPlaying.value);
+      console.log(newVal,'newVal');
     });
   } else {
  
@@ -80,6 +82,8 @@ watch(currentScene, (newVal, oldVal) => {
       hadGetInfo.value = true
       if (data.data.isUpgrade != void 0) {
         store.commit("scene/setFdkkCurrentVersion", data.data.isUpgrade !== 0 ? 'v4' : 'v3');
+
+        // v3
         if (data.data.isUpgrade === 0) {
           
           musicPlayer.pauseFromOther = true
@@ -97,8 +101,11 @@ watch(currentScene, (newVal, oldVal) => {
         }
       }
 
+      // else{
+      //   useMusicPlayer.player.watchPlay(true)
+      // }
 
-      // //上一个场景如果是四维看看场景且当前场景是v4 
+      //上一个场景如果是四维看看场景且当前场景是v4 
       // if (oldVal.type == '4dkk' && data.data.isUpgrade !== 0) {
       //   store.commit('fdkk/setFdkkBGM', '')
       //   musicPlayer.pause()

+ 2 - 1
packages/qjkankan-view/src/pages/show.js

@@ -21,7 +21,8 @@ if (
   browser.detectEdge() ||
   browser.detectWeixin() ||
   browser.detectWeixinMiniProgram() ||
-  browser.detectAlipay()
+  browser.detectAlipay() || 
+  browser.detectTT()
 ) {
   App = Show;
 } else {

+ 2 - 1
packages/qjkankan-view/src/pages/showMobile.js

@@ -19,7 +19,8 @@ if (
   browser.detectEdge() ||
   browser.detectWeixin() ||
   browser.detectWeixinMiniProgram() ||
-  browser.detectAlipay()
+  browser.detectAlipay() ||
+  browser.detectTT()
 ) {
   App = ShowMobile;
 } else {

+ 11 - 3
packages/qjkankan-view/src/utils/browser.js

@@ -103,6 +103,9 @@ var browser = {
             t = e.indexOf('MSIE ')
         return t !== -1 || !!navigator.userAgent.match(/Trident.*rv\:11\./)
     },
+    detectEdge: function () {
+        return window.navigator.userAgent.indexOf("Edge") > -1;
+    },
     detectSafari: function () {
         var e = window.navigator.userAgent,
             t = e.indexOf('Safari')
@@ -319,12 +322,17 @@ var browser = {
         return window.navigator.userAgent.match('miniProgram')
     },
     detectAlipay: function () {
-        //微信 包括PC的微信
+        //阿里系
         return window.navigator.userAgent.toLowerCase().match(/Alipay/i) == 'alipay'
     },
-    detectEdge: function () {
-        return window.navigator.userAgent.indexOf('Edge') > -1
+
+    detectTT: function () {
+        //字节跳动 
+        return window.navigator.userAgent
+            .toLowerCase()
+            .includes("toutiaomicroapp");
     },
+
     detectApp: function () {
         return this.urlHasValue('app')
     },

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

@@ -15,12 +15,14 @@ let CLICKFIRST = false
 
 const retryPlay = player => {
     function onclick() {
-        if (player.pauseFromOther&&!CLICKFIRST) {
+        $player.removeEventListener('click', onclick)
+        $player.removeEventListener('touchstart', onclick)
+
+        //判断是否第一次进入或者是否已点击过
+        if (player.pauseFromOther||CLICKFIRST) {
             return
         }
         CLICKFIRST = true
-        $player.removeEventListener('click', onclick)
-        $player.removeEventListener('touchstart', onclick)
         player.sound.play()
     }
     const $player = document.querySelector('.ui-view-layout')
@@ -169,13 +171,13 @@ class MusicPlayer extends AudioPlayer {
                     html5: false,
                 })
                     .then(() => {
-                        if (browser.detectWeixin()) {
-                            if (typeof parent.WeixinJSBridge !== 'undefined') {
-                                ready()
-                            } else {
-                                parent.document.addEventListener('WeixinJSBridgeReady', ready)
-                            }
-                        } else {
+                        // if (browser.detectWeixin()) {
+                        //     if (typeof parent.WeixinJSBridge !== 'undefined') {
+                        //         ready()
+                        //     } else {
+                        //         parent.document.addEventListener('WeixinJSBridgeReady', ready)
+                        //     }
+                        // } else {
                             if (autoplay) {
                                 setTimeout(() => {
                                     this.play()
@@ -185,7 +187,7 @@ class MusicPlayer extends AudioPlayer {
                                 retryPlay(this)
                             }
                             // ready()
-                        }
+                        // }
 
                     })
                     .catch(err => {

+ 1 - 0
packages/qjkankan-view/vue.config.js

@@ -5,6 +5,7 @@ module.exports = defineConfig({
   transpileDependencies: true,
   lintOnSave: false,
   assetsDir: "showviewer",
+  productionSourceMap: false,
   publicPath: "./",
   pages: {
     show: "src/pages/show.js",