From 2701c590e5aa4893028feae77fcdc558b89ac22e Mon Sep 17 00:00:00 2001 From: DIAMOND <276397553@qq.com> Date: Mon, 25 Dec 2023 16:35:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/earthMap/edit/EarthComp.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/views/earthMap/edit/EarthComp.vue b/src/views/earthMap/edit/EarthComp.vue index 61558a5..d1f47be 100644 --- a/src/views/earthMap/edit/EarthComp.vue +++ b/src/views/earthMap/edit/EarthComp.vue @@ -825,7 +825,7 @@ }); } - //飞入方法 20231222 + //飞入方法 async fly(){ let position, rotation, viewDistance, duration; const sceneId = this.userStore.userInfo?.sceneId; @@ -839,12 +839,12 @@ order: 'asc', } }, { isTransformResponse: false }).then((response) => { - console.log("newfly",response); + console.log("fly",response); // 设置岛屿信息为数组 this.sceneInfo = response.result.records; return response.result.records; }).then((res)=>{ - //飞入 + //飞入 所属场景下的位置 position = [res[0].cameraLon, res[0].cameraLat, res[0].cameraAltitude]; rotation = [res[0].rotationX, res[0].rotationY, res[0].rotationZ]; viewDistance = res[0].viewDistance; @@ -858,7 +858,6 @@ } - setLoginPoint(data) { let position = [data.lon, data.lat, 0]; let rotation = [data.rotationX, data.rotationY, data.rotationZ]; @@ -896,7 +895,6 @@ }; } - //设置按钮颜色状态 setIconByRef(ref, el) { const status = this.statusByNodeId.get(ref); @@ -920,6 +918,7 @@ img.setAttribute('style', 'width:16px;height:16px;margin-top:7px'); } } + /* 使用async/await 处理异步方法顺序执行。成功的操作放到try里,失败的放在catch里 */ async createBBHLine(earthUI= null) { console.log("MyScene",this.userStore.userInfo?.sceneId);