瀏覽代碼

feat: test

gemercheung 1 年之前
父節點
當前提交
7050347c2f

+ 4 - 1
packages/qjkankan-editor/src/lang/weblate/en.json

@@ -547,7 +547,10 @@
             "continue_edit": "Continue to edit",
             "had_created_but_no_link": "New project has been created successfully, but refreshing the project list failed; please try again later.",
             "delete_work": "Delete project",
-            "comfirm_delete": "Confirm to delete the project?"
+            "comfirm_delete": "Confirm to delete the project?",
+            "cam_gen": "Online production",
+            "online_gen": "Camera generation",
+            "calcing": "Calculating"
         },
         "components": {
             "prev": "Previous",

+ 1 - 0
packages/qjkankan-editor/src/lang/weblate/zh.json

@@ -534,6 +534,7 @@
             "share": "分享",
             "delete": "删除",
             "no_works": "您还没有作品,请先创建作品~",
+            "no_works_cam": "您还没有相机拍摄生成的作品,快去拍摄吧~",
             "work_link": "作品链接",
             "work_qrCode": "作品二维码",
             "download_qrCode": "下载二维码",

+ 1 - 1
packages/qjkankan-editor/src/views/material/works/cam.vue

@@ -214,7 +214,7 @@ export default {
       edittips: i18n.t("material.works.edit"),
       share: i18n.t("material.works.share"),
       deltips: i18n.t("material.works.delete"),
-      no_works: i18n.t("material.works.no_works"),
+      no_works: i18n.t("material.works.no_works_cam"),
       no_title: i18n.t("gather.no_title"),
       no_search_result: i18n.t("gather.no_search_result"),
       select_material: i18n.t("gather.select_material"),

+ 9 - 3
packages/qjkankan-view/src/hooks/useAudio.js

@@ -50,6 +50,7 @@ async function initDefaultAudio() {
     [currentAudio, currentScene],
     ([val, ns], [_, os]) => {
       const oldValue = currentAudioTemp.value;
+      const isSwitch = os && ns.sceneCode !== os.sceneCode;
       const newValue = unref(val).url;
       const isSame = newValue === oldValue;
       console.log("audio-isSame", isSame);
@@ -64,7 +65,7 @@ async function initDefaultAudio() {
             currentAudioTemp.value = newValue;
           } else {
             //相同URL的再次播放
-            const isSwitch = ns.sceneCode !== os.sceneCode;
+
             if (unref(currentPlayer).isPlaying) {
               console.log("相同URL切换时在播放", isSwitch);
               unref(currentPlayer).resume();
@@ -77,8 +78,13 @@ async function initDefaultAudio() {
           }
         }
       } else {
-        console.log("为空暂时");
-        unref(currentPlayer) && unref(currentPlayer).stop();
+        console.log("为空暂时", isSwitch);
+        if (unref(currentPlayer)) {
+          unref(currentPlayer).stop();
+        }
+        if (isSwitch) {
+          currentPlayer.value = null;
+        }
       }
     },
     {

+ 1 - 0
packages/qjkankan-view/src/store/modules/audio.js

@@ -191,6 +191,7 @@ export default {
     resumeBGM() {
       const { currentPlayer } = useAudio();
       if (unref(currentPlayer)) {
+        console.log("resumeBGM", currentPlayer.value);
         currentPlayer.value.resume();
       }
     },