From de5761f200ac407f8d81d1ba5c8d7817d7a8f1db Mon Sep 17 00:00:00 2001 From: anlworke <978080633@qq.com> Date: Thu, 12 Oct 2023 17:32:45 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E9=AB=98?= =?UTF-8?q?=E5=BE=B7=E5=9C=B0=E5=9B=BEkey=E5=8F=8A=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E5=AF=86=E9=92=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thinglinks-ui/src/main.js | 7 +- .../src/views/link/device/mapView.vue | 231 +++++++++++------- 2 files changed, 142 insertions(+), 96 deletions(-) diff --git a/thinglinks-ui/src/main.js b/thinglinks-ui/src/main.js index a7f6c9e6..281e02c8 100644 --- a/thinglinks-ui/src/main.js +++ b/thinglinks-ui/src/main.js @@ -51,10 +51,11 @@ import DictData from '@/components/DictData' // 引入百度地图 import BaiduMap from 'vue-baidu-map' + // 引入高德 import AmapVue from '@amap/amap-vue'; AmapVue.config.version = '2.0'; // 默认2.0,这里可以不修改 -AmapVue.config.key = 'e13456422e8fe93451cf2201f4db84bd'; //服务平台选择 Web端(JS API) +AmapVue.config.key = 'a7875e62299794a32054f208842e0c34'; //服务平台选择 Web端(JS API) AmapVue.config.plugins = [ 'AMap.moveAnimation', 'AMap.Geocoder', @@ -62,6 +63,10 @@ AmapVue.config.plugins = [ 'AMap.PlaceSearch', // 在此配置你需要预加载的插件,如果不配置,在使用到的时候会自动异步加载 ]; +// 新版本的Web端开发者安全密钥 +window._AMapSecurityConfig = { + securityJsCode: "51346fc6439b2d535eff510407d3a5bb", +}; Vue.use(AmapVue); // 全局方法挂载 diff --git a/thinglinks-ui/src/views/link/device/mapView.vue b/thinglinks-ui/src/views/link/device/mapView.vue index 27ec2d9f..061ddd17 100644 --- a/thinglinks-ui/src/views/link/device/mapView.vue +++ b/thinglinks-ui/src/views/link/device/mapView.vue @@ -2,42 +2,76 @@
- + - - + + - + - + - + - + - + - - + + {{ item.name }} {{ - item.district + item.district }} @@ -46,11 +80,11 @@ - -
+ +
- + @@ -69,8 +103,9 @@