Преглед изворни кода

三维场景相关接口命名优化;编辑器-导航-三维场景iframe url拼接优化。

任一存 пре 2 година
родитељ
комит
c8f63901b5

+ 3 - 3
packages/qjkankan-editor/src/api/index.js

@@ -120,7 +120,7 @@ export function getPanoInfo(data, ok, no) {
 /**
  * 获取三维场景列表(不应使用其搜索功能,因为无法全局搜索,而且无论搜的是什么词,指定文件夹中所有子文件夹都会被返回。
  */
-export function getSceneList(data, ok) {
+export function get3DSceneList(data, ok) {
   const {
     pathLevel2Id,
     folderId,
@@ -185,10 +185,10 @@ export function getSceneList(data, ok) {
 }
 
 /**
- * 获取三维场景列表(使用关键词搜索功能)
+ * 获取三维场景列表(使用关键词搜索功能,分别搜索看看和看见,两个结果合并后返回
  */
 
- export function searchInAllScenes(data, ok) {
+ export function searchInAll3DScenes(data, ok) {
   const {
     searchKey,
   } = data

+ 4 - 4
packages/qjkankan-editor/src/components/materialListInMaterialSelector.vue

@@ -303,8 +303,8 @@
 <script>
 import {
   getMaterialList,
-  getSceneList,
-  searchInAllScenes,
+  get3DSceneList,
+  searchInAll3DScenes,
   uploadMaterial,
   checkUserSize,
 } from "@/api";
@@ -541,7 +541,7 @@ export default {
       let params = null
       if (this.materialType === '3D') {
         if (!this.searchKey) {
-          getListFn = getSceneList
+          getListFn = get3DSceneList
           params = {
             pathLevel2Id: this.folderPath[1]?.id,
             folderId: this.currentFolderId,
@@ -550,7 +550,7 @@ export default {
             searchKey: this.searchKey,
           }
         } else {
-          getListFn = searchInAllScenes
+          getListFn = searchInAll3DScenes
           params = {
             searchKey: this.searchKey
           }

+ 9 - 2
packages/qjkankan-editor/src/framework/play/pano/index.vue

@@ -6,7 +6,7 @@
       id="iframe-4dkk"
       width=""
       v-if="currentScene.type === '4dkk'"
-      :src="`https://test.4dkankan.com/sp${currentScene.version === 'V3' ? 'c' : currentScene.version === 'V4' ? 'g' : 'c'}.html?m=${currentScene.sceneCode}&lang=${lang}`"
+      :src="`${locationOrigin}/sp${currentScene.version === 'V3' ? 'c' : currentScene.version === 'V4' ? 'g' : 'c'}.html?m=${currentScene.sceneCode}&lang=${lang}`"
       frameborder="0"
     />
 
@@ -29,7 +29,10 @@ import { mapGetters } from "vuex";
 import * as krfn from "@/core/index.js";
 import { $waiting } from "@/components/shared/loading";
 import Snapshot from "@/components/Snapshot";
-import { uploadCover } from "@/api";
+import {
+  uploadCover,
+  searchInAll3DScenes,
+} from "@/api";
 import config from '@/config'
 
 let __krfn = krfn.default;
@@ -41,6 +44,7 @@ export default {
       showFlash: false,
       inter: null,
       lang: config.lang || 'zh',
+      locationOrigin: process.env.VUE_APP_PROXY_URL_ROOT,
     }
   },
   computed: {
@@ -69,6 +73,9 @@ export default {
       }
       if (newVal.type == '4dkk') {
         $("#pano").empty();
+        if (!newVal.version) { // v1.3之前在作品中新增的三维场景,没有version这个值,需要查询。
+          
+        }
         return
       } else {
         $("#pano").empty();