Commit 78353695 by 前端

v1.23.0版本需求

1 parent 3b909ae8
// 图片请求域名前缀
export const IMAGE_PREFIX = 'https://img01.glsx.com.cn/weapp/resource';
export const MAP_KEY = '75116f653f3b2e4568116dad8cd9b899' export const MAP_KEY = '75116f653f3b2e4568116dad8cd9b899'
export const MAP_SERVICE_KEY = 'd22348363c34c266f772ae9b635eef2a' export const MAP_SERVICE_KEY = 'd22348363c34c266f772ae9b635eef2a'
...@@ -23,3 +26,8 @@ export const CONSTANT = { ...@@ -23,3 +26,8 @@ export const CONSTANT = {
MAP_SERVICE_KEY, MAP_SERVICE_KEY,
MAP_PLUGINS, MAP_PLUGINS,
} }
// 静态图标地址
export const STATICIMAGE = {
POI_MARKER:`${IMAGE_PREFIX}/e-shield/poi_icon.gif`
}
\ No newline at end of file \ No newline at end of file
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<script> <script>
import mapService from "@/utils/mapService.js"; import mapService from "@/utils/mapService.js";
import "@/utils/mapEvent.js"; import "@/utils/mapEvent.js";
import { CONSTANT } from "@/constant"; import { CONSTANT, STATICIMAGE } from "@/constant";
import FenceMapControll from "./FenceMapControll"; import FenceMapControll from "./FenceMapControll";
import EventBus from "@/event-bus"; import EventBus from "@/event-bus";
import { showToast, deepClone, showModal } from "@/utils/utils.js"; import { showToast, deepClone, showModal } from "@/utils/utils.js";
...@@ -158,6 +158,7 @@ export default { ...@@ -158,6 +158,7 @@ export default {
}; };
}, },
mounted() { mounted() {
console.log(STATICIMAGE);
this.initMap(); this.initMap();
EventBus.$on("uiMap.poi.marker.delete", this.removePoi); EventBus.$on("uiMap.poi.marker.delete", this.removePoi);
}, },
...@@ -213,7 +214,7 @@ export default { ...@@ -213,7 +214,7 @@ export default {
} }
let _icon = new AMap.Icon({ let _icon = new AMap.Icon({
image: require("images/poi_icon.gif"), image: STATICIMAGE.POI_MARKER,
}); });
if (options.id) { if (options.id) {
_icon = new AMap.Icon({ _icon = new AMap.Icon({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!