bill 1 tháng trước cách đây
mục cha
commit
c3a1290990

+ 2 - 2
src/store/sync.ts

@@ -136,8 +136,8 @@ export const api = !global.android
       async reshoot(pos: Pos3D) {
       async reshoot(pos: Pos3D) {
         console.log("reshoot参数:");
         console.log("reshoot参数:");
         console.log(JSON.stringify(pos));
         console.log(JSON.stringify(pos));
-        await asyncTimeout(5000);
-        return "";
+        await asyncTimeout(1000);
+        return { position: pos, image: "/images/1761892155839_0_pano_0.jpg" };
       },
       },
       async delPano() {},
       async delPano() {},
     }
     }

+ 8 - 1
src/views/scene/covers/reshoot.vue

@@ -18,7 +18,7 @@
 import { computed } from 'vue';
 import { computed } from 'vue';
 import FixPoint from './fixPoint.vue';
 import FixPoint from './fixPoint.vue';
 import url from './icon/scene_pin.png'
 import url from './icon/scene_pin.png'
-import { customMap, genUseLoading, reshootPointStack } from '@/hook';
+import { customMap, genUseLoading, reshootPointStack, useSDK } from '@/hook';
 import { type FixPoint as FixPointT } from '@/store/fixPoint';
 import { type FixPoint as FixPointT } from '@/store/fixPoint';
 import Confirm from '@/views/graphic/confirm.vue';
 import Confirm from '@/views/graphic/confirm.vue';
 import { reshoot } from '@/store/sync';
 import { reshoot } from '@/store/sync';
@@ -45,11 +45,18 @@ const okHandler = genUseLoading(async () => {
     Message.error({ msg: "请选择补拍点位置", time: 2000 });
     Message.error({ msg: "请选择补拍点位置", time: 2000 });
   }
   }
   const data = await reshoot(reshootPointStack.current.value.value.pos)
   const data = await reshoot(reshootPointStack.current.value.value.pos)
+  if (data) {
+    useSDK().reshoot(data)
+  } else {
+    // Message.error({ msg: "拍摄失败", time: 2000 });
+    return;
+  }
   cancelHandler()
   cancelHandler()
 })
 })
 
 
 const cancelHandler = () => {
 const cancelHandler = () => {
   reshootPointStack.current.value.value = undefined
   reshootPointStack.current.value.value = undefined
   customMap.mode = Mode.pano;
   customMap.mode = Mode.pano;
+  console.log('变成 pano')
 }
 }
 </script>
 </script>

+ 5 - 0
src/views/scene/menus/menus.ts

@@ -199,6 +199,11 @@ export const pubMenus: MenuRaw[] = [
       },
       },
     ],
     ],
   },
   },
+  {
+    icon: "scene_a",
+    text: "全景",
+    key: menuEnum.ADD_RESHOOT,
+  },
 ];
 ];
 
 
 export const reshootMenus: MenuRaw[] = [
 export const reshootMenus: MenuRaw[] = [

+ 5 - 4
src/views/scene/mode.vue

@@ -44,13 +44,14 @@ const menus = computed(() =>
       } else {
       } else {
         customMap.mode = Mode.pano;
         customMap.mode = Mode.pano;
       }
       }
-      if (params.temp) {
-        console.log("reshoot", customMap.mode === Mode.pano);
-        emit("reshoot", customMap.mode === Mode.pano);
-      }
     },
     },
   }))
   }))
 );
 );
+watchEffect(() => {
+  if (params.temp) {
+    emit("reshoot", customMap.mode === Mode.pano);
+  }
+});
 
 
 if (!params.temp) {
 if (!params.temp) {
   customMap.mode = Number(localStorage.getItem(key)) || Mode.pano;
   customMap.mode = Number(localStorage.getItem(key)) || Mode.pano;