feat: 调整样式

This commit is contained in:
Blizzard
2026-02-14 11:31:44 +08:00
parent cbbe82ef63
commit d6f781a666
42 changed files with 827 additions and 293 deletions
+2 -2
View File
@@ -22,8 +22,8 @@ Page({
showActionSheet: false,
actionSheetItems: [
{ label: '拍', value: 'camera' },
{ label: '从手机相册选取', value: 'album' }
{ label: '拍', value: 'camera' },
{ label: '从相册选取', value: 'album' }
],
careTaskIcons: [],
+4 -7
View File
@@ -1,5 +1,6 @@
// pages/plant-detail/index.js
import request from '../../utils/request';
import { calculateDaysSince, getPlantAgeBadge } from '../../utils/dateUtil';
Page({
data: {
@@ -53,14 +54,9 @@ Page({
// Calculate days planted and format date
let adoptionDate = '未知';
let daysPlanted = 0;
const daysPlanted = calculateDaysSince(plant.plantTime);
const ageBadge = getPlantAgeBadge(daysPlanted);
if (plant.plantTime) {
const start = new Date(plant.plantTime);
const now = new Date();
const diffTime = now - start;
if (diffTime > 0) {
daysPlanted = Math.floor(diffTime / (1000 * 60 * 60 * 24));
}
adoptionDate = plant.plantTime.split('T')[0];
}
@@ -70,6 +66,7 @@ Page({
location: plant.placement || '',
adoptionDate: adoptionDate,
daysPlanted: daysPlanted,
ageBadge: ageBadge,
careSchedule: carePlans
},
swiperImages: swiperImages,
+4 -1
View File
@@ -54,12 +54,15 @@
<view class="archive-view fadeIn">
<view class="archive-identity-card">
<view class="aic-header">
<view class="aic-badge">🏆 元老级植物</view>
<view class="aic-badge">{{currentPlant.ageBadge.icon || '🌱'}} {{currentPlant.ageBadge.title || '植物新人'}}</view>
<view class="aic-location">
<t-icon name="location" size="28rpx" color="#388E3C" />
<text>{{currentPlant.location || '位置未定'}}</text>
</view>
</view>
<view class="aic-desc-box">
<text>{{currentPlant.ageBadge.desc}}</text>
</view>
<view class="aic-stats">
<view class="aic-stat-item">
<text class="label">入家时间</text>
+11
View File
@@ -343,6 +343,17 @@ page {
gap: 8rpx;
}
.aic-desc-box {
background: #F1F8E9;
padding: 24rpx;
border-radius: 24rpx;
font-size: 26rpx;
color: #33691E;
line-height: 1.5;
text-align: left;
margin-bottom: 32rpx;
}
.aic-stats {
display: flex;
justify-content: space-between;