feat: 任务和社区页面
This commit is contained in:
@@ -50,30 +50,35 @@
|
||||
>
|
||||
<view class="care-view fadeIn">
|
||||
<view class="section-title">
|
||||
<text class="h3">养护历史</text>
|
||||
<text class="h3">养护记录</text>
|
||||
</view>
|
||||
|
||||
<view class="care-log-list">
|
||||
<view wx:for="{{displayCareLogs}}" wx:key="id" class="care-log-item">
|
||||
<view class="log-left">
|
||||
<view class="log-date-v">
|
||||
<text class="l-day">{{item.day}}</text>
|
||||
<text class="l-month">{{item.month}}月</text>
|
||||
</view>
|
||||
<view class="log-type-icon {{item.type === 'water' ? 'icon-water' : (item.type === 'fertilize' ? 'icon-fertilize' : (item.type === 'prune' ? 'icon-prune' : 'icon-repot'))}}">
|
||||
<t-icon wx:if="{{item.type === 'water'}}" name="heart" size="36rpx" color="#2196F3" />
|
||||
<t-icon wx:elif="{{item.type === 'fertilize'}}" name="app" size="36rpx" color="#FFD700" />
|
||||
<t-icon wx:elif="{{item.type === 'prune'}}" name="cut" size="36rpx" color="#757575" />
|
||||
<t-icon wx:else name="assignment" size="36rpx" color="#8D6E63" />
|
||||
</view>
|
||||
<view class="log-info">
|
||||
<view class="log-header-row">
|
||||
<text class="log-type-name">{{item.typeLabel}}</text>
|
||||
<text class="log-time">{{item.time}}</text>
|
||||
<block wx:if="{{displayCareLogs && displayCareLogs.length > 0}}">
|
||||
<view wx:for="{{displayCareLogs}}" wx:key="id" class="care-log-item">
|
||||
<view class="log-left">
|
||||
<view class="log-date-v">
|
||||
<text class="l-day">{{item.day}}</text>
|
||||
<text class="l-month">{{item.month}}月</text>
|
||||
</view>
|
||||
<view class="log-type-icon" style="background-color: {{item.iconBgColor || '#EFEBE9'}};">
|
||||
<t-icon name="{{item.taskIcon}}" size="36rpx" color="{{item.iconColor || '#8D6E63'}}" />
|
||||
</view>
|
||||
<view class="log-info">
|
||||
<view class="log-header-row">
|
||||
<text class="log-type-name">{{item.typeLabel}}</text>
|
||||
<text class="log-time">{{item.time}}</text>
|
||||
</view>
|
||||
<text wx:if="{{item.remark}}" class="log-remark">{{item.remark}}</text>
|
||||
</view>
|
||||
<text wx:if="{{item.remark}}" class="log-remark">{{item.remark}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view wx:else class="plant-empty-state">
|
||||
<view class="plant-empty-text">
|
||||
<text>暂无养护记录</text>
|
||||
<text>快去给它浇浇水吧~ 💧</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -114,7 +119,27 @@
|
||||
</view>
|
||||
<view class="aic-stat-item">
|
||||
<text class="label">养护次数</text>
|
||||
<text class="value">{{careLogs.length}} 次</text>
|
||||
<text class="value">{{careLogs.length || 0}} 次</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- New detail fields -->
|
||||
<view class="aic-extra-info">
|
||||
<view wx:if="{{currentPlant.potMaterial}}" class="aic-info-row">
|
||||
<text class="label">花园材质:</text>
|
||||
<text class="value">{{currentPlant.potMaterial}}</text>
|
||||
</view>
|
||||
<view wx:if="{{currentPlant.potSize}}" class="aic-info-row">
|
||||
<text class="label">花园大小:</text>
|
||||
<text class="value">{{currentPlant.potSize}}</text>
|
||||
</view>
|
||||
<view wx:if="{{currentPlant.sunlight}}" class="aic-info-row">
|
||||
<text class="label">光照条件:</text>
|
||||
<text class="value">{{currentPlant.sunlight}}</text>
|
||||
</view>
|
||||
<view wx:if="{{currentPlant.plantingMaterial}}" class="aic-info-row">
|
||||
<text class="label">植料土壤:</text>
|
||||
<text class="value">{{currentPlant.plantingMaterial}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -127,30 +152,38 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="archive-timeline">
|
||||
<view wx:for="{{displayRecords}}" wx:key="id" class="timeline-item">
|
||||
<view class="timeline-dot"></view>
|
||||
<text class="timeline-date">{{item.date}}</text>
|
||||
<view class="timeline-content-box">
|
||||
<view class="timeline-title">
|
||||
<t-icon wx:if="{{item.type === 'growth'}}" name="thumb-up" size="32rpx" color="#4CAF50" />
|
||||
<t-icon wx:elif="{{item.type === 'repot'}}" name="swap" size="32rpx" color="#FF9800" />
|
||||
<t-icon wx:elif="{{item.type === 'pest'}}" name="error-circle" size="32rpx" color="#F44336" />
|
||||
<t-icon wx:else name="file" size="32rpx" color="#2196F3" />
|
||||
<text>{{item.title}}</text>
|
||||
<block wx:if="{{displayRecords && displayRecords.length > 0}}">
|
||||
<view class="archive-timeline">
|
||||
<view wx:for="{{displayRecords}}" wx:key="id" class="timeline-item">
|
||||
<view class="timeline-dot"></view>
|
||||
<text class="timeline-date">{{item.date}}</text>
|
||||
<view class="timeline-content-box">
|
||||
<view class="timeline-title">
|
||||
<t-icon wx:if="{{item.type === 'growth'}}" name="thumb-up" size="32rpx" color="#4CAF50" />
|
||||
<t-icon wx:elif="{{item.type === 'repot'}}" name="swap" size="32rpx" color="#FF9800" />
|
||||
<t-icon wx:elif="{{item.type === 'pest'}}" name="error-circle" size="32rpx" color="#F44336" />
|
||||
<t-icon wx:else name="file" size="32rpx" color="#2196F3" />
|
||||
<text>{{item.title}}</text>
|
||||
</view>
|
||||
<text class="timeline-desc">{{item.content}}</text>
|
||||
<t-image
|
||||
wx:if="{{item.image}}"
|
||||
src="{{item.image}}"
|
||||
mode="widthFix"
|
||||
width="100%"
|
||||
class="timeline-img"
|
||||
bindtap="handlePreviewRecordImage"
|
||||
data-src="{{item.image}}"
|
||||
/>
|
||||
</view>
|
||||
<text class="timeline-desc">{{item.content}}</text>
|
||||
<t-image
|
||||
wx:if="{{item.image}}"
|
||||
src="{{tools.resolvePath(item.image)}}"
|
||||
mode="widthFix"
|
||||
width="100%"
|
||||
class="timeline-img"
|
||||
bindtap="handlePreviewRecordImage"
|
||||
data-src="{{item.image}}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view wx:else class="plant-empty-state">
|
||||
<view class="plant-empty-text">
|
||||
<text>暂无成长记录</text>
|
||||
<text>记录下它的每一个精彩瞬间吧 📸</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<block wx:if="{{records.length > displayRecordLimit}}">
|
||||
|
||||
Reference in New Issue
Block a user