Explorar o código

feat: 增加相机作品

gemercheung hai 1 ano
pai
achega
1e4bb662c8

+ 12 - 2
packages/qjkankan-editor/src/framework/EditorHead.vue

@@ -1,8 +1,13 @@
 <template>
   <header class="app-head" app-border dir-bottom>
-    <a class="app-head-back" :href="`./material.html?lang=${$lang}#/works`">
+    <a
+      class="app-head-back"
+      :href="`./material.html?lang=${$lang}#/${
+        routerForm === 'works' ? 'works' : 'camList'
+      }`"
+    >
       <i class="iconfont icon-editor_return"></i>
-      {{ back_myworks }}
+      {{ routerForm === "works" ? back_myworks : "返回相机作品" }}
     </a>
     <span class="app-head-title">{{ info.name }}</span>
     <div
@@ -39,6 +44,7 @@ import { mapGetters } from "vuex";
 import preview from "@/components/preview";
 import { i18n } from "@/lang";
 import { $waiting } from "@/components/shared/loading";
+import browser from "@/utils/browser";
 
 let hhhreg = /\\\\\\\\/g;
 
@@ -78,6 +84,10 @@ export default {
       currentScene: "scene/currentScene",
       isEditing: "isEditing",
     }),
+    routerForm() {
+      const from = browser.urlQueryValue("from");
+      return from;
+    },
   },
   methods: {
     checkParams() {

+ 3 - 2
packages/qjkankan-editor/src/views/material/camList/index.vue

@@ -310,7 +310,7 @@ export default {
               } else {
                 newScene = Object.assign(newScene, {
                   customMask: this.info.scenes[0].customMask,
-                  initVisual: this.info.scenes[0].initVisual
+                  initVisual: this.info.scenes[0].initVisual,
                 });
                 newScene.customMask.sky.isShow = true;
                 this.info.scenes.push(newScene);
@@ -404,7 +404,8 @@ export default {
       );
     },
     edit(item) {
-      window.open(`./edit.html?id=${item.id}&lang=${this.$lang}`);
+      const from = this.$route.name;
+      window.open(`./edit.html?id=${item.id}&lang=${this.$lang}&from=${from}`);
     },
     del(item, index) {
       this.$confirm({

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

@@ -404,8 +404,10 @@ export default {
       );
     },
     edit(item) {
-      window.open(`./edit.html?id=${item.id}&lang=${this.$lang}`);
+      const from = this.$route.name;
+      window.open(`./edit.html?id=${item.id}&lang=${this.$lang}&from=${from}`);
     },
+   
     del(item, index) {
       this.$confirm({
         title: this.$i18n.t("material.works.delete_work"),