Files
gaoYuJournal/miniprogram/pages/main/journal-map/index.wxml
2025-12-10 13:46:51 +08:00

62 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--pages/main/journal-map/index.wxml-->
<t-navbar title="地图查找" left-arrow />
<view class="container">
<map
id="journal-map"
class="map"
latitude="{{centerLat}}"
longitude="{{centerLng}}"
scale="{{scale}}"
markers="{{markers}}"
show-location
bindmarkertap="onMarkerTap"
bindcallouttap="onCalloutTap"
>
<cover-view slot="callout">
<block wx:for="{{customCalloutMarkerIds}}" wx:key="*this">
<cover-view class="custom-callout" marker-id="{{item}}">
<cover-view class="callout-content">
<cover-view wx:if="{{journals[index].items.length > 0}}" class="thumb-container">
<cover-image class="thumb" src="{{journals[index].items[0].thumbURL}}" />
</cover-view>
<cover-view class="text-container">
<cover-view wx:if="{{journals[index].location}}" class="location">{{journals[index].location}}</cover-view>
<cover-view wx:if="{{journals[index].idea}}" class="idea">{{journals[index].idea}}</cover-view>
</cover-view>
</cover-view>
</cover-view>
</block>
</cover-view>
</map>
<cover-view wx:if="{{isLoading}}" class="loading">
<cover-view class="loading-text">加载中...</cover-view>
</cover-view>
<cover-view wx:if="{{selectedMarker}}" class="marker-detail">
<cover-view class="detail-content">
<cover-view class="header">
<cover-view class="info">
<cover-view class="date">{{selectedMarker.date}}</cover-view>
<cover-view wx:if="{{selectedMarker.location}}" class="location">
<cover-image class="icon" src="../../../assets/image/location.png" />
<cover-view class="text">{{selectedMarker.location}}</cover-view>
</cover-view>
</cover-view>
<cover-view class="close" catchtap="closeDetail">×</cover-view>
</cover-view>
<cover-view wx:if="{{selectedMarker.idea}}" class="idea">{{selectedMarker.idea}}</cover-view>
<cover-view wx:if="{{selectedMarker.items && selectedMarker.items.length > 0}}" class="items">
<cover-view class="wrapper">
<block wx:for="{{selectedMarker.items}}" wx:key="mongoId">
<cover-image
class="item thumbnail {{item.type === 1 ? 'video' : 'image'}}"
src="{{item.thumbURL}}"
catchtap="previewMedia"
data-index="{{index}}"
/>
</block>
</cover-view>
</cover-view>
</cover-view>
</cover-view>
</view>