add journal-date
This commit is contained in:
68
miniprogram/pages/main/journal-date/index.wxml
Normal file
68
miniprogram/pages/main/journal-date/index.wxml
Normal file
@ -0,0 +1,68 @@
|
||||
<!--pages/main/journal-date/index.wxml-->
|
||||
<t-navbar title="日期查找" left-arrow />
|
||||
<view class="container">
|
||||
<!-- 日历视图 -->
|
||||
<calendar journal-map="{{journalMap}}" bind:dateselect="onDateSelect" />
|
||||
<!-- 加载状态 -->
|
||||
<view wx:if="{{isLoading}}" class="loading">
|
||||
<view class="loading-text">加载中...</view>
|
||||
</view>
|
||||
<!-- 详情面板 -->
|
||||
<t-popup
|
||||
visible="{{popupVisible}}"
|
||||
placement="bottom"
|
||||
bind:visible-change="onPopupVisibleChange"
|
||||
>
|
||||
<view class="date-detail">
|
||||
<view class="detail-content">
|
||||
<view class="header">
|
||||
<view class="info">
|
||||
<view class="date">{{selectedDate.displayDate}}</view>
|
||||
<view class="count">{{selectedDate.journals.length}} 条日记</view>
|
||||
</view>
|
||||
<view class="actions">
|
||||
<view wx:if="{{selectedDate.journals.length > 1}}" class="indicator">
|
||||
{{currentJournalIndex + 1}}/{{selectedDate.journals.length}}
|
||||
</view>
|
||||
<t-icon name="close" catchtap="closeDetail" size="48rpx" />
|
||||
</view>
|
||||
</view>
|
||||
<swiper
|
||||
class="journals-swiper"
|
||||
current="{{currentJournalIndex}}"
|
||||
bindchange="onSwiperChange"
|
||||
bindanimationfinish="onSwiperAnimationFinish"
|
||||
previous-margin="{{0}}"
|
||||
next-margin="{{swiperNextMargin}}"
|
||||
>
|
||||
<block wx:for="{{selectedDate.journals}}" wx:key="id">
|
||||
<swiper-item class="swiper-item-wrapper">
|
||||
<view class="journal-item" data-id="{{item.id}}">
|
||||
<view class="journal-header">
|
||||
<view wx:if="{{item.location}}" class="location">📍 {{item.location}}</view>
|
||||
<view class="time">{{item.time}}</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">
|
||||
<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>
|
||||
</view>
|
||||
Reference in New Issue
Block a user