fix: 更新健康监测和体重管理相关页面,新增食谱记录页面

This commit is contained in:
liuyunqin
2026-07-06 16:49:01 +08:00
parent 0f28887062
commit 8e2737be4a
95 changed files with 645 additions and 392 deletions
@@ -675,7 +675,7 @@ body {
<div class="calorie-goal">
<div class="calorie-goal__header">
<span class="calorie-goal__label">每日推荐摄入</span>
<span class="calorie-goal__bmr" id="calorieBmr">BMR 1900 × 活动系数 1.55</span>
<span class="calorie-goal__bmr" id="calorieBmr"></span>
</div>
<div class="calorie-goal__val" id="calorieVal">2645<span class="calorie-goal__unit">千卡</span></div>
<div class="calorie-goal__sub" id="calorieSub">今日已摄入 1486 千卡,还可摄入 1159 千卡(热量缺口 300kcal</div>
@@ -1165,7 +1165,7 @@ function renderCalorie() {
var remaining = cal - consumed;
var pct = Math.round(consumed / cal * 1000) / 10;
document.getElementById('calorieBmr').textContent = 'BMR 1900 × 活动系数 ' + bmrF + '' + bmrLabelMap.manual_labor + '';
document.getElementById('calorieBmr').textContent = '';
document.getElementById('calorieVal').innerHTML = cal + '<span class="calorie-goal__unit">千卡</span>';
document.getElementById('calorieSub').textContent = '今日已摄入 ' + consumed + ' 千卡,还可摄入 ' + remaining + ' 千卡(热量缺口 300kcal';
@@ -95,13 +95,13 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
.custom-avoid-sheet__quick { display: flex; flex-wrap: wrap; gap: 8px; }
.custom-avoid-sheet__quick-tag { font-size: 12px; padding: 5px 12px; border-radius: 16px; border: 1px solid #e0e0e0; color: #666; background: #fafafa; cursor: pointer; transition: all .2s; }
.custom-avoid-sheet__quick-tag:hover { border-color: #b7eb8f; background: #f6ffed; }
.custom-avoid-sheet__quick-tag--added { border-color: #ffa39e; background: #fff1f0; color: #cf1322; }
.custom-avoid-sheet__quick-tag--added { border-color: #52c41a; background: #f6ffed; color: #52c41a; }
.custom-avoid-sheet__quick-tag--added::after { content: ' ✓'; }
/* ===== 自定义食材标签 ===== */
.questionnaire__custom-avoid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.questionnaire__custom-tag { font-size: 13px; padding: 8px 14px; border-radius: 20px; font-weight: 600; cursor: pointer; border: 1.5px solid #ffa39e; color: #cf1322; background: #fff1f0; transition: all .2s; display: flex; align-items: center; gap: 6px; }
.questionnaire__custom-tag:hover { background: #ffe9e7; }
.questionnaire__custom-tag { font-size: 13px; padding: 8px 14px; border-radius: 20px; font-weight: 600; cursor: pointer; border: 1.5px solid #52c41a; color: #52c41a; background: #f6ffed; transition: all .2s; display: flex; align-items: center; gap: 6px; }
.questionnaire__custom-tag:hover { background: #e6f7df; }
.questionnaire__custom-tag::after { content: '✕'; font-size: 10px; opacity: 0.7; }
.questionnaire__chip--add { border-style: dashed !important; color: #bbb !important; border-color: #d0d0d0 !important; background: #fafafa !important; }
.questionnaire__chip--add:hover { border-color: #52c41a !important; color: #52c41a !important; background: #f6ffed !important; }
@@ -220,7 +220,7 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
<div class="custom-avoid-sheet" id="customAvoidSheet">
<div class="custom-avoid-sheet__head">
<span class="custom-avoid-sheet__cancel" onclick="closeCustomAvoidInput()">取消</span>
<span class="custom-avoid-sheet__title">添加规避食材</span>
<span class="custom-avoid-sheet__title">添加禁忌</span>
<span class="custom-avoid-sheet__submit" onclick="confirmCustomAvoid()">确定</span>
</div>
<div class="custom-avoid-sheet__body">
@@ -245,11 +245,10 @@ var userPreferences = {
/* 长庆油田工作区域:省 → 地级市 */
var REGION_DATA = [
{ name: '陕西省', cities: ['西安市','延安市','榆林市','咸阳市'] },
{ name: '甘肃省', cities: ['庆阳市','平凉市'] },
{ name: '宁夏回族自治区', cities: ['银川市','吴忠市'] },
{ name: '内蒙古自治区', cities: ['鄂尔多斯市'] },
{ name: '山西省', cities: ['吕梁市','临汾市'] }
{ name: '陕西省', cities: ['西安市','铜川市','宝鸡市','咸阳市','渭南市','延安市','汉中市','榆林市','安康市','商洛市'] },
{ name: '甘肃省', cities: ['兰州市','嘉峪关市','金昌市','白银市','天水市','武威市','张掖市','平凉市','酒泉市','庆阳市','定西市','陇南市','临夏回族自治州','甘南藏族自治州'] },
{ name: '宁夏回族自治区', cities: ['银川市','石嘴山市','吴忠市','固原市','中卫市'] },
{ name: '内蒙古自治区', cities: ['呼和浩特市','包头市','乌海市','赤峰市','通辽市','鄂尔多斯市','呼伦贝尔市','巴彦淖尔市','乌兰察布市','兴安盟','锡林郭勒盟','阿拉善盟'] }
];
var REGION_OTHER = '其他地区';
@@ -445,7 +444,7 @@ function submitQuestionnaire() {
/* ================================================================
自定义规避食材 — 底部输入 Sheet
================================================================ */
var CUSTOM_AVOID_QUICK = ['苦瓜','芹菜','茄子','胡萝卜','青椒','香菇','洋葱','韭菜','虾皮','豆腐','西红柿','土豆','山药','冬瓜','南瓜','菜','菜','豆芽','海带','竹笋'];
var CUSTOM_AVOID_QUICK = ['猪肉','牛肉','羊肉','鸡肉','鸭肉','鱼肉','','','鸡蛋','牛奶','洋葱','香菜','','','','菜','菜','虾皮'];
var customAvoidSheetTimer = null;
function openCustomAvoidInput() {