
-
{{ props.info['address'] }}
+
{{ props['name'] }}
@@ -23,19 +22,14 @@
import { ref, defineProps } from 'vue';
const props = defineProps({
- info: Object,
+ latlng: Object,
+ name: String,
})
-// coordinate
-
-let coordinate = props.info['coordinate']
-console.log("coordinate", coordinate);
-
let key = ref("MVNBZ-PEFWI-O4OGT-5ADVJ-7QAYJ-NBFY4")
const initMap = () => {
-
- let center = new TMap.LatLng(coordinate[0], coordinate[1]);
+ let center = new TMap.LatLng(props.latlng['longitude'], props.latlng['latitude']);
let map = new TMap.Map("container", {
zoom: 15,
disableDefaultUI: true, //禁止所有控件
@@ -46,12 +40,11 @@ const initMap = () => {
map.removeControl(TMap.constants.DEFAULT_CONTROL_ID.ZOOM);
map.removeControl(TMap.constants.DEFAULT_CONTROL_ID.ROTATION);
-
let marker = new TMap.MultiMarker({
id: "marker-layer",
map: map,
geometries: [{
- "position": new TMap.LatLng(coordinate[0], coordinate[1]),
+ "position": new TMap.LatLng(props.latlng['longitude'], props.latlng['latitude']),
}]
});
}
@@ -68,10 +61,7 @@ loadScript(`https://map.qq.com/api/gljs?v=1.exp&key=${key.value}&callback=initMa
let show = ref(false) // 弹窗状态
-const showPop = () => {
- show.value = !show.value
- console.log("showPop", showPop);
-}
+const showPop = () => show.value = !show.value
diff --git a/src/views/apartmentDetail.vue b/src/views/apartmentDetail.vue
index b81c1d9..eca3280 100644
--- a/src/views/apartmentDetail.vue
+++ b/src/views/apartmentDetail.vue
@@ -82,8 +82,7 @@
-
-
+

@@ -95,15 +94,17 @@
{{ it }}