Browse Source

feat(records): change id

gemercheung 1 year ago
parent
commit
ab131b896b
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/app/map/App.vue

+ 8 - 1
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: '',
@@ -74,7 +81,7 @@ const loadMap = async () => {
 
 
       console.log('coord', coord, item.caseId)
-      const url = getFuseCodeLink(item.caseId, true)
+      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",