/home/index.nvue页面
<template>
<view class="page">
<!-- 地图区域(始终渲染,确保 mapContext 在 onReady 时即可拿到有效引用) -->
<view class="map-container">
<map
id="map-home"
ref="mapRef"
class="map"
:scale="mapScale"
:latitude="latitude"
:longitude="longitude"
:circles="mapCircles"
:show-location="false"
:enable-satellite="isSatelliteMap"
:polyline="mapPolyline"
@tap="onMapTap"
>
<PetLocationCallout
v-if="isShowCalloutSlot"
:map-markers="mapMarkers"
:pet-info="petInfo"
:device-info="deviceInfo"
:nearby-user-info-list="nearbyUserInfoList"
:user-info="userInfo"
:is-walking-together="
isLocalWalkingTogether || deviceInfo?.jsonData?.nearbyUserCenterIds?.length > 0
"
/>
</map>
<!-- 地图工具区域 -->
<view class="map-tools">
<view
class="map-tools-item"
v-for="(item, index) in mapToolsList"
:key="index"
@click="clickMapTools(item.type)"
>
<image :src="item.icon" alt="" mode="aspectFit" class="item-image" :style="item.style" />
</view>
</view>
<!-- 地图logo栏(安卓审核) -->
<view class="map-logo">
<image src="/static/images/home/amap_logo.webp" mode="aspectFit" class="logo-image" />
</view>
<!-- 设备号和工作模式调试信息 -->
<text class="device-debug-info">
v{{ appVersion }} - {{ deviceInfo?.jsonData?.deviceNumber || '' }} - {{ workerMode }}
</text>
</view>
</view>
</template>