吉安感知网项目-前端
chenyao
2026-03-02 534ef3f5e1104cb8f2d835c82c4788cf31d993d8
applications/mobile-web-view/src/appPages/AirMap/searchBar.vue
@@ -93,7 +93,7 @@
// 使用新接口搜索地址
const searchWithNewAPI = () => {
   // 获取微信小程序带过来的头部参数
   console.log(route.query, '9999')
   // console.log(route.query, '9999')
   // 构建请求参数,搜索框为空时不传递airspaceName
   const params = {
      current: 1,
@@ -166,6 +166,15 @@
   getAddressList()
}
// 获取点击的空域区域
const getClickAirspace = () => {
   EventBus.on('mapClickAirspace', item => {
      searchVal.value = item.taskName
      height.value = 150
      searchWithNewAPI()
   })
}
const flyToAddress = item => {
   // if (!item.location) {
   //    showToast('当前地址无坐标信息')
@@ -193,6 +202,7 @@
watch(
   () => route.query,
   (newValue, oldValue) => {
      console.log(newValue, oldValue, '111111')
      if (newValue.updateKey) {
         height.value = anchors[0]
      }
@@ -211,6 +221,10 @@
      }
   }
   getAddressList()
   getClickAirspace()
})
onUnmounted(() => {
   EventBus.off('mapClickAirspace')
})
</script>