diff --git a/--full-page b/--full-page deleted file mode 100644 index 73c43a1..0000000 Binary files a/--full-page and /dev/null differ diff --git a/final.js b/final.js deleted file mode 100644 index 27080f0..0000000 --- a/final.js +++ /dev/null @@ -1,224 +0,0 @@ -const fs=require('fs'),f='other-module/emergency-screen/xian-center/index-v3.html'; -let d=fs.readFileSync(f,'utf8'); -const ok=(s,desc)=>{if(!s){console.log('FAIL: '+desc);process.exit(1);}console.log('OK: '+desc);}; - -// ═══ CSS changes (no Chinese text needed) ═══ -d=d.replace('grid-template-columns:1fr 1fr;gap:10px;','grid-template-columns:1fr 1fr 1fr;gap:8px;'); -d=d.replace('.stat-card{background:rgba(24,144,255,0.06);border:1px solid var(--panel-border);border-radius:8px;\r\n padding:12px;text-align:center;transition:all .2s;cursor:pointer;}', - '.stat-card{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;\r\n padding:10px 6px;min-height:66px;text-align:center;position:relative;overflow:hidden;cursor:pointer;\r\n background:linear-gradient(135deg,rgba(24,144,255,0.10),rgba(10,30,60,0.45));\r\n border:1px solid var(--panel-border);border-radius:8px;transition:all .25s;}\r\n .stat-card::before{content:\"\";position:absolute;left:0;top:20%;bottom:20%;width:3px;\r\n background:var(--primary);border-radius:0 2px 2px 0;box-shadow:0 0 8px rgba(24,144,255,0.55);}\r\n .stat-card::after{content:\"\";position:absolute;inset:0;pointer-events:none;\r\n background:radial-gradient(ellipse at 100% 0%,rgba(24,144,255,0.06),transparent 55%);}'); -d=d.replace('.stat-card:hover{border-color:rgba(24,144,255,0.35);box-shadow:0 0 12px rgba(24,144,255,0.1);}', - '.stat-card:hover{border-color:rgba(24,144,255,0.45);box-shadow:0 0 16px rgba(24,144,255,0.15);\r\n transform:translateY(-2px);background:linear-gradient(135deg,rgba(24,144,255,0.16),rgba(10,30,60,0.50));}'); -d=d.replace('.stat-card__num{font-size:24px;font-weight:700;color:#fff;line-height:1;text-shadow:0 0 8px rgba(255,255,255,0.2);}', - '.stat-card__num{font-size:20px;font-weight:700;color:#fff;line-height:1;\r\n text-shadow:0 0 10px rgba(24,144,255,0.35);font-variant-numeric:tabular-nums;letter-spacing:0.5px;}'); -d=d.replace('.stat-card__label{font-size:11px;color:var(--text-sub);margin-top:6px;}', - '.stat-card__label{font-size:10px;color:var(--text-sub);white-space:nowrap;letter-spacing:0.3px;}'); -for(const[old,nw] of[ - ['.stat-card--danger .stat-card__num{color:var(--danger);text-shadow:0 0 8px rgba(255,77,79,0.3);}', - '.stat-card--danger::before{background:var(--danger);box-shadow:0 0 8px rgba(255,77,79,0.55);}\r\n .stat-card--danger .stat-card__num{color:var(--danger);text-shadow:0 0 10px rgba(255,77,79,0.4);}\r\n .stat-card--danger::after{background:radial-gradient(ellipse at 100% 0%,rgba(255,77,79,0.06),transparent 55%);}\r\n .stat-card--danger:hover{border-color:rgba(255,77,79,0.3);box-shadow:0 0 16px rgba(255,77,79,0.15);}'], - ['.stat-card--warning .stat-card__num{color:var(--warning);text-shadow:0 0 8px rgba(250,173,20,0.3);}', - '.stat-card--warning::before{background:var(--warning);box-shadow:0 0 8px rgba(250,173,20,0.55);}\r\n .stat-card--warning .stat-card__num{color:var(--warning);text-shadow:0 0 10px rgba(250,173,20,0.4);}\r\n .stat-card--warning::after{background:radial-gradient(ellipse at 100% 0%,rgba(250,173,20,0.06),transparent 55%);}\r\n .stat-card--warning:hover{border-color:rgba(250,173,20,0.3);box-shadow:0 0 16px rgba(250,173,20,0.15);}'], - ['.stat-card--success .stat-card__num{color:var(--success);text-shadow:0 0 8px rgba(82,196,26,0.3);}', - '.stat-card--success::before{background:var(--success);box-shadow:0 0 8px rgba(82,196,26,0.55);}\r\n .stat-card--success .stat-card__num{color:var(--success);text-shadow:0 0 10px rgba(82,196,26,0.4);}\r\n .stat-card--success::after{background:radial-gradient(ellipse at 100% 0%,rgba(82,196,26,0.06),transparent 55%);}\r\n .stat-card--success:hover{border-color:rgba(82,196,26,0.3);box-shadow:0 0 16px rgba(82,196,26,0.15);}'] -]) d=d.replace(old,nw); -d=d.replace('/* ========== 左侧:服务详情 ========== */','/* ========== 左侧:应急事件统计卡片 ========== */'); - -// CSS: alarm-bars + radar -d=d.replace(' /* ========== 左侧:体检数据排行 ========== */', -` /* ========== 左侧:穿戴告警统计柱状图 ========== */ - .panel--alarm-bars .panel__body{padding:8px 10px 10px;overflow:hidden;} - .alarm-bars{display:flex;flex-direction:column;gap:7px;} - .alarm-bars__row{display:flex;align-items:center;gap:8px;min-height:22px;} - .alarm-bars__label{width:54px;font-size:10px;color:var(--text-sub);text-align:right;flex-shrink:0;white-space:nowrap;line-height:1.2;} - .alarm-bars__track{flex:1;height:12px;background:rgba(24,144,255,0.06);border-radius:6px;overflow:hidden;position:relative;} - .alarm-bars__bar{height:100%;border-radius:6px;transition:width .6s ease;position:relative;min-width:4px;} - .alarm-bars__bar::after{content:"";position:absolute;right:0;top:0;bottom:0;width:2px;background:rgba(255,255,255,0.25);border-radius:0 6px 6px 0;} - .alarm-bars__count{width:32px;font-size:11px;font-weight:700;color:#fff;text-align:right;flex-shrink:0;font-variant-numeric:tabular-nums;} - - /* ========== 右侧:体检数据雷达图 ========== */ - .panel--checkup-radar .panel__body{padding:6px 10px 8px;overflow:hidden;} - .checkup-radar{display:flex;align-items:center;justify-content:center;} - .checkup-radar svg{width:100%;max-width:280px;height:auto;display:block;} - .radar-dot{animation:radarPulse 2s ease-in-out infinite;filter:drop-shadow(0 0 4px rgba(24,144,255,0.6));} - @keyframes radarPulse{0%,100%{opacity:0.6;r:2.5;}50%{opacity:1;r:3.5;}} - - /* ========== 左侧:体检数据排行 ========== */`); - -// CSS: AI risk tooltip -d=d.replace('.ai-risk-col{min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px;}', - '.ai-risk-col{min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px;position:relative;}'); -d=d.replace('.ai-risk-stack{height:72px;width:32px;display:flex;flex-direction:column;justify-content:flex-end;\r\n border-radius:5px 5px 3px 3px;overflow:hidden;background:rgba(24,144,255,0.06);\r\n box-shadow:inset 0 0 0 1px rgba(24,144,255,0.12);}', - '.ai-risk-stack{height:72px;width:32px;display:flex;flex-direction:column;justify-content:flex-end;\r\n border-radius:5px 5px 3px 3px;overflow:hidden;background:rgba(24,144,255,0.06);\r\n box-shadow:inset 0 0 0 1px rgba(24,144,255,0.12);cursor:pointer;}\r\n .ai-risk-stack:hover{border-color:rgba(24,144,255,0.4);}\r\n .ai-risk-tip{position:absolute;bottom:80px;left:50%;transform:translateX(-50%);z-index:30;\r\n background:rgba(10,22,48,0.96);border:1px solid rgba(24,144,255,0.35);border-radius:8px;\r\n padding:8px 10px;white-space:nowrap;pointer-events:none;\r\n opacity:0;transition:opacity .2s,bottom .2s;\r\n box-shadow:0 4px 18px rgba(0,0,0,0.5),0 0 12px rgba(24,144,255,0.15);\r\n font-size:11px;color:var(--text-sub);line-height:1.7;text-align:left;}\r\n .ai-risk-tip::after{content:\"\";position:absolute;top:100%;left:50%;transform:translateX(-50%);\r\n width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;\r\n border-top:5px solid rgba(10,22,48,0.96);}\r\n .ai-risk-tip b{font-weight:600;}\r\n .ai-risk-col:hover .ai-risk-tip{opacity:1;bottom:84px;}'); -console.log('CSS all done'); - -// ═══ HTML: Read 4th stat-card directly from file ═══ -const ljsl=d.indexOf('累计受理次数'); -const cardBeg=d.lastIndexOf('
156
待处理工单
\r\n
3,232
已完成工单
'; -d=d.replace(card4,card4n); -ok(d.includes('待处理工单'),'6 stat cards'); - -// ═══ HTML: Replace help events with alarm bars ═══ -const helpBeg=d.indexOf(' '); -const healthBeg=d.indexOf(' '); -const helpBlock=d.substring(helpBeg,healthBeg); -const alarmBars=` -
-
-
- 穿戴告警统计 - -
-
-
-
心率异常
126
-
体温异常
54
-
血氧异常
38
-
压力异常
72
-
一键告警
18
-
摔倒
9
-
-
-
- -`; -d=d.replace(helpBlock,alarmBars); -ok(d.includes('alarmBarsChart')&&!d.includes('应急求助事件(自动滚动列表)'),'alarm bars + remove help'); - -// ═══ HTML: Move AI from right to left ═══ -const aiBeg=d.indexOf('a id="aiPanel"'); -const aiBlockStart=d.lastIndexOf(' ',aiBeg); -const rAside=d.lastIndexOf(' '); -const aiBlock=d.substring(aiBlockStart,rAside); -d=d.split(aiBlock).join('');// Remove from right -// Insert before 人员现状监测 on left -const healthPos=d.indexOf(' '); -d=d.substring(0,healthPos)+aiBlock+'\r\n'+d.substring(healthPos); -ok(d.includes('AI智能预警分析'),'AI moved to left'); - -// ═══ HTML: AI rename + dropdown + tooltips ═══ -d=d.replace('AI智能预警分析','心脑血管预警统计(历史记录)'); -d=d.replace(' ',' '); -// Remove old history link, add dropdown -const histBeg=d.indexOf('pan>历史记录'); -const linkLineStart=d.lastIndexOf(''); -const rpEnd=d.indexOf(' ',rpBeg); -const nrp=` - '),'right:',cnt(''),'left:',cnt('')); -console.log('6cards:',cnt('待处理工单'),'alarm:',cnt('alarmBarsChart'),'help:',cnt('应急求助事件(自动滚动列表)')); -console.log('CV:',cnt('心脑血管预警统计'),'radar:',cnt('checkupRadar'),'consult:',cnt('咨询数据')); -console.log('health:',cnt('人员现状监测(环形图)'),'renderAlarmBars:',cnt('renderAlarmBars'),'updateCvStats:',cnt('updateCvStats')); -fs.writeFileSync(f,d,'utf8'); -console.log('DONE. Size:',d.length); diff --git a/other-module/mini-program/nutrition/ask-home.html b/other-module/mini-program/nutrition/ask-home.html index 91a3cc7..3302b3e 100644 --- a/other-module/mini-program/nutrition/ask-home.html +++ b/other-module/mini-program/nutrition/ask-home.html @@ -112,7 +112,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/eat-cart.html b/other-module/mini-program/nutrition/eat-cart.html index 02415f7..a10144e 100644 --- a/other-module/mini-program/nutrition/eat-cart.html +++ b/other-module/mini-program/nutrition/eat-cart.html @@ -42,6 +42,35 @@ content: ''; width: 120px; height: 5px; background: #1a1a1a; border-radius: 3px; opacity: 0.2; } + /* 订单类型 Tab */ + .type-tabs { display: flex; background: #fff; border-bottom: 0.5px solid #f0f0f0; padding: 0 16px; flex-shrink: 0; } + .type-tab { + flex: 1; text-align: center; padding: 12px 0; font-size: 14px; color: #666; + position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; + } + .type-tab.active { color: #1677ff; font-weight: 600; } + .type-tab.active::after { + content: ''; position: absolute; bottom: 0; left: 30%; right: 30%; height: 2px; + background: #1677ff; border-radius: 1px; + } + .type-tab .tab-count { + font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; + background: #f0f0f0; color: #666; border-radius: 9px; font-weight: 600; + } + .type-tab.active .tab-count { background: #e6f4ff; color: #1677ff; } + .type-tab .presale-tag { + font-size: 10px; padding: 0 4px; background: #fff7e6; color: #fa8c16; + border-radius: 3px; font-weight: 600; + } + .cart-panel.hidden { display: none; } + /* 净菜包预售提示 */ + .presale-hint { + display: flex; align-items: flex-start; gap: 8px; + margin: 8px 12px; padding: 10px 12px; + background: #fff7e6; border-radius: 8px; font-size: 12px; color: #fa8c16; line-height: 1.5; + } + .presale-hint .hint-icon { font-size: 14px; flex-shrink: 0; } + .presale-hint b { font-weight: 600; } /* 购物车商品列表 */ .cart-section { background: #fff; margin-bottom: 8px; } .cart-section .sec-title { @@ -116,7 +145,14 @@ 购物车 + +
+
🍽️ 餐品 3
+
🥬 餐品净菜包 预售 2
+
+ +
已选菜品(3)
@@ -183,17 +219,110 @@
备注
+
+ + +
-
合计 ¥38.00
-
已享员工餐补优惠
+
合计 ¥38.00
+
已享员工餐补优惠
- 提交订单 + 提交订单
+ diff --git a/other-module/mini-program/nutrition/eat-home.html b/other-module/mini-program/nutrition/eat-home.html index 21be0d1..51d4068 100644 --- a/other-module/mini-program/nutrition/eat-home.html +++ b/other-module/mini-program/nutrition/eat-home.html @@ -165,7 +165,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/eat-nutrition.html b/other-module/mini-program/nutrition/eat-nutrition.html index f0e0bca..d5803c8 100644 --- a/other-module/mini-program/nutrition/eat-nutrition.html +++ b/other-module/mini-program/nutrition/eat-nutrition.html @@ -327,7 +327,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/eat-order-confirm.html b/other-module/mini-program/nutrition/eat-order-confirm.html index 27d499d..a1e5eed 100644 --- a/other-module/mini-program/nutrition/eat-order-confirm.html +++ b/other-module/mini-program/nutrition/eat-order-confirm.html @@ -51,6 +51,146 @@ .order-total { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid #f0f0f0; margin-top: 8px; } .order-total .label { font-size: 14px; font-weight: 600; } .order-total .amount { font-size: 18px; font-weight: 800; color: #f5222d; } + /* 净菜包履约信息卡 */ + .fulfill-card { + margin: 0 16px 12px; background: #fff; border-radius: 12px; padding: 16px; + } + .fulfill-title { + font-size: 14px; font-weight: 600; margin-bottom: 12px; + display: flex; align-items: center; gap: 6px; + } + .fulfill-row { + display: flex; padding: 8px 0; border-bottom: 0.5px solid #f5f5f5; + font-size: 13px; + } + .fulfill-row:last-of-type { border-bottom: none; } + .fr-label { width: 80px; color: #999; flex-shrink: 0; } + .fr-value { flex: 1; color: #333; line-height: 1.5; } + .fr-value.highlight { color: #fa8c16; font-weight: 600; } + .fulfill-tip { + margin-top: 10px; padding: 8px 10px; background: #fff7e6; border-radius: 6px; + font-size: 11px; color: #fa8c16; line-height: 1.5; + } + .presale-tip { + padding: 8px 10px; background: #fff7e6; border-radius: 6px; + font-size: 11px; color: #fa8c16; line-height: 1.5; margin-bottom: 12px; + } + .presale-tip b { font-weight: 600; } + /* 表单组 */ + .form-group { padding: 10px 0; border-bottom: 0.5px solid #f5f5f5; } + .form-group:last-child { border-bottom: none; } + .fg-label { font-size: 13px; font-weight: 600; color: #333; margin-bottom: 8px; } + .fg-label .required { color: #f5222d; margin-left: 2px; } + /* 取货方式 */ + .pickup-methods { display: flex; gap: 8px; } + .pickup-method { + flex: 1; padding: 10px 6px; border-radius: 10px; border: 1.5px solid #e8e8e8; + text-align: center; cursor: pointer; background: #fff; + } + .pickup-method.active { border-color: #1677ff; background: #e6f4ff; } + .pickup-method .pm-icon { font-size: 20px; } + .pickup-method .pm-name { font-size: 13px; font-weight: 600; margin-top: 4px; color: #333; } + .pickup-method .pm-desc { font-size: 10px; color: #999; margin-top: 2px; } + .pickup-method.active .pm-name { color: #1677ff; } + /* 日期/时段 chip */ + .chip-label { font-size: 11px; color: #999; margin: 8px 0 6px; } + .date-chips, .time-chips { display: flex; gap: 6px; flex-wrap: wrap; } + .date-chip, .time-chip { + padding: 6px 10px; border-radius: 14px; background: #f5f5f5; + font-size: 11px; color: #666; cursor: pointer; line-height: 1.4; + } + .date-chip.active, .time-chip.active { + background: #1677ff; color: #fff; font-weight: 600; + } + /* 地址卡片 */ + .address-card, .pickup-card { + padding: 12px; border-radius: 8px; border: 1px solid #e8e8e8; background: #fafafa; + position: relative; + } + .addr-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; } + .addr-name { font-size: 14px; font-weight: 600; color: #333; } + .addr-phone { font-size: 12px; color: #666; } + .addr-default { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: #fff7e6; color: #fa8c16; font-weight: 600; } + .addr-detail { font-size: 13px; color: #444; line-height: 1.5; padding-right: 56px; } + .addr-edit { display: inline-block; font-size: 12px; color: #1677ff; margin-top: 6px; text-decoration: none; } + .addr-switch { + position: absolute; right: 10px; bottom: 10px; font-size: 12px; color: #1677ff; + background: none; border: none; cursor: pointer; padding: 4px 6px; + } + /* 地址选择列表 */ + .addr-list { margin-top: 10px; display: none; } + .addr-list.show { display: block; } + .addr-option { + padding: 10px 12px; border: 1px solid #e8e8e8; border-radius: 8px; background: #fff; + margin-bottom: 8px; cursor: pointer; position: relative; + } + .addr-option.active { border-color: #1677ff; background: #f0f7ff; } + .addr-option .opt-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; } + .addr-option .opt-name { font-size: 14px; font-weight: 600; color: #333; } + .addr-option .opt-phone { font-size: 12px; color: #666; } + .addr-option .opt-default { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: #fff7e6; color: #fa8c16; font-weight: 600; } + .addr-option .opt-detail { font-size: 12px; color: #555; line-height: 1.5; padding-right: 28px; } + .addr-option .opt-check { + position: absolute; right: 10px; top: 50%; transform: translateY(-50%); + width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #d9d9d9; + display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; + background: #fff; + } + .addr-option.active .opt-check { background: #1677ff; border-color: #1677ff; } + .addr-option .opt-edit { + position: absolute; right: 36px; top: 50%; transform: translateY(-50%); + font-size: 11px; color: #1677ff; background: none; border: none; cursor: pointer; + } + .addr-add-btn { + width: 100%; padding: 10px 0; border-radius: 8px; border: 1px dashed #1677ff; + background: #fff; color: #1677ff; font-size: 13px; font-weight: 600; cursor: pointer; + display: flex; align-items: center; justify-content: center; gap: 4px; + } + /* 新增地址表单 */ + .addr-form { margin-top: 10px; padding: 12px; border-radius: 8px; background: #fff; border: 1px solid #e8e8e8; display: none; } + .addr-form.show { display: block; } + .addr-form .form-row { padding: 8px 0; border-bottom: 0.5px solid #f5f5f5; } + .addr-form .form-row:last-of-type { border-bottom: none; } + .addr-form .form-label { font-size: 12px; color: #666; margin-bottom: 6px; } + .addr-form .form-label .required { color: #f5222d; } + .addr-form .form-input { + width: 100%; height: 34px; border-radius: 6px; border: 1px solid #e8e8e8; + padding: 0 10px; font-size: 13px; background: #f8f9fa; outline: none; + } + .addr-form .form-input:focus { border-color: #1677ff; background: #fff; } + .addr-form .form-textarea { + width: 100%; min-height: 60px; border-radius: 6px; border: 1px solid #e8e8e8; + padding: 8px 10px; font-size: 13px; background: #f8f9fa; outline: none; resize: none; font-family: inherit; + } + .addr-form .form-textarea:focus { border-color: #1677ff; background: #fff; } + .addr-form .form-switch { + display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #333; + } + .switch-toggle { + width: 36px; height: 20px; border-radius: 10px; background: #d9d9d9; position: relative; + cursor: pointer; transition: background 0.2s; border: none; + } + .switch-toggle::after { + content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; + border-radius: 50%; background: #fff; transition: left 0.2s; + } + .switch-toggle.on { background: #1677ff; } + .switch-toggle.on::after { left: 18px; } + .addr-form-actions { display: flex; gap: 8px; margin-top: 12px; } + .addr-form-actions .btn { + flex: 1; height: 36px; border-radius: 18px; border: none; font-size: 13px; + font-weight: 600; cursor: pointer; + } + .addr-form-actions .btn-cancel { background: #f5f5f5; color: #666; } + .addr-form-actions .btn-save { background: #1677ff; color: #fff; } + .pickup-name { font-size: 14px; font-weight: 600; color: #333; } + .pickup-addr { font-size: 12px; color: #666; margin-top: 4px; } + .pickup-time { font-size: 11px; color: #1677ff; margin-top: 4px; } + .presale-status { + font-size: 11px; padding: 2px 8px; border-radius: 8px; + background: #fff7e6; color: #fa8c16; font-weight: 600; + } + .hidden { display: none !important; } .action-btns { padding: 16px; display: flex; gap: 12px; } .action-btns .btn { flex: 1; height: 44px; border-radius: 22px; border: none; font-size: 15px; @@ -73,28 +213,278 @@
-
-
下单成功
-
请凭取餐码到窗口取餐
+
+
下单成功
+
请凭取餐码到窗口取餐
-
+ +
取餐码
A086
请在 30 分钟内取餐,超时将自动取消
+ +
订单详情
-
宫保鸡丁 ×1¥12
-
炒西兰花 ×1¥8
-
清蒸鱼 ×1¥18
-
合计¥38.00
+
+
宫保鸡丁 ×1¥12
+
炒西兰花 ×1¥8
+
清蒸鱼 ×1¥18
+
+
合计¥38.00
-
+ diff --git a/other-module/mini-program/nutrition/eat-order.html b/other-module/mini-program/nutrition/eat-order.html index a71d64f..561415f 100644 --- a/other-module/mini-program/nutrition/eat-order.html +++ b/other-module/mini-program/nutrition/eat-order.html @@ -32,7 +32,23 @@ .page-content { flex: 1; overflow-y: auto; background: #f5f5f5; } .page-content::-webkit-scrollbar { display: none; } /* 业务样式 */ + /* 订单类型 Tab:餐品 / 餐品净菜包 */ + .type-tabs { display: flex; background: #fff; border-bottom: 0.5px solid #f0f0f0; padding: 0 16px; flex-shrink: 0; } + .type-tab { + flex: 1; text-align: center; padding: 12px 0; font-size: 14px; color: #666; + position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; + } + .type-tab.active { color: #1677ff; font-weight: 600; } + .type-tab.active::after { + content: ''; position: absolute; bottom: 0; left: 30%; right: 30%; height: 2px; + background: #1677ff; border-radius: 1px; + } + .type-tab .presale-tag { + font-size: 10px; padding: 0 4px; background: #fff7e6; color: #fa8c16; + border-radius: 3px; font-weight: 600; + } .order-layout { display: flex; height: 100%; } + .order-layout.hidden { display: none; } .category-sidebar { width: 80px; background: #f8f8f8; overflow-y: auto; flex-shrink: 0; } @@ -113,8 +129,14 @@ 订餐
+ +
+
🍽️ 餐品
+
🥬 餐品净菜包 预售
+
-
+ +
热菜
@@ -200,10 +222,95 @@
+ +
- + 🛒 3 @@ -211,18 +318,36 @@
¥38.00
已选 3 个餐品
- +
diff --git a/other-module/mini-program/nutrition/eat-recipe-today.html b/other-module/mini-program/nutrition/eat-recipe-today.html index 6282b4d..1249fc9 100644 --- a/other-module/mini-program/nutrition/eat-recipe-today.html +++ b/other-module/mini-program/nutrition/eat-recipe-today.html @@ -402,7 +402,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/eat-recipe.html b/other-module/mini-program/nutrition/eat-recipe.html index 6cdf851..3cab97e 100644 --- a/other-module/mini-program/nutrition/eat-recipe.html +++ b/other-module/mini-program/nutrition/eat-recipe.html @@ -151,7 +151,7 @@
📷扫码点餐 - 🛒订餐 + 🛒订餐/净菜 📋查看食谱
@@ -190,7 +190,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/make-home.html b/other-module/mini-program/nutrition/make-home.html index 62e26b9..8bbc489 100644 --- a/other-module/mini-program/nutrition/make-home.html +++ b/other-module/mini-program/nutrition/make-home.html @@ -192,7 +192,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/make-popular.html b/other-module/mini-program/nutrition/make-popular.html index cb57146..6215e61 100644 --- a/other-module/mini-program/nutrition/make-popular.html +++ b/other-module/mini-program/nutrition/make-popular.html @@ -235,7 +235,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/make-ranking.html b/other-module/mini-program/nutrition/make-ranking.html index ea788b5..d1d9769 100644 --- a/other-module/mini-program/nutrition/make-ranking.html +++ b/other-module/mini-program/nutrition/make-ranking.html @@ -224,7 +224,7 @@ 🍽️ 💬 🍳 - 👤 + 👤
diff --git a/other-module/mini-program/nutrition/me-health.html b/other-module/mini-program/nutrition/me-health.html index 109c60c..1230da9 100644 --- a/other-module/mini-program/nutrition/me-health.html +++ b/other-module/mini-program/nutrition/me-health.html @@ -23,19 +23,27 @@ .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; } /* 用户卡片 */ - .profile-card { background: #fff; padding: 20px 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 14px; } - .profile-card .avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg,#e6f4ff,#bae0ff); display: flex; align-items: center; justify-content: center; font-size: 28px; } + .profile-card { background: #fff; padding: 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; } + .profile-card .avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg,#e6f4ff,#bae0ff); display: flex; align-items: center; justify-content: center; font-size: 24px; } + .profile-card .info { flex: 1; } .profile-card .info .name { font-size: 16px; font-weight: 600; margin-bottom: 4px; } .profile-card .info .meta { font-size: 12px; color: #999; } + .profile-card .cat { font-size: 11px; padding: 3px 8px; border-radius: 10px; background: #fff7e6; color: #fa8c16; } /* 通用分区 */ - .section { background: #fff; margin-bottom: 8px; padding: 16px; } - .sec-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; } - .sec-header .sec-title { font-size: 14px; font-weight: 600; color: #333; } - /* 身体指标 - 列表行 */ - .body-row { - display: flex; align-items: center; justify-content: space-between; - padding: 13px 0; border-bottom: 0.5px solid #f5f5f5; cursor: pointer; - } + .section { background: #fff; margin-bottom: 8px; padding: 14px 16px; } + .sec-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; } + .sec-header .sec-title { font-size: 14px; font-weight: 600; color: #333; display: flex; align-items: center; gap: 6px; } + .sec-header .sec-title .sec-icon { font-size: 16px; } + .sec-header .sec-action { font-size: 12px; color: #1677ff; cursor: pointer; } + .sec-header .sec-action.readonly { color: #999; } + /* 只读信息行 */ + .info-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 0.5px solid #f5f5f5; } + .info-row:last-child { border-bottom: none; } + .info-row .i-label { font-size: 13px; color: #666; } + .info-row .i-value { font-size: 13px; color: #333; font-weight: 500; } + .info-row .i-value .i-unit { font-size: 11px; color: #999; margin-left: 2px; } + /* 身体指标 - 列表行(可编辑) */ + .body-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 0.5px solid #f5f5f5; cursor: pointer; } .body-row:last-child { border-bottom: none; } .body-row .b-label { font-size: 14px; color: #333; } .body-row .b-right { display: flex; align-items: center; gap: 4px; } @@ -48,29 +56,52 @@ .tag { padding: 5px 12px; border-radius: 14px; font-size: 12px; background: #f0f7ff; color: #1677ff; } .tag.warn { background: #fff7e6; color: #fa8c16; } .tag.danger { background: #fff1f0; color: #f5222d; } - .tag-add { padding: 5px 12px; border-radius: 14px; font-size: 12px; background: #fafafa; color: #999; border: 1px dashed #d9d9d9; cursor: pointer; } - /* 疾病信息列表 */ - .disease-list { } - .disease-item { padding: 12px 0; border-bottom: 0.5px solid #f0f0f0; } + .tag.orange { background: #fff7e6; color: #fa8c16; } + /* 疾病信息 */ + .disease-item { padding: 10px 0; border-bottom: 0.5px solid #f0f0f0; } .disease-item:last-child { border-bottom: none; } .disease-item .d-label { font-size: 12px; color: #999; margin-bottom: 6px; } .disease-item .d-tags { display: flex; flex-wrap: wrap; gap: 6px; } .disease-item .d-tag { padding: 4px 10px; border-radius: 12px; font-size: 12px; background: #fff1f0; color: #f5222d; } .disease-item .d-tag.med { background: #f0f7ff; color: #1677ff; } .disease-item .d-empty { font-size: 12px; color: #ccc; } + /* 菜品偏好 */ + .dish-block { padding: 10px 0; border-bottom: 0.5px solid #f0f0f0; } + .dish-block:last-child { border-bottom: none; } + .dish-block .d-label { font-size: 12px; color: #999; margin-bottom: 8px; } + .dish-block .dish-tags { display: flex; flex-wrap: wrap; gap: 6px; } + .dish-block .dish-tag { padding: 4px 10px; border-radius: 12px; font-size: 12px; background: #f0f7ff; color: #1677ff; } + .dish-block .dish-tag.rec { background: #f6ffed; color: #52c41a; } + .dish-block .dish-big { font-size: 13px; color: #fa8c16; font-weight: 600; } + .dish-block .dish-big.green { color: #52c41a; } + .dish-block .dish-text { font-size: 13px; color: #666; } + /* 妈妈味道 */ + .mom-hero { display: flex; align-items: center; gap: 10px; padding: 8px 0; } + .mom-hero .mom-icon { width: 36px; height: 36px; border-radius: 10px; background: #fff7e6; display: flex; align-items: center; justify-content: center; font-size: 18px; } + .mom-hero .mom-info .mom-title { font-size: 14px; font-weight: 600; color: #333; } + .mom-hero .mom-info .mom-sub { font-size: 11px; color: #999; margin-top: 2px; } + .mom-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } + .mom-tags .mom-tag { padding: 4px 10px; border-radius: 12px; font-size: 12px; background: #fff7e6; color: #fa8c16; } + .mom-block { padding: 8px 0; border-bottom: 0.5px solid #f0f0f0; } + .mom-block:last-child { border-bottom: none; } + .mom-block .m-label { font-size: 12px; color: #999; margin-bottom: 6px; } + .mom-block .m-text { font-size: 13px; color: #333; line-height: 1.5; } + .mom-block .m-text.green { color: #52c41a; font-weight: 600; } /* 营养目标 */ .goal-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 0.5px solid #f0f0f0; } .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; } + /* 体检报告入口 */ + .exam-entry { margin-top: 12px; padding: 10px 12px; background: #f5f5f5; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; } + .exam-entry .e-left { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #333; } + .exam-entry .e-arrow { font-size: 14px; color: #ccc; } /* ========== 编辑弹窗通用样式 ========== */ - /* 遮罩层:覆盖整个 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; @@ -85,9 +116,9 @@ .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-group .m-g-hint { font-size: 11px; color: #bbb; margin-top: 4px; } /* 可编辑的标签列表(带 × 删除) */ .m-tag-list { display: flex; flex-wrap: wrap; gap: 8px; } .m-tag { @@ -96,13 +127,13 @@ background: #fff1f0; color: #f5222d; } .m-tag.med { background: #f0f7ff; color: #1677ff; } + .m-tag.warn { background: #fff7e6; color: #fa8c16; } .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; @@ -128,6 +159,19 @@ } .m-goal-row input:focus { border-color: #1677ff; } .m-goal-row .mg-unit { font-size: 12px; color: #999; min-width: 36px; } + /* 通用文本输入(妈妈味道/菜品偏好) */ + .m-input { + width: 100%; height: 36px; border: 1px solid #e5e5e5; border-radius: 8px; + padding: 0 12px; font-size: 13px; outline: none; background: #fafafa; + margin-top: 6px; + } + .m-input:focus { border-color: #1677ff; background: #fff; } + .m-textarea { + width: 100%; min-height: 64px; border: 1px solid #e5e5e5; border-radius: 8px; + padding: 8px 12px; font-size: 13px; outline: none; background: #fafafa; + margin-top: 6px; resize: none; line-height: 1.5; font-family: inherit; + } + .m-textarea:focus { border-color: #1677ff; background: #fff; } @@ -146,55 +190,64 @@
👤
张三
-
男 · 32岁 · 172cm · 68kg
+
男 · 32岁 · 公司机关/研发部
+ 会员用户 - -
-
身体指标
-
+ + +
+
+ 📏身体指标 + 编辑 › +
+
身高 - 172cm + 172cm
-
+
体重 - 68kg + 68kg
-
+
BMI - 23.0正常 + 23.0正常
-
+
体脂率 - 18.5%标准 + 18.5%标准
-
+
活动水平 - 中等每周3-5次 + 中度活动每周3-5次
- -
-
过敏信息
-
- 🥜 花生过敏 - 🦐 海鲜过敏 - + 添加 + + +
+
+ 🩺体检信息 + 只读 +
+
体检日期2026-03-15
+
血压125/80mmHg
+
空腹血糖5.2mmol/L
+
血脂正常
+
尿酸380μmol/L
+
肝功能正常
+
肾功能正常
+
+ 📎 查看体检报告 +
- -
-
饮食禁忌
-
- 🌶️ 少辣 - 🧂 低盐 - 🍬 控糖 - + 添加 -
-
- + +
-
疾病信息
+
+ 🏥疾病信息 + 编辑 › +
疾病史
@@ -203,6 +256,12 @@ 高尿酸
+
+
用药情况
+
+ 别嘌醇片依那普利 +
+
家族病史
@@ -210,17 +269,124 @@ 糖尿病
-
-
用药情况
-
- 别嘌醇片依那普利 -
+
+
+ + +
+
+ 👅口味偏好 + 编辑 › +
+
+
口味偏好
+
+ 偏辣 +
+
+
+
地域菜系
+
+ 川菜 + 湘菜
- + + +
+
+ 🚫禁忌关联 + 编辑 › +
+
+
饮食禁忌
+
+ 🌶️ 少辣 + 🧂 低盐 + 🍬 控糖 +
+
+
+
过敏原
+
+ 🥜 花生 + 🦐 海鲜 +
+
+
+ + +
+
+ 📊动态生理 + 只读 +
+
日均运动量6000步/日
+
静息心率68bpm
+
平均睡眠7.5h
+
压力指数
+
数据来源智能手环
+
+ + +
+
+ 🍲菜品偏好 + 编辑 › +
+
+
常点菜品
+
+ 宫保鸡丁 + 清炒西兰花 + 杂粮饭 +
+
+
+
忌口菜品
+
油炸花生
+
+
+ + +
+
+ 🏡妈妈味道 + 编辑 › +
+
+
🏠
+
+
家乡:四川成都
+
从童年记忆中沉淀的味觉偏好
+
+
+
+ 麻辣 + 红油 + 鲜香 +
+
+
思乡菜清单
+
+ 回锅肉 + 麻婆豆腐 + 水煮鱼 +
+
+
+
关联记忆
+
从小常吃妈妈做的回锅肉,奠定了麻辣口味偏好。
+
+
+ +
-
营养目标
+
+ 🎯营养目标 + 编辑 › +
每日热量2000 kcal
蛋白质≥60g
膳食纤维≥25g
@@ -229,42 +395,192 @@
+ + + + + + + + + + + + + + + @@ -273,7 +589,7 @@ - \ No newline at end of file + diff --git a/other-module/mini-program/nutrition/me-home.html b/other-module/mini-program/nutrition/me-home.html index 71e7d7c..d920ebe 100644 --- a/other-module/mini-program/nutrition/me-home.html +++ b/other-module/mini-program/nutrition/me-home.html @@ -88,6 +88,14 @@ font-size: 15px; font-weight: 500; text-align: center; cursor: pointer; border: 1px solid #fde2e2; letter-spacing: 1px; } + /* 模拟登录按钮(原型演示用) */ + .simulate-login-btn { + display: block; width: calc(100% - 32px); margin: 20px auto 0; padding: 13px 0; + border: none; border-radius: 22px; background: #07c160; color: #fff; + font-size: 15px; font-weight: 600; text-align: center; cursor: pointer; + letter-spacing: 1px; box-shadow: 0 6px 16px rgba(7, 193, 96, 0.24); + text-decoration: none; + } @@ -132,13 +140,15 @@ 📝操作日志 ⚙️设置
+ +
diff --git a/other-module/mini-program/nutrition/me-order-detail.html b/other-module/mini-program/nutrition/me-order-detail.html index 5c020b8..d343d9a 100644 --- a/other-module/mini-program/nutrition/me-order-detail.html +++ b/other-module/mini-program/nutrition/me-order-detail.html @@ -61,6 +61,41 @@ .advice-card { background: #fff; border-radius: 12px; padding: 12px 14px; margin: 0 16px 24px; } .advice-title { font-size: 12px; font-weight: 600; color: #333; margin-bottom: 8px; } .advice-text { font-size: 12px; color: #fa8c16; line-height: 1.7; } + /* 净菜包订单详情专属样式 */ + .fulfill-section { padding: 12px 16px 0; } + .sec-card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); } + .sec-card .sec-title { font-size: 13px; font-weight: 600; color: #333; margin-bottom: 10px; } + .info-row { display: flex; padding: 6px 0; font-size: 13px; border-bottom: 0.5px solid #f5f5f5; } + .info-row:last-child { border-bottom: none; } + .ir-label { width: 80px; color: #999; flex-shrink: 0; } + .ir-value { flex: 1; color: #333; line-height: 1.5; } + /* 时间线 */ + .timeline { padding: 4px 0 0; } + .tl-item { display: flex; gap: 12px; padding: 0 0 20px; position: relative; } + .tl-item:last-child { padding-bottom: 0; } + .tl-item::before { + content: ''; position: absolute; left: 5px; top: 14px; bottom: -4px; + width: 2px; background: #e8e8e8; + } + .tl-item:last-child::before { display: none; } + .tl-item.done::before { background: #52c41a; } + .tl-dot { + width: 12px; height: 12px; border-radius: 50%; background: #e8e8e8; + flex-shrink: 0; margin-top: 4px; position: relative; z-index: 1; + border: 2px solid #fff; + } + .tl-item.done .tl-dot { background: #52c41a; } + .tl-item.active .tl-dot { background: #1677ff; box-shadow: 0 0 0 3px rgba(22,119,255,0.2); } + .tl-content { flex: 1; } + .tl-title { font-size: 13px; font-weight: 600; color: #999; } + .tl-item.done .tl-title { color: #52c41a; } + .tl-item.active .tl-title { color: #1677ff; } + .tl-time { font-size: 11px; color: #999; margin-top: 2px; } + .presale-tag { + font-size: 10px; padding: 1px 6px; border-radius: 6px; + background: #fff7e6; color: #fa8c16; font-weight: 600; + } + .hidden { display: none !important; } @@ -75,7 +110,7 @@
-
+
2026-04-28 午餐
@@ -95,8 +130,70 @@ 余额支付
+ + -
+
菜品明细 · 食材 · 溯源
@@ -188,5 +285,84 @@
+ \ No newline at end of file diff --git a/other-module/mini-program/nutrition/me-orders.html b/other-module/mini-program/nutrition/me-orders.html index 5d01bf4..5a38ff6 100644 --- a/other-module/mini-program/nutrition/me-orders.html +++ b/other-module/mini-program/nutrition/me-orders.html @@ -24,11 +24,22 @@ .order-tabs .ot.active { color: #1677ff; font-weight: 600; } .order-tabs .ot.active::after { content: ''; position: absolute; bottom: 0; left: 30%; right: 30%; height: 2px; background: #1677ff; border-radius: 1px; } .order-card { margin: 0 12px 10px; background: #fff; border-radius: 10px; padding: 14px; text-decoration: none; color: inherit; display: block; } - .order-card .card-top { display: flex; justify-content: space-between; margin-bottom: 10px; } + .order-card .card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; } + .order-card .shop-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .order-card .shop { font-size: 14px; font-weight: 600; } + .order-card .type-tag { font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; line-height: 16px; } + .order-card .type-tag.meal { background: #e6f4ff; color: #1677ff; } + .order-card .type-tag.clean { background: #fff7e6; color: #fa8c16; } .order-card .status { font-size: 12px; color: #52c41a; font-weight: 500; } .order-card .status.pending { color: #fa8c16; } + .order-card .status.shipping { color: #1677ff; } + .order-card .status.processing { color: #722ed1; } .order-card .items { font-size: 12px; color: #666; margin-bottom: 8px; line-height: 1.6; } + .order-card .fulfill-meta { + font-size: 11px; color: #fa8c16; margin-bottom: 8px; padding: 4px 8px; + background: #fff7e6; border-radius: 6px; display: flex; align-items: center; gap: 4px; + } + .order-card .fulfill-meta.done { color: #52c41a; background: #f6ffed; } .order-card .card-bottom { display: flex; justify-content: space-between; align-items: center; } .order-card .total { font-size: 14px; font-weight: 700; color: #f5222d; } .order-card .time { font-size: 11px; color: #999; } @@ -48,20 +59,48 @@
全部 待取餐 + 待配送 已完成
-
🍽️ 阳光食堂 · 午餐待取餐
+
+
🍽️ 阳光食堂 · 午餐餐品
+ 待取餐 +
低脂鸡胸肉沙拉 ×1、杂粮饭 ×1、紫菜蛋花汤 ×1
¥ 28.5今天 11:32
+ +
+
🥬 阳光食堂 · 净菜包订单净菜包
+ 待配送 +
+
宫保鸡丁净菜包 ×2、低脂控糖套餐净菜包 ×1
+
🚚 配送到家 · 明日(4月29日)11:00-12:00
+
¥ 79.0今天 14:23 下单
+
-
🍽️ 阳光食堂 · 早餐已完成
+
+
🍽️ 阳光食堂 · 早餐餐品
+ 已完成 +
全麦三明治 ×1、鲜榨橙汁 ×1
¥ 15.0今天 07:45
+ +
+
🥬 阳光食堂 · 净菜包订单净菜包
+ 已完成 +
+
红烧肉净菜包 ×1、番茄炒蛋净菜包 ×1
+
🏪 食堂自提 · 已取货
+
¥ 36.0昨天 12:15
+
-
🍽️ 健康轻食 · 午餐已完成
+
+
🍽️ 健康轻食 · 午餐餐品
+ 已完成 +
三文鱼牛油果碗 ×1、蔬菜汁 ×1
¥ 42.0昨天 12:15
diff --git a/start-server.bat b/start-server.bat deleted file mode 100644 index 628bc5f..0000000 --- a/start-server.bat +++ /dev/null @@ -1,10 +0,0 @@ -@echo off -echo ============================================ -echo 健康CQ原型 - 本地预览服务器 -echo ============================================ -echo. -echo 打开浏览器访问: http://localhost:3000/ -echo 按 Ctrl+C 停止服务器 -echo. -node server.js -pause diff --git a/web-admin/nutrition/din-dish-add.html b/web-admin/nutrition/din-dish-add.html index 1d268de..923d8d1 100644 --- a/web-admin/nutrition/din-dish-add.html +++ b/web-admin/nutrition/din-dish-add.html @@ -88,6 +88,14 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei .spec-toggle.active .spec-toggle__switch::after{transform:translateX(14px);} .spec-toggle__label{font-size:11px;color:var(--text-placeholder);} .spec-toggle.active .spec-toggle__label{color:var(--primary);font-weight:500;} +/* 外售净菜包胶囊开关 */ +.sale-toggle{display:inline-flex;align-items:center;gap:6px;cursor:pointer;user-select:none;} +.sale-toggle__switch{width:32px;height:18px;background:#D9D9D9;border-radius:9px;position:relative;transition:background .2s;flex-shrink:0;} +.sale-toggle__switch::after{content:'';position:absolute;left:2px;top:2px;width:14px;height:14px;background:#fff;border-radius:50%;transition:transform .2s;box-shadow:0 1px 2px rgba(0,0,0,0.15);} +.sale-toggle.active .sale-toggle__switch{background:var(--success);} +.sale-toggle.active .sale-toggle__switch::after{transform:translateX(14px);} +.sale-toggle__label{font-size:11px;color:var(--text-placeholder);} +.sale-toggle.active .sale-toggle__label{color:var(--success);font-weight:500;} .btn-text{background:none;border:none;cursor:pointer;font-size:12px;padding:2px 6px;border-radius:var(--radius-sm);transition:all .15s;} .btn-text--primary{color:var(--primary);}.btn-text--primary:hover{background:var(--primary-light);} .btn-text--danger{color:var(--danger);}.btn-text--danger:hover{background:#FFF1F0;} @@ -361,11 +369,11 @@ var STEP_HTML = [
📐 餐品规格
- + - - - + + +
规格单位重量(g)售价(元/份)默认操作
规格单位重量(g)餐品售价(元/份)净菜包售价(元/份)外售净菜包默认操作
标准份35015.00
默认
小份20010.00
默认
+ 添加规格
标准份35015.0010.00
下架
默认
小份20010.007.00
下架
默认
+ 添加规格
📷 菜品展示
@@ -517,7 +525,7 @@ function addSpecRow(addRow){ if(document.querySelector('.spec-edit-row')) return; var tr=document.createElement('tr'); tr.className='spec-edit-row'; - tr.innerHTML=' '; + tr.innerHTML='
下架
'; addRow.parentNode.insertBefore(tr,addRow); } function confirmSpec(btn){ @@ -525,10 +533,18 @@ function confirmSpec(btn){ var sel=row.querySelector('select'); var inputs=row.querySelectorAll('input'); var name=sel?sel.value:''; - var weight=inputs[0].value.trim(),price=inputs[1].value.trim(); + var weight=inputs[0].value.trim(),price=inputs[1].value.trim(),cleanPrice=inputs[2].value.trim(); if(!name||name==='请选择'||!weight||!price){alert('请填写完整信息');return;} + var cleanPriceText = cleanPrice ? parseFloat(cleanPrice).toFixed(2) : '—'; + var saleActive = !!row.querySelector('.sale-toggle.active'); + var saleHtml = '
'+(saleActive?'上架':'下架')+'
'; row.className=''; - row.innerHTML=''+name+''+weight+''+parseFloat(price).toFixed(2)+'
默认
'; + row.innerHTML=''+name+''+weight+''+parseFloat(price).toFixed(2)+''+cleanPriceText+''+saleHtml+'
默认
'; +} +function toggleCleanSale(el){ + var active = el.classList.toggle('active'); + var label = el.querySelector('.sale-toggle__label'); + if(label) label.textContent = active ? '上架' : '下架'; } function cancelSpec(btn){btn.closest('tr').remove();} function toggleDefault(el){ @@ -678,7 +694,7 @@ var EDIT_DATA = { name:'红烧肉', category:'荤菜', method:'炖', meal:'午/晚', pyramid:'畜禽肉蛋水产', allergen:'无', tag:'高蛋白', status:'上架', crowd:[{name:'成人',level:'推荐'},{name:'高血脂人群',level:'慎食'},{name:'高血压人群',level:'适量'}], - specs:[{spec:'标准份',weight:200,price:12,isDefault:true},{spec:'小份',weight:120,price:8,isDefault:false},{spec:'大份',weight:300,price:18,isDefault:false}], + specs:[{spec:'标准份',weight:200,price:12,cleanPrice:9,cleanSale:false,isDefault:true},{spec:'小份',weight:120,price:8,cleanPrice:6,cleanSale:false,isDefault:false},{spec:'大份',weight:300,price:18,cleanPrice:13,cleanSale:false,isDefault:false}], composition:[{name:'五花肉',netType:'红烧块',amount:150,pct:'60%',type:'主材',allergen:'无',note:'—'},{name:'冰糖',netType:'糖浆',amount:20,pct:'8%',type:'调料',allergen:'无',note:'上色'},{name:'酱油',netType:'调味汁',amount:15,pct:'6%',type:'调料',allergen:'含大豆',note:'调味'},{name:'料酒',netType:'料酒汁',amount:10,pct:'4%',type:'调料',allergen:'无',note:'去腥'}], cook:{mainMethod:'炖',subMethod:'煎',heat:'中火→小火',duration:45,oil:15,salt:3,temp:100,output:200,steps:6,desc:'1.五花肉切块焯水;2.锅中煎至金黄;3.加冰糖炒色;4.加酱油料酒;5.加水小火炖40分钟;6.大火收汁'}, nutri:{calorie:385,protein:18.2,carb:12.4,fat:28.6,vitC:2.1,mineral:45,fiber:1.8,sodium:486}, @@ -720,7 +736,7 @@ if(pageMode==='convert' && INNOV){ EDIT_DATA.tag = INNOV.tag; EDIT_DATA.status = '上架'; EDIT_DATA.crowd = []; - EDIT_DATA.specs = [{spec:'标准份',weight:350,price:15,isDefault:true},{spec:'小份',weight:200,price:10,isDefault:false}]; + EDIT_DATA.specs = [{spec:'标准份',weight:350,price:15,cleanPrice:10,cleanSale:false,isDefault:true},{spec:'小份',weight:200,price:10,cleanPrice:7,cleanSale:false,isDefault:false}]; EDIT_DATA.composition = INNOV.composition; EDIT_DATA.cook = INNOV.cook; EDIT_DATA.nutri = INNOV.nutri; @@ -762,7 +778,9 @@ function fillEditData(){ specBody.innerHTML = ''; d.specs.forEach(function(s){ var tr = document.createElement('tr'); - tr.innerHTML = '删除'; + var saleActive = s.cleanSale === true; + var saleHtml = '
'+(saleActive?'上架':'下架')+'
'; + tr.innerHTML = ''+saleHtml+'删除'; specBody.appendChild(tr); }); } diff --git a/web-admin/nutrition/din-dish-all.html b/web-admin/nutrition/din-dish-all.html index 90235c0..5b4ebae 100644 --- a/web-admin/nutrition/din-dish-all.html +++ b/web-admin/nutrition/din-dish-all.html @@ -115,6 +115,14 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei .info-table tr:hover{background:#F8FBFF;} .spec-detail-table th{padding:6px 12px;font-size:12px;} .spec-detail-table td{padding:6px 12px;font-size:12px;} +/* 外售净菜包胶囊开关 */ +.sale-toggle{display:inline-flex;align-items:center;gap:6px;cursor:pointer;user-select:none;} +.sale-toggle__switch{width:32px;height:18px;background:#D9D9D9;border-radius:9px;position:relative;transition:background .2s;flex-shrink:0;} +.sale-toggle__switch::after{content:'';position:absolute;left:2px;top:2px;width:14px;height:14px;background:#fff;border-radius:50%;transition:transform .2s;box-shadow:0 1px 2px rgba(0,0,0,0.15);} +.sale-toggle.active .sale-toggle__switch{background:var(--success);} +.sale-toggle.active .sale-toggle__switch::after{transform:translateX(14px);} +.sale-toggle__label{font-size:11px;color:var(--text-placeholder);} +.sale-toggle.active .sale-toggle__label{color:var(--success);font-weight:500;} /* 图片/视频网格 */ .media-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;} @@ -274,7 +282,7 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}