bill hace 8 meses
padre
commit
2cc50980cb
Se han modificado 3 ficheros con 6 adiciones y 2 borrados
  1. 1 1
      src/components/path/sign.vue
  2. 2 1
      src/store/scene.ts
  3. 3 0
      src/views/guide/path/edit-path.vue

+ 1 - 1
src/components/path/sign.vue

@@ -63,7 +63,7 @@ let changPointsTimeout: any;
 path.bus.on("changePoints", (points) => {
   clearTimeout(changPointsTimeout);
   currentPoints = points.map((p, ndx) => ({
-    name: p.name || `标记点${ndx + 1}`,
+    name: props.path.points[ndx].name || `标记点${ndx + 1}`,
     position: { ...p.position },
     modelId: p.modelId,
   }));

+ 2 - 1
src/store/scene.ts

@@ -36,6 +36,7 @@ export const SceneTypePaths: { [key in SceneType]: string[] } = {
 };
 
 export const getSWKKSyncLink = async (scene: Scene) => {
+  console.log('scene', scene)
   const supportTypes = [SceneType.SWKJ, SceneType.SWSSMX, SceneType.SWYDMX];
   const kkScenes = scenes.value.filter((scene) =>
     supportTypes.includes(scene.type)
@@ -65,7 +66,7 @@ export const getSWKKSyncLink = async (scene: Scene) => {
     avatar: './favicon.ico',
     redirect: encodeURIComponent(location.href),
     name: userInfo.userName,
-    m: scene.num,
+    m: scene.raw.num,
   };
   for (const [name, val] of Object.entries(params)) {
     url.searchParams.append(name, val || "");

+ 3 - 0
src/views/guide/path/edit-path.vue

@@ -219,11 +219,14 @@ watchEffect((onCleanup) => {
   const $node = node.value;
   const handler = (ndx: number) => {
     activePointNdx.value = ndx;
+    console.error("change ndx", ndx);
   };
   $node.changeEditMode(true);
   $node.bus.on("activePoint", handler);
 
+  console.log("监听");
   onCleanup(() => {
+    console.log("取消监听");
     $node.bus.off("activePoint", handler);
     $node.changeEditMode(false);
   });