Files
gaoYuJournal/miniprogram/components/journal-detail-panel/index.wxml
2025-12-10 17:17:57 +08:00

63 lines
2.1 KiB
Plaintext

<!-- components/journal-detail-panel/index.wxml -->
<t-popup
class="popup"
visible="{{visible}}"
placement="bottom"
bind:visible-change="closeDetail"
>
<view class="detail-panel">
<view class="detail-content">
<view class="header">
<view class="info">
<view wx:if="{{title}}" class="title">
<t-icon wx:if="{{showLocationIcon}}" class="icon" name="location-filled" />
<text>{{title}}</text>
</view>
</view>
<view class="actions">
<view wx:if="{{journals.length > 1}}" class="indicator">
{{currentJournalIndex + 1}}/{{journals.length}}
</view>
<t-icon name="close" catchtap="closeDetail" size="48rpx" />
</view>
</view>
<swiper class="journals-swiper" current="{{currentJournalIndex}}" bindchange="onSwiperChange">
<block wx:for="{{journals}}" wx:key="id">
<swiper-item class="swiper-item-wrapper">
<view class="journal-item">
<view class="journal-header">
<view
wx:if="{{item.location && showJournalLocation}}"
class="location"
catchtap="openLocation"
data-journal-index="{{currentJournalIndex}}"
>
<t-icon class="icon" name="location-filled" />
<text class="text">{{item.location}}</text>
</view>
<view wx:if="{{showJournalDate}}" class="date">{{item.date}}</view>
</view>
<view wx:if="{{item.idea}}" class="idea">{{item.idea}}</view>
<scroll-view wx:if="{{item.items && item.items.length > 0}}" scroll-y class="items-scroll">
<view class="items">
<view class="wrapper">
<block wx:for="{{item.items}}" wx:key="mongoId" wx:for-item="media" wx:for-index="mediaIndex">
<image
class="item thumbnail {{media.type === 1 ? 'video' : 'image'}}"
src="{{media.thumbURL}}"
mode="widthFix"
catchtap="previewMedia"
data-media-index="{{mediaIndex}}"
/>
</block>
</view>
</view>
</scroll-view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
</t-popup>