init: initial commit

This commit is contained in:
Blizzard
2026-02-04 14:02:31 +08:00
commit 6ceda92e9d
2234 changed files with 38231 additions and 0 deletions
+421
View File
@@ -0,0 +1,421 @@
export const MOCK_PLANTS = [
{
id: '1',
name: '龟背竹',
images: ['https://images.unsplash.com/photo-1614594975525-e45190c55d0b?w=400', 'https://images.unsplash.com/photo-1459411552884-841db9b3cc2a?w=400'],
daysPlanted: 45,
adoptionDate: '2025-12-19',
location: '客厅窗边',
scientificName: 'Monstera deliciosa',
family: '天南星科',
genus: '龟背竹属',
description: '龟背竹叶形奇特,孔裂纹状,极像龟背。茎节粗壮又似罗汉竹,深褐色气生根,纵横交错,形如电线。其叶常年碧绿,极为耐阴,是有名的室内大型盆叶植物。',
origin: '墨西哥',
difficulty: '⭐️⭐️',
toxicity: '汁液微毒',
flowerMsg: '健康长寿'
},
{
id: '2',
name: '多肉拼盘',
images: ['https://images.unsplash.com/photo-1459411552884-841db9b3cc2a?w=400', 'https://images.unsplash.com/photo-1599598425947-634fd4b9868f?w=400'],
daysPlanted: 120,
adoptionDate: '2025-10-05',
location: '阳台花架',
scientificName: 'Echeveria spp.',
family: '景天科',
genus: '拟石莲属',
description: '多肉植物凭借其肥厚的叶片和多变的形态深受喜爱。它们储水能力强,喜欢阳光充足、通风良好的环境,是非常适合懒人养护的治愈系植物。',
origin: '美洲/非洲',
difficulty: '⭐️',
toxicity: '无毒',
flowerMsg: '顽强可爱'
},
{
id: '3',
name: '虎皮兰',
images: ['https://images.unsplash.com/photo-1599598425947-634fd4b9868f?w=400', 'https://images.unsplash.com/photo-1614594975525-e45190c55d0b?w=400'],
daysPlanted: 30,
adoptionDate: '2026-01-03',
location: '书房电脑旁',
scientificName: 'Sansevieria trifasciata',
family: '百合科',
genus: '虎尾兰属',
description: '虎皮兰叶片直立,有虎尾状横带斑纹,姿态刚毅,奇特有趣。它对环境的适应能力极强,是公认的空气净化小能手,能昼夜释放氧气。',
origin: '西非',
difficulty: '⭐️',
toxicity: '汁液微毒',
flowerMsg: '坚定刚毅'
},
{
id: '4',
name: '绿萝',
images: ['monstera_plant_1769757312755.png'],
daysPlanted: 10,
adoptionDate: '2026-01-20',
location: '浴室',
scientificName: 'Epipremnum aureum',
family: '天南星科',
genus: '麒麟叶属',
description: '遇水即活,生命力极其顽强,被称为“生命之花”。',
origin: '所罗门群岛',
difficulty: '⭐️',
toxicity: '汁液微毒',
flowerMsg: '守望幸福'
},
{
id: '5',
name: '发财树',
images: ['succulent_garden_1769757406309.png'],
daysPlanted: 200,
adoptionDate: '2025-07-15',
location: '办公室',
scientificName: 'Pachira aquatica',
family: '锦葵科',
genus: '瓜栗属',
description: '株形美观,茎干叶片全年青翠,是十分流行的室内观叶植物。',
origin: '中美洲',
difficulty: '⭐️⭐️',
toxicity: '无毒',
flowerMsg: '招财进宝'
},
{
id: '6',
name: '琴叶榕',
images: ['snake_plant_1769757638773.png'],
daysPlanted: 5,
adoptionDate: '2026-01-25',
location: '客厅角落',
scientificName: 'Ficus lyrata',
family: '桑科',
genus: '榕属',
description: '叶片巨大,形似提琴,极具北欧风情。',
origin: '西非',
difficulty: '⭐️⭐️⭐️',
toxicity: '汁液有毒',
flowerMsg: '和蔼可亲'
},
{
id: '7',
name: '富贵竹',
images: ['monstera_plant_1769757312755.png'],
daysPlanted: 88,
adoptionDate: '2025-11-11',
location: '玄关',
scientificName: 'Dracaena sanderiana',
family: '天门冬科',
genus: '龙血树属',
description: '象征花开富贵、竹报平安。',
origin: '非洲',
difficulty: '⭐️',
toxicity: '无毒',
flowerMsg: '富贵一生'
},
{
id: '8',
name: '吊兰',
images: ['succulent_garden_1769757406309.png'],
daysPlanted: 60,
adoptionDate: '2025-12-01',
location: '厨房',
scientificName: 'Chlorophytum comosum',
family: '天门冬科',
genus: '吊兰属',
description: '空气卫士,能吸收空气中95%的一氧化碳和85%的甲醛。',
origin: '南非',
difficulty: '⭐️',
toxicity: '无毒',
flowerMsg: '无奈而又给人希望'
},
{
id: '9',
name: '常春藤',
images: ['snake_plant_1769757638773.png'],
daysPlanted: 150,
adoptionDate: '2025-09-01',
location: '书架顶部',
scientificName: 'Hedera helix',
family: '五加科',
genus: '常春藤属',
description: '叶形优美,四季常青,是垂直绿化的优良植物。',
origin: '欧洲',
difficulty: '⭐️⭐️',
toxicity: '微毒',
flowerMsg: '结合的爱'
},
{
id: '10',
name: '红掌',
images: ['monstera_plant_1769757312755.png'],
daysPlanted: 40,
adoptionDate: '2025-12-25',
location: '茶几',
scientificName: 'Anthurium andraeanum',
family: '天南星科',
genus: '花烛属',
description: '花期持久,佛焰苞鲜红亮丽,寓意大展宏图。',
origin: '南美洲',
difficulty: '⭐️⭐️⭐️',
toxicity: '汁液有毒',
flowerMsg: '大展宏图'
},
{
id: '11',
name: '白掌',
images: ['succulent_garden_1769757406309.png'],
daysPlanted: 55,
adoptionDate: '2025-12-10',
location: '卫生间',
scientificName: 'Spathiphyllum kochii',
family: '天南星科',
genus: '白鹤芋属',
description: '花叶兼美,清新素雅,能过滤由于氨气和丙酮引起的异味。',
origin: '美洲热带',
difficulty: '⭐️⭐️',
toxicity: '汁液有毒',
flowerMsg: '一帆风顺'
},
{
id: '12',
name: '橡皮树',
images: ['snake_plant_1769757638773.png'],
daysPlanted: 300,
adoptionDate: '2025-04-10',
location: '阳台角',
scientificName: 'Ficus elastica',
family: '桑科',
genus: '榕属',
description: '叶片肥厚黑亮,四季常青,气势雄伟。',
origin: '印度/马来西亚',
difficulty: '⭐️⭐️',
toxicity: '汁液有毒',
flowerMsg: '稳重诚实',
careSchedule: [
{ id: '1', taskName: '浇水', frequencyValue: 10, frequencyUnit: 'day' },
{ id: '2', taskName: '擦拭叶片', frequencyValue: 2, frequencyUnit: 'week' }
]
}
];
export const MOCK_FAVORITES = [
{ id: '1', type: 'plant', name: '龟背竹', image: 'monstera_plant_1769757312755.png', meta: '百科 · 天南星科' },
{ id: '2', type: 'article', name: '晒晒我的多肉拼盘', image: 'succulent_garden_1769757406309.png', meta: '社区 · 多肉资深玩家' },
{ id: '3', type: 'plant', name: '虎皮兰', image: 'snake_plant_1769757638773.png', meta: '百科 · 百合科' },
{ id: '4', type: 'article', name: '龟背竹长出了新叶子', image: 'monstera_plant_1769757312755.png', meta: '社区 · 花房姑娘' },
];
export const MOCK_MY_POSTS = [
{
id: 'p1',
content: '终于把这个小角落布置好了,每天下班看到都很开心。🌱 #阳台花园',
images: ['monstera_plant_1769757312755.png'],
time: '刚刚',
likes: 12,
comments: 2
},
{
id: 'p2',
content: '分享一下我的养护心得,龟背竹真的很好养!',
images: ['monstera_plant_1769757312755.png', 'snake_plant_1769757638773.png'],
time: '3天前',
likes: 45,
comments: 8
},
{
id: 'p3',
content: '新入手的多肉,大家看看怎么样?',
images: ['succulent_garden_1769757406309.png'],
time: '2026-01-25',
likes: 28,
comments: 5
}
];
// 预置养护图标 - 模拟从后端加载
export const CARE_TASK_ICONS = [
{ id: 'water', name: '浇水', icon: 'rain-medium', color: '#2196F3', bgColor: '#E3F2FD' },
{ id: 'fertilize', name: '施肥', icon: 'gift', color: '#8BC34A', bgColor: '#F1F8E9' },
{ id: 'prune', name: '修剪', icon: 'cut', color: '#FF9800', bgColor: '#FFF3E0' },
{ id: 'repot', name: '换盆', icon: 'home', color: '#9C27B0', bgColor: '#F3E5F5' },
{ id: 'resoil', name: '换土', icon: 'load', color: '#757575', bgColor: '#F5F5F5' },
{ id: 'rotate', name: '转盆', icon: 'refresh', color: '#00BCD4', bgColor: '#E0F7FA' },
{ id: 'spray', name: '喷雾', icon: 'cloud', color: '#03A9F4', bgColor: '#E1F5FE' },
{ id: 'check', name: '检查', icon: 'search', color: '#4CAF50', bgColor: '#E8F5E9' },
{ id: 'sun', name: '晒太阳', icon: 'sunny', color: '#FFC107', bgColor: '#FFFDE7' },
{ id: 'move', name: '挪位置', icon: 'location', color: '#E91E63', bgColor: '#FCE4EC' },
{ id: 'medicine', name: '用药', icon: 'heart', color: '#F44336', bgColor: '#FFEBEE' },
{ id: 'other', name: '其他', icon: 'ellipsis', color: '#607D8B', bgColor: '#ECEFF1' },
];
export const MOCK_BADGES = [
{ id: 'b1', name: '初级园丁', desc: '累计种植 1 棵植物', icon: 'medal', color: '#4CAF50', unlocked: true },
{ id: 'b2', name: '植物达人', desc: '累计种植 10 棵植物', icon: 'crown', color: '#FFD700', unlocked: true, progress: '12/10' },
{ id: 'b3', name: '浇水冠军', desc: '完成 100 次浇水任务', icon: 'zap', color: '#2196F3', unlocked: true, progress: '156/100' },
{ id: 'b4', name: '全勤奖', desc: '连续 30 天打卡', icon: 'shield', color: '#9C27B0', unlocked: false, progress: '12/30' },
{ id: 'b5', name: '博学家', desc: '阅读 20 篇植物百科', icon: 'book-open', color: '#FF5722', unlocked: false, progress: '8/20' },
{ id: 'b6', name: '社交之星', desc: '获得 50 个赞', icon: 'heart', color: '#E91E63', unlocked: false, progress: '42/50' },
];
export const MOCK_TASKS_DATA = [
{ id: '1', plantName: '龟背竹', plantImage: 'monstera_plant_1769757312755.png', taskType: 'water', taskIcon: { icon: 'water', color: '#2196F3', bgColor: '#E3F2FD' }, dueDate: '今天', isOverdue: false },
{ id: '1-2', plantName: '龟背竹', plantImage: 'monstera_plant_1769757312755.png', taskType: 'fertilize', taskIcon: { icon: 'gift', color: '#8BC34A', bgColor: '#F1F8E9' }, dueDate: '今天', isOverdue: false },
{ id: '2', plantName: '虎皮兰', plantImage: 'snake_plant_1769757638773.png', taskType: 'fertilize', taskIcon: { icon: 'gift', color: '#8BC34A', bgColor: '#F1F8E9' }, dueDate: '2天前', isOverdue: true, overdueDays: 2 },
{ id: '3', plantName: '多肉拼盘', plantImage: 'succulent_garden_1769757406309.png', taskType: 'repot', taskIcon: { icon: 'home', color: '#9C27B0', bgColor: '#F3E5F5' }, dueDate: '今天', isOverdue: false },
{ id: '4', plantName: '天堂鸟', taskType: 'prune', taskIcon: { icon: 'cut', color: '#FF9800', bgColor: '#FFF3E0' }, dueDate: '5天前', isOverdue: true, overdueDays: 5 },
{ id: '4-2', plantName: '天堂鸟', taskType: 'water', taskIcon: { icon: 'water', color: '#2196F3', bgColor: '#E3F2FD' }, dueDate: '今天', isOverdue: false },
{ id: '5', plantName: '绿萝', plantImage: 'monstera_plant_1769757312755.png', taskType: 'water', taskIcon: { icon: 'water', color: '#2196F3', bgColor: '#E3F2FD' }, dueDate: '今天', isOverdue: false },
{ id: '5-2', plantName: '绿萝', plantImage: 'monstera_plant_1769757312755.png', taskType: 'prune', taskIcon: { icon: 'cut', color: '#FF9800', bgColor: '#FFF3E0' }, dueDate: '今天', isOverdue: false },
{ id: '6', plantName: '吊兰', plantImage: 'snake_plant_1769757638773.png', taskType: 'water', taskIcon: { icon: 'water', color: '#2196F3', bgColor: '#E3F2FD' }, dueDate: '1天前', isOverdue: true, overdueDays: 1 },
{ id: '6-2', plantName: '吊兰', plantImage: 'snake_plant_1769757638773.png', taskType: 'spray', taskIcon: { icon: 'cloud', color: '#03A9F4', bgColor: '#E1F5FE' }, dueDate: '今天', isOverdue: false },
{ id: '7', plantName: '仙人掌', plantImage: 'succulent_garden_1769757406309.png', taskType: 'repot', taskIcon: { icon: 'home', color: '#9C27B0', bgColor: '#F3E5F5' }, dueDate: '3天前', isOverdue: true, overdueDays: 3 },
{ id: '8', plantName: '发财树', taskType: 'water', taskIcon: { icon: 'water', color: '#2196F3', bgColor: '#E3F2FD' }, dueDate: '今天', isOverdue: false },
{ id: '8-2', plantName: '发财树', taskType: 'clean', taskIcon: { icon: 'browse', color: '#607D8B', bgColor: '#ECEFF1' }, dueDate: '今天', isOverdue: false },
{ id: '9', plantName: '橡皮树', plantImage: 'monstera_plant_1769757312755.png', taskType: 'sun', taskIcon: { icon: 'sunny', color: '#FFC107', bgColor: '#FFFDE7' }, dueDate: '今天', isOverdue: false },
{ id: '10', plantName: '芦荟', plantImage: 'succulent_garden_1769757406309.png', taskType: 'water', taskIcon: { icon: 'water', color: '#2196F3', bgColor: '#E3F2FD' }, dueDate: '2天前', isOverdue: true, overdueDays: 2 },
{ id: '10-2', plantName: '芦荟', plantImage: 'succulent_garden_1769757406309.png', taskType: 'rotate', taskIcon: { icon: 'refresh', color: '#00BCD4', bgColor: '#E0F7FA' }, dueDate: '今天', isOverdue: false },
{ id: '11', plantName: '文竹', taskType: 'spray', taskIcon: { icon: 'cloud', color: '#03A9F4', bgColor: '#E1F5FE' }, dueDate: '今天', isOverdue: false },
{ id: '11-2', plantName: '文竹', taskType: 'prune', taskIcon: { icon: 'cut', color: '#FF9800', bgColor: '#FFF3E0' }, dueDate: '今天', isOverdue: false },
{ id: '12', plantName: '常春藤', plantImage: 'snake_plant_1769757638773.png', taskType: 'check', taskIcon: { icon: 'search', color: '#4CAF50', bgColor: '#E8F5E9' }, dueDate: '4天前', isOverdue: true, overdueDays: 4 },
];
export const MOCK_POSTS = [
{
id: '1',
user: '花房姑娘',
content: '今天天气真好,家里的龟背竹长出了新叶子!🌿 看着它们一点点长大,心里充满了成就感。大家周末都在做什么呢?',
images: ['monstera_plant_1769757312755.png', 'succulent_garden_1769757406309.png', 'snake_plant_1769757638773.png'],
time: '2小时前',
likes: ['植欲生活', '多肉资深玩家', '阳台园艺家'],
comments: [
{ id: 'c1', user: '植欲生活', content: '新叶子太可爱了!' },
{ id: 'c2', user: '多肉资深玩家', content: '我也想养一盆龟背竹了' }
]
},
{
id: '2',
user: '多肉资深玩家',
content: '晒晒我的多肉拼盘,是不是很治愈?✨ 最近入坑了好多新品种,完全停不下来。',
images: ['succulent_garden_1769757406309.png'],
time: '5小时前',
likes: ['花房姑娘', 'Alice'],
comments: []
},
{
id: '3',
user: '植欲生活',
content: '分享一些养护小知识:虎皮兰真的超级耐旱,半个月浇一次水就足够了。适合懒人养!💧',
images: ['snake_plant_1769757638773.png', 'monstera_plant_1769757312755.png'],
time: '昨天',
likes: ['阳台园艺家'],
comments: [
{ id: 'c3', user: '新手花农', content: '学到了,谢谢分享!' }
]
},
{
id: '4',
user: '我的花园',
content: '终于把这个小角落布置好了,每天下班看到都很开心。🌱 #阳台花园',
images: ['monstera_plant_1769757312755.png'],
time: '刚刚',
likes: [],
comments: []
}
];
export const MOCK_WIKI = [
{
id: '1',
name: '龟背竹',
scientificName: 'Monstera deliciosa',
family: '天南星科',
alias: ['蓬莱蕉', '铁丝兰'],
images: ['monstera_plant_1769757312755.png', 'succulent_garden_1769757406309.png'],
category: '观叶植物',
difficulty: 'Easy',
origin: '墨西哥及中美洲热带雨林',
description: '龟背竹是天南星科龟背竹属的多年生常绿灌木,因其叶片形状奇特,裂纹状似龟背而得名。它不仅观赏价值极高,还具有极强的空气净化能力,能有效吸收甲醛等有害气体,被称为天然的"清道夫"。',
light: {
level: 'Medium',
description: '喜欢明亮的散射光,忌强光直射。夏季需遮阴,冬季可适当增加光照。光照不足会导致叶片开裂少,叶柄细长。'
},
water: {
frequency: '每周1-2次',
description: '保持土壤湿润但不过湿。夏季需经常向叶面喷水增加湿度。冬季减少浇水,保持盆土微干。'
},
soil: '疏松肥沃、排水良好的微酸性腐叶土或泥炭土。',
temperature: '20-30℃,生长适温。冬季需保持在5℃以上。',
humidity: '60%-80%,喜高湿环境。',
fertilizer: '生长季(4-9月)每半月施一次稀薄液肥。',
toxicity: '汁液有轻微毒性,误食可能引起口腔刺痛,触碰汁液后应洗手。',
commonPests: ['介壳虫', '红蜘蛛'],
careTips: [
'定期用湿布擦拭叶片,保持叶面清洁亮泽。',
'气根对于吸收水分和支撑植株很重要,不要轻易剪除,可引导其进入土中。',
'每1-2年换盆一次,有利于根系生长。'
]
},
{
id: '2',
name: '虎皮兰',
scientificName: 'Sansevieria trifasciata',
family: '百合科',
alias: ['虎尾兰', '千岁兰'],
images: ['snake_plant_1769757638773.png', 'monstera_plant_1769757312755.png'],
category: '净化空气',
difficulty: 'Easy',
origin: '西非热带地区',
description: '虎皮兰是百合科虎尾兰属的多年生草本植物。它生命力极强,对环境适应性好,能释放大量氧气,尤其是在夜间,非常适合摆放在卧室。',
light: {
level: 'Low',
description: '对光照适应性强,耐阴,也耐强光。但长期在阴暗处生长,叶片斑纹会变淡。'
},
water: {
frequency: '每2周1次',
description: '极其耐旱,宁干勿湿。盆土完全干透再浇水。冬季休眠期严格控制浇水。'
},
soil: '透气性极佳的沙质土壤。',
temperature: '20-30℃。不耐寒,冬季室内温度不低于10℃。',
humidity: '对湿度无特殊要求,耐干燥。',
fertilizer: '生长季每月施一次复合肥即可,忌浓肥。',
toxicity: '有微毒,避免宠物误食。',
commonPests: ['炭疽病', '软腐病'],
careTips: [
'最怕积水,浇水过多容易烂根。',
'根系不发达,建议使用浅盆种植。',
'由于叶片厚重,高植株建议用重盆以免翻倒。'
]
},
{
id: '3',
name: '月季',
scientificName: 'Rosa chinensis',
family: '蔷薇科',
alias: ['月月红', '长春花'],
images: ['lavender_pot_1769757638773.png', 'succulent_garden_1769757406309.png'],
category: '观花植物',
difficulty: 'Medium',
origin: '中国',
description: '月季花被称为"花中皇后",四季开花,花色丰富,芳香宜人。它是中国十大名花之一,也是世界各地广泛栽培的园艺植物。',
light: {
level: 'High',
description: '喜阳光充足,每天至少需要6小时直射光。光照不足会导致开花少、花朵小、香味淡。'
},
water: {
frequency: '见干见湿',
description: '生长期保持土壤湿润,不可积水。夏季早晚各浇一次,冬季减少浇水。'
},
soil: '富含有机质、排水良好的微酸性土壤。',
temperature: '15-26℃。较耐寒,部分品种可耐-15℃低温。',
humidity: '喜通风良好环境,避免闷热潮湿,易生病。',
fertilizer: '喜肥,勤施薄肥。萌芽期、花蕾期需追肥,花后及时修剪并补肥。',
toxicity: '无毒。',
commonPests: ['蚜虫', '白粉病', '黑斑病'],
careTips: [
'勤修剪是养好月季的关键,花后及时剪去残花。',
'注意通风,定期喷洒杀菌剂预防病害。',
'冬季进行重剪,利于来年株型和开花。'
]
}
];
+11
View File
@@ -0,0 +1,11 @@
var resolvePath = function(path) {
if (!path) return '';
if (path.indexOf('http') === 0 || path.indexOf('wxfile') === 0) {
return path;
}
return '/assets/' + path;
}
module.exports = {
resolvePath: resolvePath
};