diff --git a/clients/pages/index/index.vue b/clients/pages/index/index.vue index 86338f1..8996cfd 100644 --- a/clients/pages/index/index.vue +++ b/clients/pages/index/index.vue @@ -48,6 +48,11 @@ const selectedSpot = ref(null); const locating = ref(false); const mapCtx = ref(null); const userLocation = ref(null); +const mapShowLocation = ref(false); + +// #ifndef H5 +mapShowLocation.value = true; +// #endif const truncate = (str, len = 8) => str && str.length > len ? str.slice(0, len) + "…" : str; @@ -390,7 +395,7 @@ onMounted(() => { :longitude="mapCenter.longitude" :markers="markers" :scale="12" - :show-location="true" + :show-location="mapShowLocation" :enable-zoom="true" :enable-scroll="true" @markertap="onMarkerTap" diff --git a/clients/pages/spot/pick-location.vue b/clients/pages/spot/pick-location.vue index 21841c6..92e944c 100644 --- a/clients/pages/spot/pick-location.vue +++ b/clients/pages/spot/pick-location.vue @@ -7,6 +7,11 @@ const longitude = ref(116.39747); const address = ref("移动地图选择位置"); const currentCity = ref(""); const mapCtx = ref(null); +const mapShowLocation = ref(false); + +// #ifndef H5 +mapShowLocation.value = true; +// #endif const keyword = ref(""); const searchResults = ref([]); @@ -129,7 +134,7 @@ const confirmLocation = () => { :latitude="latitude" :longitude="longitude" :scale="16" - show-location + :show-location="mapShowLocation" @regionchange="onRegionChange" />