Преглед на файлове

map marker 接口添加 type 参数

reghao преди 2 години
родител
ревизия
77c8ea7575
променени са 2 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 2 2
      src/api/map.js
  2. 2 1
      src/views/home/BdMap.vue

+ 2 - 2
src/api/map.js

@@ -15,8 +15,8 @@ export function getMarkerInfo(id) {
   return get(mapAPI.markerInfoApi + '?id=' + id)
 }
 
-export function getMapMarkers() {
-  return get(mapAPI.markers)
+export function getMapMarkers(type) {
+  return get(mapAPI.markers + "?type=" + type)
 }
 
 export function sendClickedLocation(loc) {

+ 2 - 1
src/views/home/BdMap.vue

@@ -128,7 +128,8 @@ export default {
           that.choosedLocation = { province, city, district, addr: street + street_number, lng, lat }
         })
 
-        getMapMarkers().then(res => {
+        const type = 2
+        getMapMarkers(type).then(res => {
           if (res.code === 0) {
             this.markers = res.data
           } else {