jtoms hace 4 años
padre
commit
7661c6ad8b

+ 1 - 0
public/index.html

@@ -140,6 +140,7 @@
       }
     }
   </style>
+  <script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&key=WKVBZ-3QYY4-QMNUF-DS27P-BQLN3-SOBS6"></script>
 </head>
 <body>
 <noscript>

+ 0 - 107
src/components/AMapMarker.vue

@@ -1,107 +0,0 @@
-<template>
-  <div :id="id" :style="{'height':height+'px','width':'100%'}" />
-</template>
-
-<script>
-
-import AMapLoader from '@amap/amap-jsapi-loader'
-
-export default {
-  props: {
-    id: {
-      type: String,
-      default: 'container'
-    },
-    height: {
-      type: Number,
-      default: 500
-    },
-    enableClick: {
-      type: Boolean,
-      default: true
-    },
-    enableBoundsChanged: {
-      type: Boolean,
-      default: false
-    },
-    position: {
-      type: Array,
-      default: function() {
-        return []
-      }
-    }
-  },
-  data() {
-    return {
-      marker: null,
-      amap: null,
-      isloading: false,
-      infoWindow: null
-    }
-  },
-  created() {
-
-  },
-  mounted() {
-    const _this = this
-
-    AMapLoader.load({
-      key: '173fa0186964179b9c6f43d59f72172f',
-      version: '2.0',
-      plugins: ['AMap.ToolBar', 'AMap.Scale']
-    }).then((AMap) => {
-      const config = { zoom: 15 }
-      if (_this.position && _this.position.length > 0 && _this.position[0]) {
-        config.center = _this.position
-      }
-      _this.map = new AMap.Map(_this.id, config)
-      _this.infoWindow = new AMap.InfoWindow({ offset: new AMap.Pixel(0, -30) })
-
-      _this.map.on('click', function(e) {
-        _this.mapClick(e, AMap)
-      })
-      _this.map.on('moveend', function(e) {
-        _this.mapBoundsChanged(e, AMap)
-      })
-      _this.map.on('zoomend', function(e) {
-        _this.mapBoundsChanged(e, AMap)
-      })
-      _this.map.on('complete', function(e) {
-        _this.mapBoundsChanged(e, AMap)
-      })
-
-      if (_this.position && _this.position.length > 0 && _this.position[0]) {
-        _this.marker = new AMap.Marker({
-          position: _this.position,
-          clickable: true,
-          map: _this.map
-        })
-      }
-    })
-  },
-  methods: {
-    mapBoundsChanged: function(e, AMap) {
-      if (this.enableBoundsChanged) {
-        console.log(e)
-        const bounds = this.map.getBounds()
-        // this.map.clearMap()
-        this.$emit('boundsChanged', bounds.northEast, bounds.southWest, AMap, this.map, this.infoWindow)
-      }
-    },
-    mapClick: function(e, AMap) {
-      if (this.enableClick) {
-        this.$emit('click', e)
-        if (this.marker) {
-          this.marker.setPosition([e.lnglat.lng, e.lnglat.lat])
-        } else {
-          this.marker = new AMap.Marker({
-            position: [e.lnglat.lng, e.lnglat.lat],
-            clickable: true,
-            map: this.map
-          })
-        }
-      }
-    }
-  }
-}
-</script>

+ 106 - 0
src/components/TencentMap.vue

@@ -0,0 +1,106 @@
+<template>
+  <div :id="id" :style="{'height':height+'px','width':'100%'}"/>
+</template>
+
+<script>
+
+export default {
+  props: {
+    id: {
+      type: String,
+      default: 'container'
+    },
+    height: {
+      type: Number,
+      default: 500
+    },
+    enableClick: {
+      type: Boolean,
+      default: true
+    },
+    enableBoundsChanged: {
+      type: Boolean,
+      default: false
+    },
+    position: {
+      type: Array,
+      default: function() {
+        return []
+      }
+    }
+  },
+  data() {
+    return {
+      markerLayer: null,
+      map: null,
+      infowindow: null,
+      isloading: false
+    }
+  },
+  created() {
+
+  },
+  mounted() {
+    const _this = this
+
+    const config = { zoom: 12 }
+    if (_this.position && _this.position.length > 0 && _this.position[0]) {
+      config.center = new TMap.LatLng(_this.position[0], _this.position[1])
+    }
+
+    _this.map = new TMap.Map(_this.id, config)
+    _this.markerLayer = new TMap.MultiMarker({
+      id: 'marker-layer',
+      map: _this.map
+    })
+    _this.markerLayer.on('click', _this.markerClick)
+
+    _this.map.on('click', _this.mapClick)
+    _this.map.on('moveend', _this.mapBoundsChanged)
+    _this.map.on('zoomend', _this.mapBoundsChanged)
+    _this.map.on('tilesloaded', _this.mapBoundsChanged)
+
+    if (_this.position && _this.position.length > 0 && _this.position[0]) {
+      this.markerLayer.setGeometries([{
+        position: new TMap.LatLng(_this.position[0], _this.position[1])
+      }])
+    }
+  },
+  methods: {
+    markerClick: function(e) {
+      console.log(e)
+      const _this = this
+      const properties = e.geometry.properties
+      if (properties.infoContent) {
+        if (this.infowindow) {
+          this.infowindow.destroy()
+        }
+        _this.infowindow = new TMap.InfoWindow({
+          content: properties.infoContent,
+          position: e.latLng,
+          map: _this.map
+        })
+        // infowindow.
+      }
+    },
+    mapBoundsChanged: function(e) {
+      if (this.enableBoundsChanged) {
+        console.log(e)
+        const bounds = this.map.getBounds()
+        console.log(bounds._ne)
+        console.log(bounds._sw)
+        this.$emit('boundsChanged', bounds._ne, bounds._sw, this.markerLayer)
+      }
+    },
+    mapClick: function(e) {
+      if (this.enableClick) {
+        this.$emit('click', e)
+        console.log(e)
+        this.markerLayer.setGeometries([{
+          position: e.latLng
+        }])
+      }
+    }
+  }
+}
+</script>

+ 15 - 14
src/views/bz/base/holidayVillage/DialogForm.vue

@@ -11,12 +11,12 @@
           <el-row :gutter="24">
             <el-col :span="12">
               <el-form-item label="名称">
-                <el-input v-model="form.baseDataInfo.name" />
+                <el-input v-model="form.baseDataInfo.name"/>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="开放时间">
-                <el-input v-model="form.businessHours" />
+                <el-input v-model="form.businessHours"/>
               </el-form-item>
             </el-col>
           </el-row>
@@ -31,33 +31,33 @@
               :on-remove="handleRemove"
               :auto-upload="true"
             >
-              <i slot="default" class="el-icon-plus" />
+              <i slot="default" class="el-icon-plus"/>
             </el-upload>
           </el-form-item>
           <el-form-item label="地址">
-            <el-input v-model="form.baseDataInfo.address" />
+            <el-input v-model="form.baseDataInfo.address"/>
           </el-form-item>
           <el-row :gutter="24">
             <el-col :span="12">
               <el-form-item label="联系人">
-                <el-input v-model="form.baseDataInfo.contacts" />
+                <el-input v-model="form.baseDataInfo.contacts"/>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="联系电话">
-                <el-input v-model="form.baseDataInfo.contactNumber" />
+                <el-input v-model="form.baseDataInfo.contactNumber"/>
               </el-form-item>
             </el-col>
           </el-row>
         </el-col>
         <el-col :span="12">
           <el-form-item label="标注位置">
-            <a-map-marker id="amapcontainer" :position="[lng, lat]" @click="aMapClick" />
+            <tencent-map id="amapcontainer" :position="[lat,lng]" @click="mapClick"/>
           </el-form-item>
         </el-col>
       </el-row>
       <el-form-item label="简介">
-        <el-input v-model="form.baseDataInfo.brief" type="textarea" rows="10" />
+        <el-input v-model="form.baseDataInfo.brief" type="textarea" rows="10"/>
       </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer">
@@ -70,11 +70,11 @@
 <script>
 
 import { uploaderHandle } from '@/api/upload'
-import AMapMarker from '@/components/AMapMarker'
 import { save, updateById } from '@/api/bz/base/holidayVillage'
+import TencentMap from '@/components/TencentMap'
 
 export default {
-  components: { AMapMarker },
+  components: { TencentMap },
   data() {
     return {
       visible: false,
@@ -122,9 +122,10 @@ export default {
         this.form = Object.assign({}, data)
       }
     },
-    aMapClick(e) {
-      this.lng = e.lnglat.lng
-      this.lat = e.lnglat.lat
+    mapClick(e) {
+      console.log(e)
+      this.lng = e.latLng.lng
+      this.lat = e.latLng.lat
     },
     handleSubmit() {
       const litpics = []
@@ -132,7 +133,7 @@ export default {
         litpics.push(o.url)
       })
       this.isLoading = true
-      const param = { ...this.form, baseDataInfo: { ...this.form.baseDataInfo, lng: this.lng, lat: this.lat, litpics }}
+      const param = { ...this.form, baseDataInfo: { ...this.form.baseDataInfo, lng: this.lng, lat: this.lat, litpics } }
       console.log(param)
       if (this.form.id) {
         updateById(this.form.id, param).then(() => {

+ 14 - 14
src/views/bz/base/homeStay/DialogForm.vue

@@ -11,12 +11,12 @@
           <el-row :gutter="24">
             <el-col :span="12">
               <el-form-item label="名称">
-                <el-input v-model="form.baseDataInfo.name" />
+                <el-input v-model="form.baseDataInfo.name"/>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="客户数量">
-                <el-input-number v-model="form.totalRoomCount" />
+                <el-input-number v-model="form.totalRoomCount"/>
               </el-form-item>
             </el-col>
           </el-row>
@@ -31,33 +31,33 @@
               :on-remove="handleRemove"
               :auto-upload="true"
             >
-              <i slot="default" class="el-icon-plus" />
+              <i slot="default" class="el-icon-plus"/>
             </el-upload>
           </el-form-item>
           <el-form-item label="地址">
-            <el-input v-model="form.baseDataInfo.address" />
+            <el-input v-model="form.baseDataInfo.address"/>
           </el-form-item>
           <el-row :gutter="24">
             <el-col :span="12">
               <el-form-item label="联系人">
-                <el-input v-model="form.baseDataInfo.contacts" />
+                <el-input v-model="form.baseDataInfo.contacts"/>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="联系电话">
-                <el-input v-model="form.baseDataInfo.contactNumber" />
+                <el-input v-model="form.baseDataInfo.contactNumber"/>
               </el-form-item>
             </el-col>
           </el-row>
         </el-col>
         <el-col :span="12">
           <el-form-item label="标注位置">
-            <a-map-marker id="amapcontainer" :position="[lng, lat]" @click="aMapClick" />
+            <tencent-map id="amapcontainer" :position="[lat,lng]" @click="mapClick"/>
           </el-form-item>
         </el-col>
       </el-row>
       <el-form-item label="简介">
-        <el-input v-model="form.baseDataInfo.brief" type="textarea" rows="10" />
+        <el-input v-model="form.baseDataInfo.brief" type="textarea" rows="10"/>
       </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer">
@@ -70,11 +70,11 @@
 <script>
 
 import { uploaderHandle } from '@/api/upload'
-import AMapMarker from '@/components/AMapMarker'
 import { save, updateById } from '@/api/bz/base/homeStay'
+import TencentMap from '@/components/TencentMap'
 
 export default {
-  components: { AMapMarker },
+  components: { TencentMap },
   data() {
     return {
       visible: false,
@@ -122,9 +122,9 @@ export default {
         this.form = Object.assign({}, data)
       }
     },
-    aMapClick(e) {
-      this.lng = e.lnglat.lng
-      this.lat = e.lnglat.lat
+    mapClick(e) {
+      this.lng = e.latLng.lng
+      this.lat = e.latLng.lat
     },
     handleSubmit() {
       const litpics = []
@@ -132,7 +132,7 @@ export default {
         litpics.push(o.url)
       })
       this.isLoading = true
-      const param = { ...this.form, baseDataInfo: { ...this.form.baseDataInfo, lng: this.lng, lat: this.lat, litpics }}
+      const param = { ...this.form, baseDataInfo: { ...this.form.baseDataInfo, lng: this.lng, lat: this.lat, litpics } }
       console.log(param)
       if (this.form.id) {
         updateById(this.form.id, param).then(() => {

+ 24 - 19
src/views/bz/base/hotel/DialogForm.vue

@@ -11,20 +11,25 @@
           <el-row :gutter="24">
             <el-col :span="12">
               <el-form-item label="名称">
-                <el-input v-model="form.baseDataInfo.name" />
+                <el-input v-model="form.baseDataInfo.name"/>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <el-col :span="6">
               <el-form-item label="等级">
                 <el-select v-model="form.grade" placeholder="请选择" clearable>
-                  <el-option label="一星" value="ONE_STAR" />
-                  <el-option label="二星" value="TWO_STAR" />
-                  <el-option label="三星" value="THREE_STAR" />
-                  <el-option label="四星" value="FOUR_STAR" />
-                  <el-option label="五星" value="FIVE_STAR" />
+                  <el-option label="一星" value="ONE_STAR"/>
+                  <el-option label="二星" value="TWO_STAR"/>
+                  <el-option label="三星" value="THREE_STAR"/>
+                  <el-option label="四星" value="FOUR_STAR"/>
+                  <el-option label="五星" value="FIVE_STAR"/>
                 </el-select>
               </el-form-item>
             </el-col>
+            <el-col :span="6">
+              <el-form-item label="客房数">
+                <el-input v-model="form.totalRoomCount"/>
+              </el-form-item>
+            </el-col>
           </el-row>
           <el-form-item label="图片">
             <el-upload
@@ -37,33 +42,33 @@
               :on-remove="handleRemove"
               :auto-upload="true"
             >
-              <i slot="default" class="el-icon-plus" />
+              <i slot="default" class="el-icon-plus"/>
             </el-upload>
           </el-form-item>
           <el-form-item label="地址">
-            <el-input v-model="form.baseDataInfo.address" />
+            <el-input v-model="form.baseDataInfo.address"/>
           </el-form-item>
           <el-row :gutter="24">
             <el-col :span="12">
               <el-form-item label="联系人">
-                <el-input v-model="form.baseDataInfo.contacts" />
+                <el-input v-model="form.baseDataInfo.contacts"/>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="联系电话">
-                <el-input v-model="form.baseDataInfo.contactNumber" />
+                <el-input v-model="form.baseDataInfo.contactNumber"/>
               </el-form-item>
             </el-col>
           </el-row>
         </el-col>
         <el-col :span="12">
           <el-form-item label="标注位置">
-            <a-map-marker id="amapcontainer" :position="[lng, lat]" @click="aMapClick" />
+            <tencent-map id="amapcontainer" :position="[lat,lng]" @click="mapClick"/>
           </el-form-item>
         </el-col>
       </el-row>
       <el-form-item label="简介">
-        <el-input v-model="form.baseDataInfo.brief" type="textarea" rows="10" />
+        <el-input v-model="form.baseDataInfo.brief" type="textarea" rows="10"/>
       </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer">
@@ -76,11 +81,11 @@
 <script>
 
 import { uploaderHandle } from '@/api/upload'
-import AMapMarker from '@/components/AMapMarker'
 import { save, updateById } from '@/api/bz/base/hotel'
+import TencentMap from '@/components/TencentMap'
 
 export default {
-  components: { AMapMarker },
+  components: { TencentMap },
   data() {
     return {
       visible: false,
@@ -132,9 +137,9 @@ export default {
         }
       }
     },
-    aMapClick(e) {
-      this.lng = e.lnglat.lng
-      this.lat = e.lnglat.lat
+    mapClick(e) {
+      this.lng = e.latLng.lng
+      this.lat = e.latLng.lat
     },
     handleSubmit() {
       const litpics = []
@@ -142,7 +147,7 @@ export default {
         litpics.push(o.url)
       })
       this.isLoading = true
-      const param = { ...this.form, baseDataInfo: { ...this.form.baseDataInfo, lng: this.lng, lat: this.lat, litpics }}
+      const param = { ...this.form, baseDataInfo: { ...this.form.baseDataInfo, lng: this.lng, lat: this.lat, litpics } }
       console.log(param)
       if (this.form.id) {
         updateById(this.form.id, param).then(() => {

+ 6 - 6
src/views/bz/base/scenery/DialogForm.vue

@@ -58,7 +58,7 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="标注位置">
-            <a-map-marker id="amapcontainer" :position="[lng, lat]" @click="aMapClick" />
+            <tencent-map id="amapcontainer" :position="[lat,lng]" @click="mapClick"/>
           </el-form-item>
         </el-col>
       </el-row>
@@ -76,11 +76,11 @@
 <script>
 
 import { uploaderHandle } from '@/api/upload'
-import AMapMarker from '@/components/AMapMarker'
 import { save, updateById } from '@/api/bz/base/scenery'
+import TencentMap from '@/components/TencentMap'
 
 export default {
-  components: { AMapMarker },
+  components: { TencentMap },
   data() {
     return {
       visible: false,
@@ -132,9 +132,9 @@ export default {
         }
       }
     },
-    aMapClick(e) {
-      this.lng = e.lnglat.lng
-      this.lat = e.lnglat.lat
+    mapClick(e) {
+      this.lng = e.latLng.lng
+      this.lat = e.latLng.lat
     },
     handleSubmit() {
       const litpics = []

+ 14 - 14
src/views/bz/base/tourist/DialogForm.vue

@@ -11,12 +11,12 @@
           <el-row :gutter="24">
             <el-col :span="12">
               <el-form-item label="名称">
-                <el-input v-model="form.baseDataInfo.name" />
+                <el-input v-model="form.baseDataInfo.name"/>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="导游数量">
-                <el-input-number v-model="form.totalTourGuidesCount" />
+                <el-input-number v-model="form.totalTourGuidesCount"/>
               </el-form-item>
             </el-col>
           </el-row>
@@ -31,33 +31,33 @@
               :on-remove="handleRemove"
               :auto-upload="true"
             >
-              <i slot="default" class="el-icon-plus" />
+              <i slot="default" class="el-icon-plus"/>
             </el-upload>
           </el-form-item>
           <el-form-item label="地址">
-            <el-input v-model="form.baseDataInfo.address" />
+            <el-input v-model="form.baseDataInfo.address"/>
           </el-form-item>
           <el-row :gutter="24">
             <el-col :span="12">
               <el-form-item label="联系人">
-                <el-input v-model="form.baseDataInfo.contacts" />
+                <el-input v-model="form.baseDataInfo.contacts"/>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="联系电话">
-                <el-input v-model="form.baseDataInfo.contactNumber" />
+                <el-input v-model="form.baseDataInfo.contactNumber"/>
               </el-form-item>
             </el-col>
           </el-row>
         </el-col>
         <el-col :span="12">
           <el-form-item label="标注位置">
-            <a-map-marker id="amapcontainer" :position="[lng, lat]" @click="aMapClick" />
+            <tencent-map id="amapcontainer" :position="[lat,lng]" @click="mapClick"/>
           </el-form-item>
         </el-col>
       </el-row>
       <el-form-item label="简介">
-        <el-input v-model="form.baseDataInfo.brief" type="textarea" rows="10" />
+        <el-input v-model="form.baseDataInfo.brief" type="textarea" rows="10"/>
       </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer">
@@ -70,11 +70,11 @@
 <script>
 
 import { uploaderHandle } from '@/api/upload'
-import AMapMarker from '@/components/AMapMarker'
 import { save, updateById } from '@/api/bz/base/tourist'
+import TencentMap from '@/components/TencentMap'
 
 export default {
-  components: { AMapMarker },
+  components: { TencentMap },
   data() {
     return {
       visible: false,
@@ -120,9 +120,9 @@ export default {
         this.form = Object.assign({}, data)
       }
     },
-    aMapClick(e) {
-      this.lng = e.lnglat.lng
-      this.lat = e.lnglat.lat
+    mapClick(e) {
+      this.lng = e.latLng.lng
+      this.lat = e.latLng.lat
     },
     handleSubmit() {
       const litpics = []
@@ -131,7 +131,7 @@ export default {
       })
       this.isLoading = true
 
-      const param = { ...this.form, baseDataInfo: { ...this.form.baseDataInfo, lng: this.lng, lat: this.lat, litpics }}
+      const param = { ...this.form, baseDataInfo: { ...this.form.baseDataInfo, lng: this.lng, lat: this.lat, litpics } }
       console.log(param)
       if (this.form.id) {
         updateById(this.form.id, param).then(() => {

+ 6 - 6
src/views/bz/base/venue/DialogForm.vue

@@ -52,7 +52,7 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="标注位置">
-            <a-map-marker id="amapcontainer" :position="[lng, lat]" @click="aMapClick" />
+            <tencent-map id="amapcontainer" :position="[lat,lng]" @click="mapClick"/>
           </el-form-item>
         </el-col>
       </el-row>
@@ -70,11 +70,11 @@
 <script>
 
 import { uploaderHandle } from '@/api/upload'
-import AMapMarker from '@/components/AMapMarker'
 import { save, updateById } from '@/api/bz/base/venue'
+import TencentMap from '@/components/TencentMap'
 
 export default {
-  components: { AMapMarker },
+  components: { TencentMap },
   data() {
     return {
       visible: false,
@@ -122,9 +122,9 @@ export default {
         this.form = Object.assign({}, data)
       }
     },
-    aMapClick(e) {
-      this.lng = e.lnglat.lng
-      this.lat = e.lnglat.lat
+    mapClick(e) {
+      this.lng = e.latLng.lng
+      this.lat = e.latLng.lat
     },
     handleSubmit() {
       const litpics = []

+ 19 - 15
src/views/bz/gis/index.vue

@@ -1,38 +1,42 @@
 <template>
   <div class="app-container">
-    <a-map-marker id="amapcontainer" :height="800" :enable-click="false" :enable-bounds-changed="true" @boundsChanged="boundsChanged" />
+    <tencent-map id="amapcontainer" :height="900" :enable-click="false" :enable-bounds-changed="true" @boundsChanged="boundsChanged"/>
   </div>
 </template>
 
 <script>
-import AMapMarker from '@/components/AMapMarker'
 import { findByMapBounds } from '@/api/bz/base/baseInfo'
+import TencentMap from '@/components/TencentMap'
 
 export default {
-  components: { AMapMarker },
+  components: { TencentMap },
   data() {
     return {}
   },
   created() {
   },
+  mounted() {
+  },
   methods: {
-    boundsChanged: function(northEast, southWest, AMap, map, infoWindow) {
+    boundsChanged: function(northEast, southWest, markerLayer) {
       const _this = this
       findByMapBounds(northEast.lng, northEast.lat, southWest.lng, southWest.lat)
-        .then((res) => res.forEach((o) => _this.addMarker(o, AMap, map, infoWindow)))
+        .then((res) => res.forEach((o) => _this.addMarker(o, markerLayer)))
         .finally(() => (_this.isloading = false))
     },
-    addMarker: function(o, AMap, map, infoWindow) {
-      const marker = new AMap.Marker({
-        position: [o.lng, o.lat]
-      })
-      marker.on('mouseover', function() {
-        infoWindow.setContent(
-          '类型:' + (o.dataType.text ?? '-') + '<br /> 名称:' + (o.name ?? '-') + '<br />联系人:' + (o.contacts ?? '-') + '<br />联系电话:' + (o.contactNumber ?? '-')
-        )
-        infoWindow.open(map, [o.lng, o.lat])
+    addMarker: function(o, markerLayer) {
+      let infoContent = '<div style="text-align: left">'
+      infoContent += '<p>类型:' + (o.dataType.text ?? '-') + '</p>'
+      infoContent += '<p>名称:' + (o.name ?? '-') + '</p>'
+      infoContent += '<p>联系人:' + (o.contacts ?? '-') + '</p>'
+      infoContent += '<p>电话:' + (o.contactNumber ?? '-') + '</p>'
+      infoContent += '</div>'
+      markerLayer.add({
+        position: new TMap.LatLng(o.lat, o.lng),
+        properties: {
+          infoContent: infoContent
+        }
       })
-      map.add(marker)
     }
   }
 }