Browse Source

Merge branch 'xj' of http://192.168.0.115:3000/bill/public-fuse into xj

bill 1 year ago
parent
commit
e1c40c35fe
1 changed files with 10 additions and 3 deletions
  1. 10 3
      src/app/map/App.vue

+ 10 - 3
src/app/map/App.vue

@@ -9,6 +9,13 @@ import { onMounted, ref } from "vue";
 import axios from 'axios';
 import { getFuseCodeLink } from "../../view/case/help";
 
+const getQuery = (
+  caseId: number,
+  share: boolean = false,
+  single: boolean = false
+) =>
+  `${getFuseCodeLink(caseId, true)}${share ? "&share=1" : ""}${single ? "&single=1" : ""
+  }#show/summary`;
 
 const request = axios.create({
   baseURL: '',
@@ -73,8 +80,8 @@ const loadMap = async () => {
       const coord = latlng.split(',')
 
 
-      console.log('coord', coord, item.id)
-      const url = getFuseCodeLink(item.id, true)
+      console.log('coord', coord, item.caseId)
+      const url = getQuery(item.caseId, true)
       console.log('url', url)
       const icon = new AMap.Icon({
         image: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",
@@ -87,7 +94,7 @@ const loadMap = async () => {
         position: coord.reverse(),
         title: item.title,
         label: item.title,
-        extData: { url: url, id: item.id }
+        extData: { url: url, id: item.caseId }
         // offset: new AMap.Pixel(-26, -54),
       });