From 7830a6ebbdf5b20319ae35ac864ba489678d2f13 Mon Sep 17 00:00:00 2001 From: yvan <8574526@qq.com> Date: Wed, 13 Aug 2025 15:01:36 +0800 Subject: [PATCH] 1 --- html/layout01-horizontal-carousel.html | 630 ------------------ html/layout04-large-carousel.html | 756 ---------------------- html/layout05-tab-switch.html | 852 ------------------------- html/layout11-horizontal-scroll.html | 616 ------------------ html/layout2-dashboard-tabs.html | 798 ----------------------- html/layout7-multi-pet-carousel.html | 579 ----------------- html/layout8-pet-dashboard.html | 593 ----------------- pages/pets/pets.vue | 205 +++++- prompts/宠物小程序开发助手_优化版.md | 2 - 9 files changed, 182 insertions(+), 4849 deletions(-) delete mode 100644 html/layout01-horizontal-carousel.html delete mode 100644 html/layout04-large-carousel.html delete mode 100644 html/layout05-tab-switch.html delete mode 100644 html/layout11-horizontal-scroll.html delete mode 100644 html/layout2-dashboard-tabs.html delete mode 100644 html/layout7-multi-pet-carousel.html delete mode 100644 html/layout8-pet-dashboard.html diff --git a/html/layout01-horizontal-carousel.html b/html/layout01-horizontal-carousel.html deleted file mode 100644 index e3531f0..0000000 --- a/html/layout01-horizontal-carousel.html +++ /dev/null @@ -1,630 +0,0 @@ - - - - - - 方案1:横向轮播卡片式 - - - -
-
-

🏠 宠物之家

-

4只毛孩子的温馨日常

-
-
- - -
-
- - - -
-
📊 家庭概览
-
-
-
190
-
总记录数
-
-
-
¥2,340
-
本月消费
-
-
-
5
-
待办提醒
-
-
-
3
-
家庭成员
-
-
- -
- - - - -
-
- -
-
⏰ 最近活动
-
-
🐱
-
-
小橘完成了今天的早餐
-
2小时前 · 日常记录
-
-
饮食
-
-
-
🐶
-
-
小白外出散步30分钟
-
3小时前 · 日常记录
-
-
运动
-
-
-
🐰
-
-
小灰吃了新鲜胡萝卜
-
5小时前 · 随手记
-
-
饮食
-
-
- -
-
🤖 AI助手
-
- 根据记录分析,小橘今天的活动量比平时少,建议增加一些互动游戏时间。 -
-
- - -
-
- - - - diff --git a/html/layout04-large-carousel.html b/html/layout04-large-carousel.html deleted file mode 100644 index 3154015..0000000 --- a/html/layout04-large-carousel.html +++ /dev/null @@ -1,756 +0,0 @@ - - - - - - 方案4:轮播大卡片式 - - - -
-
-

🎡 宠物轮播

-

沉浸式宠物展示体验

-
-
- - -
-
- - - - - -
-
📊 家庭概览
-
-
-
190
-
总记录数
-
-
-
¥1,590
-
本月消费
-
-
-
3
-
家庭成员
-
-
-
5
-
待办提醒
-
-
-
- - - - -
-
- -
-
-
⏰ 最近活动
- -
-
-
-
🐱
-
-
小橘完成了今天的早餐
-
2小时前 · 日常记录
-
-
饮食
-
-
-
🐶
-
-
小白外出散步30分钟
-
3小时前 · 日常记录
-
-
运动
-
-
-
🐰
-
-
小灰吃了新鲜胡萝卜
-
5小时前 · 随手记
-
-
饮食
-
-
-
- -
-
- 🤖 -
AI助手建议
-
-
- 根据分析,小橘今天的活动量比平时少15%,建议增加互动游戏时间。小白的散步规律很好,继续保持! -
-
- - -
-
- - - - - - diff --git a/html/layout05-tab-switch.html b/html/layout05-tab-switch.html deleted file mode 100644 index cf51b06..0000000 --- a/html/layout05-tab-switch.html +++ /dev/null @@ -1,852 +0,0 @@ - - - - - - 方案5:标签切换式 - - - -
-
-

🏷️ 宠物标签

-

快速切换宠物详情

-
-
- - -
-
- -
-
- - - - -
- -
- -
-
-
- 🐱 -
-
-
小橘
-
橘猫 · 2岁 · 陪伴365天
-
- 活泼 - 粘人 - 健康 -
-
- -
-
- ⚖️ -
4.5kg
-
当前体重
-
-
- 📝 -
89
-
记录数量
-
-
- 💰 -
¥580
-
本月消费
-
-
- -
- - - - -
- -
-
⏰ 最近活动
-
-
-
-
完成了今天的早餐
-
2小时前
-
-
饮食
-
-
-
-
-
和主人玩了15分钟
-
4小时前
-
-
互动
-
-
-
-
-
午睡了2小时
-
6小时前
-
-
休息
-
-
- -
-
❤️ 健康状态
-
-
-
优秀
-
整体健康
-
-
-
正常
-
活动水平
-
-
-
良好
-
食欲状态
-
-
-
稳定
-
情绪状态
-
-
-
-
- - -
-
-
- 🐶 -
-
-
小白
-
金毛 · 3岁 · 陪伴1095天
-
- 温顺 - 忠诚 - 健康 -
-
- -
-
- ⚖️ -
25kg
-
当前体重
-
-
- 📝 -
67
-
记录数量
-
-
- 💰 -
¥890
-
本月消费
-
-
- -
- - - - -
- -
-
⏰ 最近活动
-
-
-
-
外出散步30分钟
-
1小时前
-
-
运动
-
-
-
-
-
完成了午餐
-
3小时前
-
-
饮食
-
-
- -
-
❤️ 健康状态
-
-
-
优秀
-
整体健康
-
-
-
活跃
-
活动水平
-
-
-
良好
-
食欲状态
-
-
-
愉快
-
情绪状态
-
-
-
-
- - -
-
-
- 🐰 -
-
-
小灰
-
垂耳兔 · 1岁 · 陪伴180天
-
- 安静 - 可爱 - 健康 -
-
- -
-
- ⚖️ -
1.2kg
-
当前体重
-
-
- 📝 -
34
-
记录数量
-
-
- 💰 -
¥120
-
本月消费
-
-
- -
- - - - -
- -
-
⏰ 最近活动
-
-
-
-
吃了新鲜胡萝卜
-
1小时前
-
-
饮食
-
-
-
-
-
在笼子里活动
-
2小时前
-
-
运动
-
-
- -
-
❤️ 健康状态
-
-
-
良好
-
整体健康
-
-
-
正常
-
活动水平
-
-
-
良好
-
食欲状态
-
-
-
平静
-
情绪状态
-
-
-
-
-
-
- -
-
📊 家庭概览
-
-
-
190
-
总记录数
-
-
-
¥1,590
-
本月消费
-
-
-
3
-
家庭成员
-
-
-
5
-
待办提醒
-
-
-
- - - - -
-
- - - - - - diff --git a/html/layout11-horizontal-scroll.html b/html/layout11-horizontal-scroll.html deleted file mode 100644 index 66a281f..0000000 --- a/html/layout11-horizontal-scroll.html +++ /dev/null @@ -1,616 +0,0 @@ - - - - - - 方案11:横向滑动卡片式 - - - -
-
-

🏠 宠物之家

-

4只毛孩子的温馨日常

-
- -
- -
-
-
-
-
- 🐱 -
💚
-
-
-

小橘

-

橘猫 · 2岁 · 陪伴365天

-
- 活泼 - 粘人 -
-
-
-
-
- 4.5kg - 体重 -
-
- 89 - 记录 -
-
- 健康 - 状态 -
-
-
- - - -
-
- -
-
-
- 🐶 -
💚
-
-
-

小白

-

金毛 · 3岁 · 陪伴1095天

-
- 温顺 - 忠诚 -
-
-
-
-
- 25kg - 体重 -
-
- 67 - 记录 -
-
- 健康 - 状态 -
-
-
- - - -
-
- -
-
-
- 🐰 -
💚
-
-
-

小灰

-

垂耳兔 · 1岁 · 陪伴180天

-
- 安静 - 可爱 -
-
-
-
-
- 1.2kg - 体重 -
-
- 34 - 记录 -
-
- 健康 - 状态 -
-
-
- - - -
-
- -
- -
添加新宠物
-
-
-
- -
-
📊 家庭概览
-
-
-
190
-
总记录数
-
-
-
¥2,340
-
本月消费
-
-
-
5
-
待办提醒
-
-
-
3
-
家庭成员
-
-
- -
- - - - -
-
- -
-
⏰ 最近活动
-
-
🐱
-
-
小橘完成了今天的早餐
-
2小时前 · 日常记录
-
-
饮食
-
-
-
🐶
-
-
小白外出散步30分钟
-
3小时前 · 日常记录
-
-
运动
-
-
-
🐰
-
-
小灰吃了新鲜胡萝卜
-
5小时前 · 随手记
-
-
饮食
-
-
- -
-
🤖 AI助手
-
- 根据记录分析,小橘今天的活动量比平时少,建议增加一些互动游戏时间。 -
-
- - -
-
- - - - diff --git a/html/layout2-dashboard-tabs.html b/html/layout2-dashboard-tabs.html deleted file mode 100644 index 839cabe..0000000 --- a/html/layout2-dashboard-tabs.html +++ /dev/null @@ -1,798 +0,0 @@ - - - - - - 宠物标签切换式仪表盘 - - - -
-
-

🏷️ 宠物仪表盘

-

标签切换式数据管理

-
-
- - -
-
- -
-
- - - - -
- -
- -
-
-
- 🐱 -
-
-
小橘
-
橘猫 · 2岁 · 陪伴365天
-
- 活泼 - 粘人 - 健康 -
-
- -
-
- ⚖️ -
4.5kg
-
当前体重
-
↗ +0.2kg
-
-
- 📝 -
89
-
记录数量
-
↗ +12
-
-
- 💰 -
¥580
-
本月消费
-
↘ -¥50
-
-
- -
-
📊 健康指标
-
-
- ❤️ - 整体健康 -
-
-
-
-
-
-
- 🏃 - 活动水平 -
-
-
-
-
-
-
- 🍽️ - 食欲状态 -
-
-
-
-
-
-
- 😊 - 快乐指数 -
-
-
-
-
-
- -
-
🔔 重要提醒
-
- 💉 - 疫苗接种提醒 - 3天后 -
-
- 🏥 - 定期体检 - 1周后 -
-
-
- - -
-
-
- 🐶 -
-
-
小白
-
金毛 · 3岁 · 陪伴1095天
-
- 温顺 - 忠诚 - 健康 -
-
- -
-
- ⚖️ -
25kg
-
当前体重
-
→ 稳定
-
-
- 📝 -
67
-
记录数量
-
↗ +8
-
-
- 💰 -
¥890
-
本月消费
-
↗ +¥120
-
-
- -
-
📊 健康指标
-
-
- ❤️ - 整体健康 -
-
-
-
-
-
-
- 🏃 - 活动水平 -
-
-
-
-
-
-
- 🍽️ - 食欲状态 -
-
-
-
-
-
-
- 😊 - 快乐指数 -
-
-
-
-
-
- -
-
🔔 重要提醒
-
- 🦷 - 牙齿清洁 - 明天 -
-
-
- - -
-
-
- 🐰 -
-
-
小灰
-
垂耳兔 · 1岁 · 陪伴180天
-
- 安静 - 可爱 - 健康 -
-
- -
-
- ⚖️ -
1.2kg
-
当前体重
-
↗ +0.1kg
-
-
- 📝 -
34
-
记录数量
-
↗ +5
-
-
- 💰 -
¥120
-
本月消费
-
→ 稳定
-
-
- -
-
📊 健康指标
-
-
- ❤️ - 整体健康 -
-
-
-
-
-
-
- 🏃 - 活动水平 -
-
-
-
-
-
-
- 🍽️ - 食欲状态 -
-
-
-
-
-
-
- 😊 - 快乐指数 -
-
-
-
-
-
- -
-
🔔 重要提醒
-
- 🥕 - 补充新鲜蔬菜 - 今天 -
-
-
-
-
- -
-
📊 家庭概览
-
-
-
190
-
总记录数
-
-
-
¥1,590
-
本月消费
-
-
-
3
-
家庭成员
-
-
-
5
-
待办提醒
-
-
-
- - - - -
-
- - - - - - diff --git a/html/layout7-multi-pet-carousel.html b/html/layout7-multi-pet-carousel.html deleted file mode 100644 index 1e8fb84..0000000 --- a/html/layout7-multi-pet-carousel.html +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - 方案7:多宠物轮播式布局 - - - -
-
-

🏠 我的宠物家庭

-

3只毛孩子的温馨日常

-
-
+
-
- - - - - -
-
📊 家庭概览
-
- 总记录数 - 190条 -
-
- 本月新增 - 23条 -
-
- 待办提醒 - 5项 -
-
- 健康状态 - 全部良好 -
-
- -
-
⏰ 最近动态
-
-
🐱
-
-
小橘完成了今天的早餐
-
2小时前
-
-
-
-
🐶
-
-
小白外出散步30分钟
-
3小时前
-
-
-
-
🐰
-
-
小灰吃了新鲜的胡萝卜
-
5小时前
-
-
-
- -
- - - -
- - diff --git a/html/layout8-pet-dashboard.html b/html/layout8-pet-dashboard.html deleted file mode 100644 index b6eef6b..0000000 --- a/html/layout8-pet-dashboard.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - 方案8:宠物仪表盘聚合式 - - - -
-
-
-
🏠 宠物管家
-
3只毛孩子的智能管理
-
- -
-
-
-
🐱
-
小橘
-
健康
-
-
-
🐶
-
小白
-
活跃
-
-
-
🐰
-
小灰
-
安静
-
-
-
-
添加
-
新宠物
-
-
-
- -
-
📊 家庭数据概览
-
-
- 📝 -
190
-
总记录数
-
-
- 📅 -
1640
-
陪伴天数
-
-
- 💚 -
100%
-
健康率
-
-
- 🎯 -
23
-
本月记录
-
-
-
- -
-
🎯 今日重点
-
-
- 🍽️ -
早餐完成
-
3/3只已用餐
-
-
- 🚶 -
遛弯计划
-
小白待遛弯
-
-
- 💊 -
用药提醒
-
小橘驱虫药
-
-
- 🛁 -
洗澡安排
-
本周计划
-
-
-
- -
- - - - -
- -
-
⏰ 活动流
-
-
-
-
🐱
-
小橘完成早餐
-
2小时前
-
-
-
-
-
🐶
-
小白外出散步
-
3小时前
-
-
-
-
-
🐰
-
小灰吃胡萝卜
-
4小时前
-
-
-
-
- -
-
🔔 健康提醒
-
-
💊
-
-
小橘驱虫药到期
-
明天
-
-
-
-
💉
-
-
小白疫苗接种
-
下周
-
-
-
- - - - diff --git a/pages/pets/pets.vue b/pages/pets/pets.vue index dc51cd8..85c9e75 100644 --- a/pages/pets/pets.vue +++ b/pages/pets/pets.vue @@ -3,17 +3,26 @@ - - {{ getPetEmoji(pet.breed) }} - {{ pet.name }} - - + + + {{ getPetEmoji(pet.breed) }} + {{ pet.name }} + + + + 添加 @@ -340,6 +349,7 @@ export default { gender: '母', weight: '25kg', birthday: '2021-03-20', + constellation: '双鱼座', healthStatus: 'healthy', personality: ['温顺', '聪明', '忠诚'], lastRecord: '2024-01-14' @@ -354,9 +364,115 @@ export default { gender: '母', weight: '1.2kg', birthday: '2023-06-15', + constellation: '双子座', healthStatus: 'healthy', personality: ['安静', '可爱', '乖巧'], lastRecord: '2024-01-13' + }, + { + id: 4, + name: '小黑', + breed: '哈士奇', + age: 4, + companionDays: 1460, + avatar: '/static/default-pet.png', + gender: '公', + weight: '28kg', + birthday: '2020-05-10', + constellation: '金牛座', + healthStatus: 'healthy', + personality: ['调皮', '精力充沛', '拆家'], + lastRecord: '2024-01-16' + }, + { + id: 5, + name: '咪咪', + breed: '波斯猫', + age: 5, + companionDays: 1825, + avatar: '/static/default-pet.png', + gender: '母', + weight: '3.8kg', + birthday: '2019-08-22', + constellation: '处女座', + healthStatus: 'warning', + personality: ['高贵', '优雅', '挑食'], + lastRecord: '2024-01-12' + }, + { + id: 6, + name: '豆豆', + breed: '泰迪', + age: 2, + companionDays: 730, + avatar: '/static/default-pet.png', + gender: '公', + weight: '6.2kg', + birthday: '2022-02-14', + constellation: '水瓶座', + healthStatus: 'healthy', + personality: ['聪明', '活泼', '粘人'], + lastRecord: '2024-01-15' + }, + { + id: 7, + name: '花花', + breed: '仓鼠', + age: 1, + companionDays: 120, + avatar: '/static/default-pet.png', + gender: '母', + weight: '0.15kg', + birthday: '2023-09-01', + constellation: '处女座', + healthStatus: 'healthy', + personality: ['可爱', '活跃', '爱囤食'], + lastRecord: '2024-01-16' + }, + { + id: 8, + name: '彩彩', + breed: '鹦鹉', + age: 3, + companionDays: 900, + avatar: '/static/default-pet.png', + gender: '公', + weight: '0.8kg', + birthday: '2021-11-30', + constellation: '射手座', + healthStatus: 'healthy', + personality: ['聪明', '话多', '模仿'], + lastRecord: '2024-01-14' + }, + { + id: 9, + name: '小雪', + breed: '金毛', + age: 1, + companionDays: 200, + avatar: '/static/default-pet.png', + gender: '母', + weight: '18kg', + birthday: '2023-05-20', + constellation: '金牛座', + healthStatus: 'healthy', + personality: ['温顺', '乖巧', '爱玩'], + lastRecord: '2024-01-15' + }, + { + id: 10, + name: '小虎', + breed: '橘猫', + age: 6, + companionDays: 2190, + avatar: '/static/default-pet.png', + gender: '公', + weight: '5.8kg', + birthday: '2018-07-08', + constellation: '巨蟹座', + healthStatus: 'warning', + personality: ['慵懒', '贪吃', '老成'], + lastRecord: '2024-01-11' } ] // 保存模拟数据到本地存储 @@ -386,7 +502,14 @@ export default { const expenses = [ { petId: 1, amount: 580, month: '2024-01' }, { petId: 2, amount: 890, month: '2024-01' }, - { petId: 3, amount: 120, month: '2024-01' } + { petId: 3, amount: 120, month: '2024-01' }, + { petId: 4, amount: 1200, month: '2024-01' }, + { petId: 5, amount: 750, month: '2024-01' }, + { petId: 6, amount: 680, month: '2024-01' }, + { petId: 7, amount: 80, month: '2024-01' }, + { petId: 8, amount: 320, month: '2024-01' }, + { petId: 9, amount: 450, month: '2024-01' }, + { petId: 10, amount: 620, month: '2024-01' } ] this.petExpenses = expenses } catch (error) { @@ -414,7 +537,10 @@ export default { // 获取宠物记录数量 getPetRecordsCount(petId) { const petRecords = this.petRecords.filter(record => record.petId === petId) - const mockCounts = { 1: 89, 2: 67, 3: 34 } + const mockCounts = { + 1: 89, 2: 67, 3: 34, 4: 156, 5: 203, + 6: 78, 7: 45, 8: 92, 9: 23, 10: 267 + } return petRecords.length || mockCounts[petId] || 0 }, @@ -427,8 +553,11 @@ export default { // 获取宠物待办提醒数量 getPetReminders(petId) { // 模拟获取宠物待办提醒数量 - const reminders = [3, 1, 5, 2, 0]; - return reminders[petId % reminders.length] || 0; + const reminders = { + 1: 3, 2: 1, 3: 5, 4: 2, 5: 4, + 6: 0, 7: 1, 8: 3, 9: 2, 10: 6 + }; + return reminders[petId] || 0; }, // 获取星座对应的图标 @@ -461,6 +590,15 @@ export default { return statusMap[status] || '健康' }, + getHealthTagType(status) { + const typeMap = { + healthy: 'success', + warning: 'warning', + sick: 'error' + } + return typeMap[status] || 'success' + }, + addPet() { uni.navigateTo({ url: '/pages/pets/add-pet' @@ -522,24 +660,40 @@ export default { .tabs-container { background: rgba(255, 255, 255, 0.85); - margin: 20rpx 30rpx 30rpx; + margin: 20rpx 20rpx 30rpx; border-radius: 40rpx; backdrop-filter: blur(20rpx); - overflow: hidden; + overflow: visible; box-shadow: 0 16rpx 64rpx rgba(255, 138, 128, 0.2); border: 2rpx solid rgba(255, 255, 255, 0.3); } .tabs-header { display: flex; + align-items: center; background: linear-gradient(135deg, rgba(255, 138, 128, 0.2) 0%, rgba(255, 182, 193, 0.2) 100%); padding: 10rpx; border-radius: 40rpx 40rpx 0 0; position: relative; + width: 100%; + box-sizing: border-box; +} + +.tabs-scroll { + flex: 1; + white-space: nowrap; + min-width: 0; + overflow: hidden; +} + +.tabs-content { + display: flex; + align-items: center; + width: max-content; } .tab-btn { - flex: 1; + flex-shrink: 0; background: none; border: none; padding: 24rpx 16rpx; @@ -548,6 +702,8 @@ export default { transition: all 0.3s ease; position: relative; z-index: 2; + min-width: 120rpx; + width: auto; } .tab-btn--active { @@ -572,11 +728,13 @@ export default { color: #333; } -.add-tab { - width: 120rpx; +.add-tab-fixed { + width: 100rpx; + min-width: 100rpx; + flex-shrink: 0; background: none; border: none; - padding: 24rpx 16rpx; + padding: 24rpx 8rpx; text-align: center; border-radius: 30rpx; transition: all 0.3s ease; @@ -585,9 +743,10 @@ export default { flex-direction: column; align-items: center; justify-content: center; + margin-left: 8rpx; } -.add-tab:active { +.add-tab-fixed:active { background: rgba(255, 138, 128, 0.15); } @@ -642,8 +801,8 @@ export default { } .pet-info-section { - width: 60%; - padding-left: 16rpx; + //width: 60%; + padding-left: 80rpx; padding-right: 8rpx; } diff --git a/prompts/宠物小程序开发助手_优化版.md b/prompts/宠物小程序开发助手_优化版.md index 1bbc8f2..f7de03a 100644 --- a/prompts/宠物小程序开发助手_优化版.md +++ b/prompts/宠物小程序开发助手_优化版.md @@ -1,5 +1,3 @@ -# 宠物管家小程序开发助手 v2.0 - ## 身份设定 你是一位资深的uni-app全栈开发专家,专精宠物管理领域的小程序开发。拥有5年+宠物行业项目经验,深谙用户心理和业务痛点。你的特点是: - 🎯 **需求敏感**:能快速识别用户真实需求背后的业务逻辑