add journal-detail-panel
This commit is contained in:
@ -13,49 +13,33 @@
|
||||
bindcallouttap="onCalloutTap"
|
||||
>
|
||||
<cover-view slot="callout">
|
||||
<block wx:for="{{customCalloutMarkerIds}}" wx:key="*this">
|
||||
<cover-view class="custom-callout" marker-id="{{item}}">
|
||||
<block wx:for="{{locations}}" wx:key="locationKey" wx:for-index="markerIndex">
|
||||
<cover-view class="custom-callout" marker-id="{{markerIndex}}">
|
||||
<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 wx:if="{{item.previewThumb}}" class="thumb-container">
|
||||
<cover-image class="thumb" src="{{item.previewThumb}}" />
|
||||
<cover-view wx:if="{{item.count > 1}}" class="count-badge">{{item.count}}</cover-view>
|
||||
</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 wx:if="{{item.location}}" class="location">{{item.location}}</cover-view>
|
||||
<cover-view wx:if="{{item.count > 1}}" class="count-text">{{item.count}} 条日记</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="{{showDetail}}" class="marker-detail {{detailVisible ? 'visible' : ''}}">
|
||||
<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 wx:if="{{isLoading}}" class="loading">
|
||||
<view class="loading-text">加载中...</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情面板 -->
|
||||
<journal-detail-panel
|
||||
visible="{{showDetail && detailVisible}}"
|
||||
title="{{selectedLocation.location}}"
|
||||
journals="{{selectedLocation.journals}}"
|
||||
show-location-icon="{{true}}"
|
||||
show-journal-date="{{true}}"
|
||||
show-journal-location="{{false}}"
|
||||
bind:close="closeDetail"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user