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
@@ -23,8 +23,8 @@ Page({
showActionSheet: false,
actionSheetItems: [
{ label: '拍', value: 'camera' },
{ label: '从手机相册选取', value: 'album' }
{ label: '拍', value: 'camera' },
{ label: '从相册选取', value: 'album' }
],
// Icon picker
+2 -11
View File
@@ -1,5 +1,6 @@
// pages/garden/index.js
import request from '../../utils/request';
import { calculateDaysSince } from '../../utils/dateUtil';
Page({
data: {
@@ -71,17 +72,7 @@ Page({
}
// Calculate days
let days = 1;
if (item.plantTime) {
try {
const start = new Date(item.plantTime).getTime();
const now = Date.now();
const diff = now - start;
if (diff > 0) {
days = Math.ceil(diff / (1000 * 60 * 60 * 24));
}
} catch (e) { }
}
const days = calculateDaysSince(item.plantTime);
return { ...item, images: [imageUrl], daysPlanted: days };
});