This commit is contained in:
Developer
2026-04-13 10:00:55 +08:00
parent a59f54567f
commit 5ce8759a18
51 changed files with 4848 additions and 575 deletions

View File

@@ -375,24 +375,23 @@
│ └───────────────────────┘ │
│ │
│ ── 🍳 烹饪助手 ── │
│ ┌──┐ ┌──┐ ┌──┐
│ │⏱️│ │📝│ │🧮│
│ │计时│ │笔记│ │换算│
│ │ ↓│ │ ↓│ │ ↓│
└──┘ └──┘ └──┘ │
│ ┌──┐ ┌──┐ ← GridView 2列布局
│ │⏱️│ │📝│
│ │计时│ │笔记│
│ │ ↓│ │ ↓│
│使用│ │使用│ ← 新增"使用工具"按钮
│ └──┘ └──┘ │
│ │
│ ── 📋 规划管理 ── │
│ ┌──┐ ┌──┐ ┌──┐
│ │📅│ │🛒│ │⚖️│
│ │菜单│ │购物│ │缩放│
│ ↓│ │ ↓│ │ ↓│
│ └──┘ └──┘ └──┘ │
│ ┌──┐ ┌──┐
│ │📅│ │🛒│
│ │菜单│ │购物│
└──┘ └──┘
│ │
│ ── 🏥 健康工具 ── │
│ ┌──┐ ┌──┐ │
│ │BMI│ │🌙│ │
│ │计算│ │就寝│ │
│ │ ↓│ │ ↓│ │
│ └──┘ └──┘ │
│ │
│ ── 🏷️ 热门标签 ── │
@@ -419,6 +418,7 @@
| BMI计算 | `Get.toNamed` | BMI计算器 | `/bmi-calculator` | - |
| 🌙 就寝提醒 | `Get.toNamed` | 就寝提醒页 | `/profile/bedtime-reminder` | - |
| 热门标签 | `Get.toNamed` | 标签菜谱列表 | `/tag-recipe-list` | tagName, tagId, tagType |
| 🎮 使用工具按钮 | `Get.toNamed` | 工具功能页 | 工具对应路由 | - |
### 🎨 美观问题
| # | 问题 | 严重度 | 建议 |
@@ -515,6 +515,112 @@
---
## ❤️ 收藏页 (FavoritesPage)
```
┌─────────────────────────────┐
│ ← [↑返回] 我的收藏 │
├─────────────────────────────┤
│ │
│ ┌──┐ ┌──┐ │ ← GridView 2列布局
│ │🖼️│ │🖼️│ │
│ │菜│ │菜│ │
│ │品│ │品│ │
│ │1│ │2│ │
│ └──┘ └──┘ │
│ ┌──┐ ┌──┐ │
│ │🖼️│ │🖼️│ │
│ │菜│ │菜│ │
│ │品│ │品│ │
│ │3│ │4│ │
│ └──┘ └──┘ │
│ │
└─────────────────────────────┘
```
### 📄 页面视图文件
- `lib/src/pages/profile/social/favorites_page.dart`(主页面)
### 🔗 跳转关系
| 触发元素 | 跳转方式 | 目标页面 | 路由 | 传参 |
|---------|---------|---------|------|------|
| ← 返回 | `Get.back` | 上一个页面 | - | - |
| 菜品卡片 | `Get.toNamed` | 菜品详情页 | `/recipe-detail` | id |
### 🎨 美观问题
| # | 问题 | 严重度 | 建议 |
|---|------|--------|------|
| 1 | 空收藏状态缺少引导 | 🟡中 | 添加"去发现美食"按钮引导用户 |
### ⚡ 功能缺失
| # | 功能 | 优先级 | 说明 |
|---|------|--------|------|
| 1 | 收藏分组 | P3 | 按分类/标签分组管理收藏 |
| 2 | 收藏排序 | P3 | 按收藏时间/评分排序 |
---
## 📋 关于页面 (AboutPage)
```
┌─────────────────────────────┐
│ ← [↑返回] 关于 │
├─────────────────────────────┤
│ │
│ ┌───────────────────────┐ │
│ │ 🍳 妈妈厨房 │ │
│ │ Version 0.92.4 │ │
│ └───────────────────────┘ │
│ │
│ ── 应用信息 ── │
│ ┌───────────────────────┐ │
│ │ 📱 应用版本 0.92.4 │ │
│ │ 📅 更新日期 2026-04 │ │
│ │ 🏷️ 构建版本 92 │ │
│ └───────────────────────┘ │
│ │
│ ── 联系我们 ── │
│ ┌───────────────────────┐ │
│ │ 💬 用户反馈 [→] │ │ ← [→意见反馈页]
│ │ ⭐ 评价应用 [→] │ │
│ │ 📧 联系邮箱 [→] │ │
│ └───────────────────────┘ │
│ │
│ ── 法律信息 ── │
│ ┌───────────────────────┐ │
│ │ 📜 用户协议 [→] │ │
│ │ 🔒 隐私政策 [→] │ │
│ └───────────────────────┘ │
│ │
└─────────────────────────────┘
```
### 📄 页面视图文件
- `lib/src/pages/profile/about_page.dart`(主页面)
### 🔗 跳转关系
| 触发元素 | 跳转方式 | 目标页面 | 路由 | 传参 |
|---------|---------|---------|------|------|
| ← 返回 | `Get.back` | 上一个页面 | - | - |
| 💬 用户反馈 | `Get.toNamed` | 意见反馈页 | `/chat` | - |
| ⭐ 评价应用 | 打开应用商店 | App Store | - | - |
| 📧 联系邮箱 | 打开邮件客户端 | Mail App | - | - |
| 📜 用户协议 | `Get.toNamed` | 用户协议页 | `/user-agreement` | - |
| 🔒 隐私政策 | `Get.toNamed` | 隐私政策页 | `/privacy-policy` | - |
### 🎨 美观问题
| # | 问题 | 严重度 | 建议 |
|---|------|--------|------|
| 1 | 应用图标区域可增加动画效果 | 🟢低 | 添加呼吸动画或渐变效果 |
### ⚡ 功能缺失
| # | 功能 | 优先级 | 说明 |
|---|------|--------|------|
| 1 | 检查更新 | P2 | 检测新版本并提示更新 |
| 2 | 更新日志 | P3 | 展示版本更新内容 |
---
## 🥬 食材详情页 (IngredientDetailPage)
```
@@ -737,10 +843,10 @@
| P1 | 下拉刷新 | 首页/发现 | 缺少下拉手势刷新 | 🔴待开发 |
| P2 | 搜索历史 | 搜索页 | 无本地搜索记录 | 🔴待开发 |
| P2 | 分页加载 | 多个列表页 | 分类浏览/标签列表无分页 | 🔴待开发 |
| P2 | 相关推荐 | 详情页 | 缺少相关菜谱推荐 | 🔴待开发 |
| P2 | 相关推荐 | 详情页 | 缺少相关菜谱推荐 | ✅v0.92.0 |
| P2 | 烹饪模式 | 详情页 | 全屏步骤+计时器 | 🔴待开发 |
| P2 | 过敏原警示 | 详情页 | 食材含过敏原时警告 | 🔴待开发 |
| P2 | 营养可视化 | 详情页 | 环形图/进度条展示营养占比 | 🔴待开发 |
| P2 | 过敏原警示 | 详情页 | 食材含过敏原时警告 | ✅v0.92.0 |
| P2 | 营养可视化 | 详情页 | 环形图/进度条展示营养占比 | ✅v0.92.0 |
| P3 | 排序筛选 | 列表页 | 按评分/浏览量/最新排序 | 🔴待开发 |
| P3 | 评论系统 | 详情页 | 需后端支持 | 🔴需后端 |
| P3 | 用户等级 | 个人中心 | 经验值+等级+徽章 | 🔴需后端 |
@@ -755,72 +861,62 @@
| 接口文件 | Repository | 已用act | 状态 |
|---------|-----------|---------|------|
| `api.php` | RecipeRepository | list/detail/full/ingredients/ingredient_detail/search/categories/tags/stats/unified_list/unified_detail/unified_search/unified_hot/query | ✅ |
| `api.php` | RecipeRepository | list/detail/full/ingredients/ingredient_detail/search/categories/tags/stats/unified_list/unified_detail/unified_search/unified_hot/query/mini | ✅ |
| `api_action.php` | ActionRepository | like/rate/view/ip_status | ✅ |
| `api_feed.php` | FeedRepository | recommend/latest/hot/prefetch | ✅ |
| `api_filter.php` | RecipeRepository+SearchController | recipe_main_categories/taste_tags/cooking_tags/filter_recipes/global_search | ✅ |
| `api_hot.php` | HotRepository(→stats_full.php?act=hot) | hot | ✅ |
| `api_what_to_eat.php` | WhatToEatRepository | filter_apply/detail | ✅ |
| `api_filter.php` | RecipeRepository+SearchController | recipe_main_categories/taste_tags/cooking_tags/filter_recipes/global_search/meal_times/recipe_sub_categories/ingredient_main_categories/ingredient_sub_categories/category_tags/filter_ingredients/ingredient_recipes | ✅ |
| `api_hot.php` | HotRepository(→stats_full.php?act=hot) | hot(sort=view/like/rate) | ✅ |
| `api_what_to_eat.php` | WhatToEatRepository | filter_apply/detail/filter_steps | ✅ |
| `api_discover.php` | DiscoverRepository | 随机数据 | ✅ |
| `stats_full.php` | StatsRepository | online/request/hot | ✅ |
| 静态数据 | 未使用 | eating_times.json/nutrition_types.json/gmy.json | ❌未使用 |
| `api_check_duplicate.php` | RecipeRepository | check_title/check_ingredient/check_step/check_content/check_all | ✅v0.92.0 |
| `stats_full.php` | StatsRepository | online/request/hot/stats | ✅ |
| 静态数据 | 部分使用 | eating_times.json(✅)/nutrition_types.json(✅)/gmy.json(✅) | ✅v0.92.0 |
### 📊 未使用API接口一览
> 以下接口在v0.92.0版本已大部分实现,仅保留少量待开发接口
| 接口 | act/参数 | 文档描述 | 当前状态 |
|------|---------|---------|---------|
| `api.php?act=mini` | mini | 迷你版菜谱信息(~1KB),适用于列表页快速加载 | ❌未调用 |
| `api_filter.php?act=meal_times` | meal_times | 用餐时段列表(早餐/中餐/晚餐等) | ❌未调用 |
| `api_filter.php?act=recipe_sub_categories` | recipe_sub_categories&parent_id= | 食谱子分类列表 | ❌未调用 |
| `api_filter.php?act=ingredient_main_categories` | ingredient_main_categories | 食材大类列表 | ❌未调用 |
| `api_filter.php?act=ingredient_sub_categories` | ingredient_sub_categories&parent_id= | 食材子分类列表 | ❌未调用 |
| `api_filter.php?act=category_tags` | category_tags&category_id= | 指定分类下的口味+工艺标签 | ❌未调用 |
| `api_filter.php` exclude_*参数 | exclude_category/taste/cooking/allergen等 | 排除筛选(排除分类/口味/工艺/过敏原) | ❌未调用 |
| `api_filter.php` 高级筛选 | nutrition_name/min/max, allergen, ingredient, author_id | 营养范围/过敏原/食材/作者筛选 | ❌未调用 |
| `api_what_to_eat.php?act=filter_steps` | filter_steps&category= | 获取筛选步骤和菜谱数量 | ❌未调用 |
| `api_what_to_eat.php?act=detail&code=` | detail&code=CP032892 | 编码查询菜谱详情 | ❌未调用 |
| `api_what_to_eat.php?act=detail&title=&fuzzy=1` | detail&title=&fuzzy=1 | 模糊标题搜索 | ❌未调用 |
| `api_hot.php?sort=rate` | sort=rate | 按评分排序的热门排行 | ❌未调用 |
| `api.php?act=unified_list&type=ingredient` | unified_list&type=ingredient | 统一格式食材列表 | ❌未调用 |
| `api.php?act=unified_detail&type=ingredient` | unified_detail&type=ingredient | 统一格式食材详情 | ❌未调用 |
| `api.php?act=unified_hot&type=ingredient` | unified_hot&type=ingredient | 统一格式食材热门 | ❌未调用 |
| `eating_times.json` | 静态资源 | 34种用餐时段数据(标准/组合/频率/方法) | ❌未使用 |
| `nutrition_types.json` | 静态资源 | 31种营养成分数据(含单位) | ❌未使用 |
| `gmy.json` | 静态资源 | 585种过敏原数据(21大类) | ❌未使用 |
| `api.php?act=unified_list&type=ingredient` | unified_list&type=ingredient | 统一格式食材列表 | 🔴待开发 |
| `api.php?act=unified_detail&type=ingredient` | unified_detail&type=ingredient | 统一格式食材详情 | 🔴待开发 |
| `api.php?act=unified_hot&type=ingredient` | unified_hot&type=ingredient | 统一格式食材热门 | 🔴待开发 |
---
### 🟢 已有API可直接开发P2优先级
| # | 功能 | API接口 | 数据源 | 页面位置 | 开发复杂度 | 说明 |
> 以下功能在v0.92.0版本已全部实现
| # | 功能 | API接口 | 数据源 | 页面位置 | 开发复杂度 | 状态 |
|---|------|---------|--------|---------|-----------|------|
| 1 | 🕐 用餐时段推荐 | `api_filter.php?act=meal_times` | eating_times.json(34种) | 首页/工具中心 | ⭐⭐ | 根据当前时间智能推荐早/午/晚餐,首页瀑布流已有时段卡片但跳转搜索页,应改为时段专属推荐页 |
| 2 | ⚠️ 过敏原警示 | `api.php?act=full` allergens字段 | gmy.json(585种) | 菜品详情页 | ⭐⭐ | 详情页显示过敏原警告结合用户过敏原设置自动过滤已有allergen字段但未展示 |
| 3 | 📊 营养可视化 | `api.php?act=full` nutrition字段 | nutrition_types.json(31种) | 菜品详情页/营养中心 | ⭐⭐⭐ | 环形图/进度条展示营养占比nutrition字段已有数据需前端可视化组件 |
| 4 | 🏆 评分排行榜 | `api_hot.php?type=recipe&sort=rate` | api_hot.php | 热门排行页 | ⭐ | 热门页已有Tab增加"评分榜"排序选项API已支持sort=rate |
| 5 | 📱 迷你信息加载 | `api.php?act=mini&id=` | api.php | 列表页/卡片 | ⭐⭐ | 列表页使用mini接口(~1KB)替代detail(~10KB)10倍性能提升需改造列表加载逻辑 |
| 6 | 🔍 排除筛选 | `api_filter.php?act=filter_recipes` exclude_*参数 | api_filter.php | 高级搜索页 | ⭐ | 高级搜索页增加"排除"选项,如排除辣味/油炸等API已支持7个exclude参数 |
| 7 | 🌐 IP状态显示 | `api_action.php?act=ip_status` | api_action.php | 菜品详情页 | ⭐ | 评分前显示今日剩余评分次数ActionRepository已封装fetchIpStatus()但UI未使用 |
| 8 | 🏷️ 分类标签联动 | `api_filter.php?act=category_tags&category_id=` | api_filter.php | 分类浏览页/高级搜索 | ⭐⭐ | 选择分类后自动加载该分类下的口味+工艺标签,提升筛选体验 |
| 9 | 🥗 食材分类浏览 | `api_filter.php?act=ingredient_main_categories/sub_categories` | api_filter.php | 发现页/工具中心 | ⭐⭐ | 食材大类→子类→食材列表三级浏览,当前发现页食材分类跳转分类浏览页但无食材专用分类 |
| 10 | 📋 食谱子分类 | `api_filter.php?act=recipe_sub_categories&parent_id=` | api_filter.php | 分类浏览页 | ⭐ | 当前分类浏览使用api.php?act=categories改用filter接口可获取更丰富的子分类数据 |
| 11 | 🎲 筛选步骤引导 | `api_what_to_eat.php?act=filter_steps` | api_what_to_eat.php | 今天吃什么 | ⭐⭐ | 逐步筛选先选分类→再选标签→显示匹配数量比当前直接filter_apply体验更好 |
| 12 | 🔢 编码/模糊查询 | `api_what_to_eat.php?act=detail&code=/title=` | api_what_to_eat.php | 搜索页 | ⭐ | 支持菜谱编码(CP032892)查询和标题模糊搜索,扩展搜索能力 |
| 1 | 🕐 用餐时段推荐 | `api_filter.php?act=meal_times` | eating_times.json(34种) | 首页/工具中心 | ⭐⭐ | ✅v0.92.0 |
| 2 | ⚠️ 过敏原警示 | `api.php?act=full` allergens字段 | gmy.json(585种) | 菜品详情页 | ⭐⭐ | ✅v0.92.0 |
| 3 | 📊 营养可视化 | `api.php?act=full` nutrition字段 | nutrition_types.json(31种) | 菜品详情页/营养中心 | ⭐⭐⭐ | ✅v0.92.0 |
| 4 | 🏆 评分排行榜 | `api_hot.php?type=recipe&sort=rate` | api_hot.php | 热门排行页 | ⭐ | ✅v0.92.0 |
| 5 | 📱 迷你信息加载 | `api.php?act=mini&id=` | api.php | 列表页/卡片 | ⭐⭐ | ✅v0.92.0 |
| 6 | 🔍 排除筛选 | `api_filter.php?act=filter_recipes` exclude_*参数 | api_filter.php | 高级搜索页 | ⭐ | ✅v0.92.0 |
| 7 | 🌐 IP状态显示 | `api_action.php?act=ip_status` | api_action.php | 菜品详情页 | ⭐ | ✅v0.92.0 |
| 8 | 🏷️ 分类标签联动 | `api_filter.php?act=category_tags&category_id=` | api_filter.php | 分类浏览页/高级搜索 | ⭐⭐ | ✅v0.92.0 |
| 9 | 🥗 食材分类浏览 | `api_filter.php?act=ingredient_main_categories/sub_categories` | api_filter.php | 发现页/工具中心 | ⭐⭐ | ✅v0.92.0 |
| 10 | 📋 食谱子分类 | `api_filter.php?act=recipe_sub_categories&parent_id=` | api_filter.php | 分类浏览页 | ⭐ | ✅v0.92.0 |
| 11 | 🎲 筛选步骤引导 | `api_what_to_eat.php?act=filter_steps` | api_what_to_eat.php | 今天吃什么 | ⭐⭐ | ✅v0.92.0 |
| 12 | 🔢 编码/模糊查询 | `api_what_to_eat.php?act=detail&code=/title=` | api_what_to_eat.php | 搜索页 | ⭐ | ✅v0.92.0 |
### 🟡 需组合API开发P3优先级
| # | 功能 | 所需API | 页面位置 | 开发复杂度 | 说明 |
| # | 功能 | 所需API | 页面位置 | 开发复杂度 | 状态 |
|---|------|---------|---------|-----------|------|
| 1 | 🧠 智能推荐 | `api_feed.php?act=recommend` + `api_filter.php?act=filter_recipes` + `gmy.json` + 用户偏好设置 | 首页 | ⭐⭐⭐⭐ | 结合时段+营养+过敏原+用户偏好的智能推荐,需设计推荐算法权重 |
| 2 | 📅 每日菜单规划 | `api_what_to_eat.php?act=filter_apply` × 3次 + `eating_times.json` | 工具中心 | ⭐⭐⭐ | 一次性生成早中晚餐完整菜单,需新建菜单规划页面 |
| 3 | 📱 二维码海报 | `api.php?act=detail` code字段 + qr_flutter库 | 菜品详情页 | ⭐⭐ | 生成菜谱二维码分享图code字段已有(如CP032892) |
| 4 | 🔗 社交分享增强 | `api.php?act=detail` code字段 + `api_hot.php` statistics | 菜品详情页 | ⭐⭐ | 分享链接含菜谱编码+热度标签,当前分享功能已有但内容简单 |
| 5 | 🏋️ 健身餐推荐 | `api_filter.php?act=filter_recipes` nutrition_min/max + nutrition_types.json | 工具中心/发现页 | ⭐⭐⭐ | 高蛋白(>30g)/低脂(<10g)/低碳水菜谱筛选需营养目标设置UI |
| 6 | 📋 过敏原报告 | `api.php?act=full` allergens + `gmy.json` | 菜品详情页 | ⭐⭐⭐ | 菜谱过敏原完整分析报告交叉比对585种过敏原数据 |
| 7 | 🥗 食材营养详情 | `api.php?act=ingredient_detail` + `nutrition_types.json` | 食材详情页 | ⭐⭐ | 食材详情页增加营养成分表格+单位匹配nutrition_types.json提供31种营养单位 |
| 8 | 🔄 食材替代建议 | `api_filter.php?act=filter_recipes` ingredient参数 + `gmy.json` | 食材详情页 | ⭐⭐⭐ | 缺少某食材时推荐替代品,需建立食材替代关系映射 |
| 9 | 📈 营养目标追踪 | `api.php?act=full` nutrition × 多菜谱 + `nutrition_types.json` | 营养中心 | ⭐⭐⭐⭐ | 每日营养摄入统计+目标追踪,需记录用户每日饮食 |
| 10 | 🏷️ 统一格式输出 | `api.php?act=unified_list/detail/search/hot` type=ingredient | 食材相关页面 | ⭐⭐ | 统一格式简化食材数据处理,当前食材页面使用不同接口格式 |
| 1 | 🧠 智能推荐 | `api_feed.php?act=recommend` + `api_filter.php?act=filter_recipes` + `gmy.json` + 用户偏好设置 | 首页 | ⭐⭐⭐⭐ | 🔴待开发 |
| 2 | 📅 每日菜单规划 | `api_what_to_eat.php?act=filter_apply` × 3次 + `eating_times.json` | 工具中心 | ⭐⭐⭐ | 🔴待开发 |
| 3 | 📱 二维码海报 | `api.php?act=detail` code字段 + qr_flutter库 | 菜品详情页 | ⭐⭐ | 🔴待开发 |
| 4 | 🔗 社交分享增强 | `api.php?act=detail` code字段 + `api_hot.php` statistics | 菜品详情页 | ⭐⭐ | 🔴待开发 |
| 5 | 🏋️ 健身餐推荐 | `api_filter.php?act=filter_recipes` nutrition_min/max + nutrition_types.json | 工具中心/发现页 | ⭐⭐⭐ | ✅v0.92.0 |
| 6 | 📋 过敏原报告 | `api.php?act=full` allergens + `gmy.json` | 菜品详情页 | ⭐⭐⭐ | ✅v0.92.0 |
| 7 | 🥗 食材营养详情 | `api.php?act=ingredient_detail` + `nutrition_types.json` | 食材详情页 | ⭐⭐ | ✅v0.92.0 |
| 8 | 🔄 食材替代建议 | `api_filter.php?act=filter_recipes` ingredient参数 + `gmy.json` | 食材详情页 | ⭐⭐⭐ | ✅v0.92.0 |
| 9 | 📈 营养目标追踪 | `api.php?act=full` nutrition × 多菜谱 + `nutrition_types.json` | 营养中心 | ⭐⭐⭐⭐ | ✅v0.92.0 |
| 10 | 🏷️ 统一格式输出 | `api.php?act=unified_list/detail/search/hot` type=ingredient | 食材相关页面 | ⭐⭐ | 🔴待开发 |
### 🔴 需后端新开发API