diff --git a/index.html b/index.html index 6e637af..cd1d285 100644 --- a/index.html +++ b/index.html @@ -787,6 +787,7 @@ const SITE_MAP = [ { id:'other-terminals', label:'其他终端', icon:'other', color:'#b37feb', modules:[ { name:'营养管理小程序', dir:'other-module/mini-program/nutrition', entry:'eat-home.html', pages:[ {label:'吃-首页', file:'eat-home.html'}, + {label:'自记餐品', file:'eat-self-record.html'}, {label:'营养明细', file:'eat-nutrition.html'}, {label:'今日食谱', file:'eat-recipe.html'}, {label:'今日食谱展示', file:'eat-recipe-today.html'}, diff --git a/other-module/mini-program/nutrition/doc/CHANGELOG.md b/other-module/mini-program/nutrition/doc/CHANGELOG.md index d9ca75b..258b4cd 100644 --- a/other-module/mini-program/nutrition/doc/CHANGELOG.md +++ b/other-module/mini-program/nutrition/doc/CHANGELOG.md @@ -62,3 +62,23 @@ **我模块** - `me-favorites.html` — 收藏列表统计行补充收藏图标,统一为四图标 - `make-my-recipes.html` — 已发布食谱列表统计行改为独立四图标展示 + +## [1.2.0] - 2026-06-10 + +### 新增 + +**吃模块** +- `eat-self-record.html` — 新增「自记餐品」二级页面:左侧分类、右侧餐品列表,支持餐品名称搜索;按早/中/晚餐次独立记录并回显历史选择;摄入分量支持「份」与「克重」两种维度(克模式数字框可键盘直接输入,并保留 +/- 步进);底部固定栏左侧明细图标可弹窗查看已记餐品清单与总热量,右侧为保存按钮(保存后返回首页) +- `index.html` — `SITE_MAP` 营养小程序模块新增「自记餐品」条目 + +### 变更 + +**吃模块** +- `eat-home.html` — 早中晚餐次列表下方新增「+ 自记餐品」按钮,点击跳转 `eat-self-record.html?meal=[餐次]`;餐品列表项右侧热量下方新增来源徽标(员工食堂 / 自记餐品,自记为蓝色);初始列表改由 JS 统一渲染以保持来源字段一致 + +**做模块** +- `make-follow.html` — 新增 `?from=mine` 入口区分:从「我的创作-已发布」进入时,底部「开始照做」按钮替换为「取消发布」(红色警告样式 + 二次确认弹窗);其他入口保持原按钮 +- `make-my-recipes.html` — 「已发布」列表中 5 个查看按钮跳转链接补 `?from=mine` 参数,向详情页传递入口标识 + +**我模块** +- `me-health.html` — 「疾病信息」与「营养目标」两个分区的右侧箭头改为打开编辑弹窗;疾病信息弹窗内三组(疾病史 / 家族病史 / 用药情况)均支持添加多个标签,单个标签可独立 × 删除;营养目标弹窗支持编辑四项指标(每日热量 / 蛋白质 / 膳食纤维 / 饮水量);保存后页面对应区块同步刷新 diff --git a/other-module/mini-program/nutrition/eat-home.html b/other-module/mini-program/nutrition/eat-home.html index 6badf92..6659b97 100644 --- a/other-module/mini-program/nutrition/eat-home.html +++ b/other-module/mini-program/nutrition/eat-home.html @@ -88,8 +88,20 @@ .meal-item .food-info { flex: 1; min-width: 0; } .meal-item .food-name { font-size: 14px; font-weight: 500; } .meal-item .food-meta { font-size: 12px; color: #999; margin-top: 2px; } - .meal-item .food-cal { font-size: 13px; font-weight: 600; color: #fa8c16; flex-shrink: 0; } - + /* 右侧:热量 + 来源徽标(员工食堂 / 自记餐品) */ + .meal-item .food-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; } + .meal-item .food-cal { font-size: 13px; font-weight: 600; color: #fa8c16; } + .meal-item .food-source { font-size: 10px; color: #999; padding: 1px 6px; border-radius: 3px; background: #f5f5f5; } + .meal-item .food-source.self { color: #1677ff; background: #e6f4ff; } + /* 自记餐品按钮(位于餐品列表下方) */ + .self-record-btn-wrap { padding: 4px 16px 16px; background: #fff; } + .self-record-btn { + width: 100%; padding: 11px 0; border-radius: 12px; border: 1.5px dashed #1677ff; + background: #f0f7ff; color: #1677ff; font-size: 14px; font-weight: 600; + cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; + } + .self-record-btn:active { background: #d6e8ff; } +
@@ -121,55 +133,12 @@
午餐
晚餐
-
- -
🍗
-
-
宫保鸡丁
-
蛋白质 22.4g · 脂肪 14.2g
-
- 285kcal -
- -
🐟
-
-
清蒸鱼
-
蛋白质 20.8g · 脂肪 4.6g
-
- 142kcal -
- -
🥦
-
-
炒西兰花
-
蛋白质 3.2g · 脂肪 3.8g
-
- 68kcal -
- -
🍚
-
-
米饭(中碗)
-
碳水 58g · 蛋白质 4.2g
-
- 232kcal -
- -
🥬
-
-
蒜蓉油麦菜
-
蛋白质 1.8g · 脂肪 3.2g
-
- 52kcal -
- -
🍲
-
-
番茄蛋花汤
-
蛋白质 4.6g · 脂肪 2.1g
-
- 48kcal -
+
+ +
+
@@ -186,52 +155,144 @@
diff --git a/other-module/mini-program/nutrition/eat-self-record.html b/other-module/mini-program/nutrition/eat-self-record.html new file mode 100644 index 0000000..051eea1 --- /dev/null +++ b/other-module/mini-program/nutrition/eat-self-record.html @@ -0,0 +1,538 @@ + + + + + + 自记餐品 | 智能餐养小程序 + + + +
+
+ 09:41 +
📶WiFi🔋
+
+ + + + + + +
+
+ +
+ + +
+
+
+ 📋0 +
+
+
0 kcal
+
已记 0
+
+
+ +
+
+ + + +
+ + + diff --git a/other-module/mini-program/nutrition/make-follow.html b/other-module/mini-program/nutrition/make-follow.html index f302231..4b055e5 100644 --- a/other-module/mini-program/nutrition/make-follow.html +++ b/other-module/mini-program/nutrition/make-follow.html @@ -101,6 +101,8 @@ .btn-collect { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591 !important; } .intro-text { font-size: 13px; color: #555; line-height: 1.7; } .btn-start { background: #1677ff; color: #fff; } + /* 取消发布按钮(仅当从「我的创作-已发布」入口进入时显示) */ + .btn-unpublish { background: #fff1f0; color: #f5222d; border: 1px solid #ffccc7 !important; } @@ -168,9 +170,28 @@
- +
+ diff --git a/other-module/mini-program/nutrition/make-my-recipes.html b/other-module/mini-program/nutrition/make-my-recipes.html index 8a09762..fa9d76a 100644 --- a/other-module/mini-program/nutrition/make-my-recipes.html +++ b/other-module/mini-program/nutrition/make-my-recipes.html @@ -141,7 +141,7 @@ 👁️ 1.2k - 查看 + 查看
🥗
@@ -154,7 +154,7 @@ 👁️ 860
- 查看 + 查看
🐟
@@ -167,7 +167,7 @@ 👁️ 420
- 查看 + 查看
🥦
@@ -180,7 +180,7 @@ 👁️ 180
- 查看 + 查看
🍜
@@ -193,7 +193,7 @@ 👁️ 90
- 查看 + 查看 diff --git a/other-module/mini-program/nutrition/me-health.html b/other-module/mini-program/nutrition/me-health.html index 33007e7..109c60c 100644 --- a/other-module/mini-program/nutrition/me-health.html +++ b/other-module/mini-program/nutrition/me-health.html @@ -63,6 +63,71 @@ .goal-item:last-child { border-bottom: none; } .goal-item .g-label { font-size: 13px; color: #333; } .goal-item .g-value { font-size: 13px; color: #1677ff; font-weight: 600; } + /* ========== 编辑弹窗通用样式 ========== */ + /* 遮罩层:覆盖整个 phone-shell */ + .modal-mask { + position: absolute; inset: 0; background: rgba(0,0,0,0.45); + display: none; align-items: flex-end; justify-content: center; z-index: 50; + } + .modal-mask.active { display: flex; } + /* 弹窗容器:底部弹出 */ + .modal-panel { + width: 100%; max-height: 80%; background: #fff; + border-top-left-radius: 16px; border-top-right-radius: 16px; + display: flex; flex-direction: column; overflow: hidden; + } + .modal-header { + display: flex; align-items: center; justify-content: space-between; + padding: 14px 16px; border-bottom: 0.5px solid #f0f0f0; flex-shrink: 0; + } + .modal-header .m-cancel { font-size: 14px; color: #999; cursor: pointer; } + .modal-header .m-title { font-size: 15px; font-weight: 600; color: #1a1a1a; } + .modal-header .m-save { font-size: 14px; color: #1677ff; font-weight: 600; cursor: pointer; } + .modal-body { padding: 12px 16px 8px; overflow-y: auto; flex: 1; } + .modal-body::-webkit-scrollbar { display: none; } + /* 弹窗中分组 */ + .m-group { margin-bottom: 16px; } + .m-group .m-g-label { font-size: 13px; color: #666; font-weight: 500; margin-bottom: 8px; } + /* 可编辑的标签列表(带 × 删除) */ + .m-tag-list { display: flex; flex-wrap: wrap; gap: 8px; } + .m-tag { + display: inline-flex; align-items: center; gap: 4px; + padding: 5px 8px 5px 12px; border-radius: 14px; font-size: 12px; + background: #fff1f0; color: #f5222d; + } + .m-tag.med { background: #f0f7ff; color: #1677ff; } + .m-tag .m-del { + width: 16px; height: 16px; border-radius: 50%; + background: rgba(0,0,0,0.08); color: #666; + display: flex; align-items: center; justify-content: center; + font-size: 12px; line-height: 1; cursor: pointer; font-weight: 700; + } + /* 添加输入区 */ + .m-add-row { display: flex; gap: 8px; margin-top: 10px; } + .m-add-row input { + flex: 1; height: 32px; border: 1px solid #e5e5e5; border-radius: 16px; + padding: 0 12px; font-size: 13px; outline: none; background: #fafafa; + } + .m-add-row input:focus { border-color: #1677ff; background: #fff; } + .m-add-row .m-add-btn { + height: 32px; padding: 0 16px; border-radius: 16px; border: none; + background: #1677ff; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; + } + /* 营养目标弹窗:数值输入行 */ + .m-goal-row { + display: flex; align-items: center; justify-content: space-between; + padding: 12px 0; border-bottom: 0.5px solid #f0f0f0; + } + .m-goal-row:last-child { border-bottom: none; } + .m-goal-row .mg-label { font-size: 13px; color: #333; } + .m-goal-row .mg-input-wrap { display: flex; align-items: center; gap: 4px; } + .m-goal-row input { + width: 80px; height: 30px; border: 1px solid #e5e5e5; border-radius: 6px; + padding: 0 10px; font-size: 13px; outline: none; text-align: right; + color: #1677ff; font-weight: 600; + } + .m-goal-row input:focus { border-color: #1677ff; } + .m-goal-row .mg-unit { font-size: 12px; color: #999; min-width: 36px; } @@ -128,41 +193,205 @@ -
+
疾病信息
疾病史
-
+
胃炎 高尿酸
家族病史
-
+
高血压 糖尿病
用药情况
-
+
别嘌醇片依那普利
-
+
营养目标
-
每日热量2000 kcal
-
蛋白质≥60g
-
膳食纤维≥25g
-
饮水量≥2000ml
+
每日热量2000 kcal
+
蛋白质≥60g
+
膳食纤维≥25g
+
饮水量≥2000ml
+ + + + + +
+ \ No newline at end of file