diff --git a/other-module/mini-program/nutrition/doc/CHANGELOG.md b/other-module/mini-program/nutrition/doc/CHANGELOG.md index 474f0c9..d9ca75b 100644 --- a/other-module/mini-program/nutrition/doc/CHANGELOG.md +++ b/other-module/mini-program/nutrition/doc/CHANGELOG.md @@ -44,3 +44,21 @@ ### 变更 - 更新 `index.html` SITE_MAP,修正 other-terminals 目录路径为 other-module - 小程序模块添加 21 个页面条目 + +## [1.1.0] - 2026-06-08 + +### 变更 + +**吃模块** +- `eat-dish-detail.html` — 按后台餐品总库四维度重构(基本档案/餐品构成/烹饪工艺/营养指标),去除 Tab 切换改为单屏滚动浏览,食材清单支持折叠展开,去掉规格价格区,营养指标改为绝对值展示去进度条 +- `eat-home.html` — 移除顶部当前食堂筛选区域 +- `eat-nutrition.html` — 移除顶部当前食堂筛选区域 + +**做模块** +- `make-follow.html` — 新增食材简介区块,食材清单计量单位统一为克,收藏按钮显示收藏数量 +- `make-home.html` — 推荐食谱列表每项下方添加四图标统计行(点赞/收藏/浏览量/照做次数) +- `make-popular.html` — 食谱列表统计行补充收藏图标,统一为四图标 + +**我模块** +- `me-favorites.html` — 收藏列表统计行补充收藏图标,统一为四图标 +- `make-my-recipes.html` — 已发布食谱列表统计行改为独立四图标展示 diff --git a/other-module/mini-program/nutrition/eat-dish-detail.html b/other-module/mini-program/nutrition/eat-dish-detail.html index edec152..8dfeabd 100644 --- a/other-module/mini-program/nutrition/eat-dish-detail.html +++ b/other-module/mini-program/nutrition/eat-dish-detail.html @@ -22,41 +22,170 @@ } .status-bar .time { font-size: 15px; font-weight: 700; } .status-bar .icons { display: flex; gap: 6px; align-items: center; } - .nav-bar { height: 44px; background: #fff; display: flex; align-items: center; padding: 0 16px; border-bottom: 0.5px solid #f0f0f0; flex-shrink: 0; position: relative; } + .nav-bar { + height: 44px; background: #fff; display: flex; align-items: center; padding: 0 16px; + border-bottom: 0.5px solid #f0f0f0; flex-shrink: 0; position: relative; + } .nav-bar .back { font-size: 22px; color: #1677ff; cursor: pointer; text-decoration: none; line-height: 1; } .nav-bar .title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 17px; font-weight: 600; } - .home-indicator { - height: 20px; display: flex; align-items: center; justify-content: center; background: #fff; flex-shrink: 0; - } - .home-indicator::after { content: ''; width: 120px; height: 5px; background: #1a1a1a; border-radius: 3px; opacity: 0.2; } .page-content { flex: 1; overflow-y: auto; background: #f5f5f5; } .page-content::-webkit-scrollbar { display: none; } - /* 业务样式 */ - .cover { height: 180px; background: linear-gradient(135deg,#f0f7ff,#e6f4ff); display: flex; align-items: center; justify-content: center; font-size: 72px; } - .detail-header { background: #fff; padding: 14px 16px 12px; border-bottom: 6px solid #f5f5f5; } - .detail-header .name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } - .detail-header .dish-name { font-size: 18px; font-weight: 700; } - .detail-header .dish-tag { padding: 2px 10px; border-radius: 10px; font-size: 11px; } - .detail-header .desc { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 10px; } - .detail-header .price-row { display: flex; align-items: center; justify-content: space-between; } - .detail-header .price { font-size: 22px; font-weight: 800; color: #f5222d; } - .detail-header .price .unit { font-size: 13px; color: #999; font-weight: 400; } - .detail-header .cal-badge { font-size: 12px; color: #666; background: #f5f5f5; padding: 4px 10px; border-radius: 8px; } - .section { background: #fff; padding: 14px 16px; margin-bottom: 8px; } - .section .sec-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; } - .nutri-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; text-align: center; margin-bottom: 12px; } - .nutri-cell { background: #f8f9fa; border-radius: 10px; padding: 10px 4px; } - .nutri-cell .val { font-size: 14px; font-weight: 700; } - .nutri-cell .label { font-size: 11px; color: #999; margin-top: 3px; } - .index-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; text-align: center; } - .index-cell { background: #f8f9fa; border-radius: 10px; padding: 8px 4px; } - .index-cell .icon { font-size: 11px; margin-bottom: 3px; } - .index-cell .val { font-size: 12px; font-weight: 600; color: #333; } - .index-cell .label { font-size: 10px; color: #999; margin-top: 2px; } - .info-card { font-size: 13px; color: #555; background: #f8f9fa; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; } - .crowd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; } - .crowd-tag { padding: 4px 12px; border-radius: 14px; background: #e6f4ff; color: #1677ff; font-size: 12px; } - .avoid-tip { padding: 8px 10px; background: #fff7e6; border-radius: 8px; font-size: 12px; color: #fa8c16; } + + /* 封面区 */ + .cover { + height: 140px; background: linear-gradient(135deg, #fff7e6 0%, #fff1e6 40%, #fef3e2 100%); + display: flex; align-items: center; justify-content: center; font-size: 56px; position: relative; + } + .cover::after { + content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 20px; + background: linear-gradient(to top, #fff, transparent); + } + + /* 菜品头部 */ + .dish-header { + background: #fff; padding: 0 16px 14px; + } + .dish-header .name-row { + display: flex; align-items: center; gap: 8px; margin-bottom: 6px; + } + .dish-header .dish-name { font-size: 20px; font-weight: 700; } + .dish-header .dish-cat { + padding: 2px 8px; border-radius: 4px; font-size: 11px; background: #e6f4ff; color: #1677ff; + } + .dish-header .tags { display: flex; gap: 6px; } + .dish-header .dish-tag { + padding: 2px 8px; border-radius: 4px; font-size: 11px; + background: #f6ffed; color: #52c41a; + } + .dish-header .meta-row { margin-top: 4px; } + .dish-header .price { font-size: 20px; font-weight: 700; color: #f5222d; } + .dish-header .price .unit { font-size: 12px; color: #999; font-weight: 400; } + + /* 信息概要卡片 */ + .summary-row { + display: flex; margin: 0 16px 10px; gap: 8px; + } + .summary-card { + flex: 1; background: #fff; border-radius: 10px; padding: 10px 0; text-align: center; + } + .summary-card .s-val { font-size: 15px; font-weight: 600; color: #333; } + .summary-card .s-label { font-size: 11px; color: #999; margin-top: 3px; } + + /* 通用区块 */ + .section { background: #fff; margin: 0 16px 8px; border-radius: 12px; padding: 14px 16px; } + .section:last-child { margin-bottom: 16px; } + .sec-title { + font-size: 14px; font-weight: 600; color: #333; margin-bottom: 12px; + display: flex; align-items: center; gap: 6px; + } + .sec-title::before { + content: ''; width: 3px; height: 14px; background: #1677ff; border-radius: 2px; flex-shrink: 0; + } + + /* 适配人群 */ + .crowd-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; } + .crowd-item { + display: flex; align-items: center; gap: 4px; + padding: 6px 12px; background: #f8f9fa; border-radius: 16px; font-size: 13px; + } + .crowd-level { + padding: 1px 6px; border-radius: 8px; font-size: 10px; font-weight: 600; + } + .crowd-level.rec { background: #f6ffed; color: #52c41a; } + .crowd-level.mod { background: #fff7e6; color: #fa8c16; } + .crowd-level.avoid { background: #fff1f0; color: #f5222d; } + .crowd-note { + padding: 8px 10px; background: #fffbe6; border-radius: 8px; + font-size: 12px; color: #ad6800; border: 1px solid #ffe58f; + } + + /* 可折叠食材清单 */ + .ing-header { + display: flex; align-items: center; justify-content: space-between; + padding: 10px 0; + } + .ing-header .toggle { + display: flex; align-items: center; gap: 4px; font-size: 12px; color: #1677ff; + font-weight: 400; cursor: pointer; user-select: none; + } + .ing-header .toggle .arrow { display: inline-block; transition: transform 0.2s; font-size: 10px; } + .ing-header .toggle .arrow.open { transform: rotate(180deg); } + .ing-list { display: flex; flex-direction: column; gap: 6px; } + .ing-item { + display: flex; align-items: center; gap: 8px; padding: 8px 10px; + background: #f8f9fa; border-radius: 8px; + } + .ing-item.extra { display: none; } + .ing-list.expanded .ing-item.extra { display: flex; } + .ing-item .ing-icon { + width: 32px; height: 32px; border-radius: 8px; background: #fff; + display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; + } + .ing-item .ing-info { flex: 1; min-width: 0; } + .ing-item .ing-name { font-size: 13px; font-weight: 500; } + .ing-item .ing-meta { font-size: 11px; color: #999; margin-top: 1px; } + .ing-item .ing-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; } + .ing-badge { + padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; white-space: nowrap; + } + .ing-badge.main { background: #e6f4ff; color: #1677ff; } + .ing-badge.sub { background: #f5f5f5; color: #999; } + .ing-badge.allergen { background: #fff7e6; color: #fa8c16; } + + /* 烹饪工艺卡片 2×3 */ + .cook-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } + .cook-card { + background: #f8f9fa; border-radius: 10px; padding: 10px 12px; text-align: center; + } + .cook-card .cook-icon { font-size: 18px; margin-bottom: 3px; } + .cook-card .cook-val { font-size: 14px; font-weight: 600; color: #333; } + .cook-card .cook-label { font-size: 10px; color: #999; margin-top: 2px; } + + /* 营养指标 - 宏量四大项(2×2) */ + .nutri-macro { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; } + .nutri-macro-item { + border-radius: 10px; padding: 12px; text-align: center; + } + .nutri-macro-item:nth-child(1) { background: #fff7e6; } + .nutri-macro-item:nth-child(1) .macro-val { color: #d46b08; } + .nutri-macro-item:nth-child(2) { background: #f6ffed; } + .nutri-macro-item:nth-child(2) .macro-val { color: #389e0d; } + .nutri-macro-item:nth-child(3) { background: #e6f4ff; } + .nutri-macro-item:nth-child(3) .macro-val { color: #096dd9; } + .nutri-macro-item:nth-child(4) { background: #f9f0ff; } + .nutri-macro-item:nth-child(4) .macro-val { color: #531dab; } + .nutri-macro-item .macro-val { font-size: 20px; font-weight: 700; margin-bottom: 2px; } + .nutri-macro-item .macro-label { font-size: 12px; color: #999; } + + /* 营养指标 - 其他指标行 */ + .nutri-extra { + display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; + } + .nutri-extra .extra-item { font-size: 12px; color: #999; } + .nutri-extra .extra-item strong { color: #555; font-weight: 500; } + + /* 营养等级 */ + .nutri-grade-row { + display: flex; align-items: center; justify-content: space-between; + padding: 8px 10px; background: #f8f9fa; border-radius: 8px; + } + .nutri-grade-row .grade-label { font-size: 13px; color: #666; } + .grade-badge { + padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; + } + .grade-badge.good { background: #f6ffed; color: #52c41a; } + .grade-badge.warn { background: #fff7e6; color: #fa8c16; } + .grade-badge.bad { background: #fff1f0; color: #f5222d; } + + /* Home Indicator */ + .home-indicator { + height: 20px; display: flex; align-items: center; justify-content: center; + background: #fff; flex-shrink: 0; + } + .home-indicator::after { + content: ''; width: 120px; height: 5px; background: #1a1a1a; + border-radius: 3px; opacity: 0.2; + }
@@ -71,51 +200,205 @@