支付宝兼容
This commit is contained in:
+73
-23
@@ -3,40 +3,88 @@
|
||||
<!-- 地图容器 -->
|
||||
<view class="map-wrapper">
|
||||
<!-- 使用小程序原生地图组件 -->
|
||||
<map id="map" class="native-map" :longitude="mapCenter.longitude" :latitude="mapCenter.latitude"
|
||||
:markers="mapMarkers" :scale="mapZoom" :show-location="false" @regionchange="onMapRegionChange"
|
||||
@markertap="onMapMarkerTap" @callouttap="onCalloutTap" @updated="onMapUpdated" @error="onMapError">
|
||||
<!-- 覆盖在地图上的广告轮播(使用 cover-view 以兼容小程序原生组件层级) -->
|
||||
<cover-view class="index-swiper" v-if="!props.hideControls && !props.hideMapOverlays && currentBannerImage">
|
||||
<cover-image :src="currentBannerImage" class="index-swiper-img" mode="aspectFill" @tap="handleBannerTap"></cover-image>
|
||||
<!-- 轮播指示器 -->
|
||||
<cover-view class="banner-indicators" v-if="props.bannerImages.length > 1">
|
||||
<cover-view
|
||||
v-for="(img, idx) in props.bannerImages"
|
||||
:key="idx"
|
||||
class="indicator-dot"
|
||||
:class="{ active: idx === currentBannerIndex }">
|
||||
<map
|
||||
id="map"
|
||||
class="native-map"
|
||||
:longitude="mapCenter.longitude"
|
||||
:latitude="mapCenter.latitude"
|
||||
:markers="mapMarkers"
|
||||
:scale="mapZoom"
|
||||
:show-location="false"
|
||||
@regionchange="onMapRegionChange"
|
||||
@markertap="onMapMarkerTap"
|
||||
@callouttap="onCalloutTap"
|
||||
@updated="onMapUpdated"
|
||||
@error="onMapError"
|
||||
>
|
||||
<!-- 覆盖在地图上的广告轮播(使用 cover-view 以兼容小程序原生组件层级) -->
|
||||
<cover-view
|
||||
class="index-swiper"
|
||||
v-if="!props.hideControls && !props.hideMapOverlays && currentBannerImage"
|
||||
>
|
||||
<cover-image
|
||||
:src="currentBannerImage"
|
||||
class="index-swiper-img"
|
||||
mode="aspectFill"
|
||||
@tap="handleBannerTap"
|
||||
></cover-image>
|
||||
<!-- 轮播指示器 -->
|
||||
<cover-view
|
||||
class="banner-indicators"
|
||||
v-if="props.bannerImages.length > 1"
|
||||
>
|
||||
<cover-view
|
||||
v-for="(img, idx) in props.bannerImages"
|
||||
:key="idx"
|
||||
class="indicator-dot"
|
||||
:class="{ active: idx === currentBannerIndex }"
|
||||
>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
|
||||
|
||||
<!-- 地图中心固定定位图标 -->
|
||||
<cover-view class="center-location-marker" v-if="!props.hideMapOverlays">
|
||||
<cover-image src="/static/location-icon.png" class="center-marker-icon"></cover-image>
|
||||
<cover-view
|
||||
class="center-location-marker"
|
||||
v-if="!props.hideMapOverlays"
|
||||
>
|
||||
<cover-image
|
||||
src="/static/location-icon.png"
|
||||
class="center-marker-icon"
|
||||
></cover-image>
|
||||
</cover-view>
|
||||
|
||||
|
||||
<cover-view class="map-side-controls" v-if="!props.hideControls && !props.hideMapOverlays">
|
||||
<!-- 侧边控制按钮 -->
|
||||
<cover-view
|
||||
class="map-side-controls"
|
||||
v-if="!props.hideControls && !props.hideMapOverlays"
|
||||
>
|
||||
<cover-view class="side-btn guide" @tap="handleGuide">
|
||||
<cover-image class="side-icon" src="/static/use_help.png" style="border-radius: 50%;"></cover-image>
|
||||
<cover-image
|
||||
class="side-icon"
|
||||
src="/static/use_help.png"
|
||||
style="border-radius: 50%;"
|
||||
></cover-image>
|
||||
</cover-view>
|
||||
<cover-view class="side-btn locate" @tap="handleRelocate">
|
||||
<cover-image class="side-icon" src="/static/location.png"></cover-image>
|
||||
<cover-image
|
||||
class="side-icon"
|
||||
src="/static/location.png"
|
||||
></cover-image>
|
||||
</cover-view>
|
||||
<cover-view class="side-btn search" @tap="handleSearch">
|
||||
<cover-image class="side-icon" src="/static/other_device.png"></cover-image>
|
||||
<cover-image
|
||||
class="side-icon"
|
||||
src="/static/other_device.png"
|
||||
></cover-image>
|
||||
</cover-view>
|
||||
<cover-view class="side-btn service" @tap="handleService">
|
||||
<cover-image class="side-icon" src="/static/customer-service.png"></cover-image>
|
||||
<cover-image
|
||||
class="side-icon"
|
||||
src="/static/customer-service.png"
|
||||
></cover-image>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</map>
|
||||
@@ -508,15 +556,16 @@ const handleSearch = () => {
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
// #ifdef H5
|
||||
height:78vh;
|
||||
height: 78vh;
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
height: 72vh;
|
||||
// #endif
|
||||
|
||||
|
||||
&.full-width {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
@@ -682,6 +731,7 @@ const handleSearch = () => {
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
z-index: 2;
|
||||
pointer-events: none;
|
||||
|
||||
.indicator-dot {
|
||||
width: 12rpx;
|
||||
|
||||
Reference in New Issue
Block a user