From 25d7216534b482a706406851dc041fe9c6937ae2 Mon Sep 17 00:00:00 2001 From: zhangyan Date: Mon, 15 Jun 2026 17:34:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=89=80=E6=9C=89=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E8=BF=94=E5=9B=9E=E6=8C=89?= =?UTF-8?q?=E9=92=AE=EF=BC=8C=E5=AE=9E=E7=8E=B0=E4=BB=8E=E5=93=AA=E6=9D=A5?= =?UTF-8?q?=E5=9B=9E=E5=93=AA=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 营养秤:开餐、餐品展示、取餐(单屏/双屏)、设置、采样、采样历史 - 验收秤:验收操作、设置、验收历史、食材采样、采样历史 - 加工毛菜秤:清洗任务、来料过秤、称重、清洗、净菜过秤、操作记录、设置 - 配比秤:打包任务、称重打包、打包记录、设置 - 净菜配比秤:切割任务、称重、切割、历史记录、设置 返回逻辑:优先 URL 参数 referer → document.referrer → index.html Co-Authored-By: Claude Opus 4.6 --- .../01-meal-start.html | 20 ++++++++++++++++- .../02-dish-display.html | 20 ++++++++++++++++- .../03-meal-pickup-dual-large.html | 21 ++++++++++++++++++ .../03-meal-pickup-dual-small.html | 21 ++++++++++++++++++ .../03-meal-pickup.html | 22 +++++++++++++++++++ .../canteen-nutrition-scale/04-settings.html | 20 ++++++++++++++++- .../05-dish-sampling.html | 20 ++++++++++++++++- .../06-sampling-history.html | 20 ++++++++++++++++- .../01-cutting-tasks.html | 20 ++++++++++++++++- .../clean-veg-ratio-scale/02-weighing.html | 20 ++++++++++++++++- .../clean-veg-ratio-scale/03-cutting.html | 20 ++++++++++++++++- .../clean-veg-ratio-scale/04-history.html | 20 ++++++++++++++++- .../clean-veg-ratio-scale/05-settings.html | 20 ++++++++++++++++- .../ratio-scale/01-packing-tasks.html | 20 ++++++++++++++++- .../ratio-scale/02-weighing-packing.html | 20 ++++++++++++++++- .../ratio-scale/03-history.html | 20 ++++++++++++++++- .../ratio-scale/04-settings.html | 20 ++++++++++++++++- .../01-verify-inspection.html | 20 ++++++++++++++++- .../raw-veg-inspection-scale/02-settings.html | 20 ++++++++++++++++- .../03-verify-history.html | 20 ++++++++++++++++- .../04-ingredient-sampling.html | 20 ++++++++++++++++- .../05-sampling-history.html | 20 ++++++++++++++++- .../01-washing-tasks.html | 20 ++++++++++++++++- .../02-batch-weighing.html | 20 ++++++++++++++++- .../raw-veg-processing-scale/02-weighing.html | 20 ++++++++++++++++- .../03-batch-washing.html | 20 ++++++++++++++++- .../raw-veg-processing-scale/03-washing.html | 20 ++++++++++++++++- .../raw-veg-processing-scale/04-history.html | 20 ++++++++++++++++- .../raw-veg-processing-scale/05-settings.html | 20 ++++++++++++++++- 29 files changed, 558 insertions(+), 26 deletions(-) diff --git a/other-module/canteen-device/canteen-nutrition-scale/01-meal-start.html b/other-module/canteen-device/canteen-nutrition-scale/01-meal-start.html index 0fc2f29..e49d0c9 100644 --- a/other-module/canteen-device/canteen-nutrition-scale/01-meal-start.html +++ b/other-module/canteen-device/canteen-nutrition-scale/01-meal-start.html @@ -439,7 +439,8 @@
- 开餐界面 + + ◀ 返回 开餐界面
@@ -941,5 +942,22 @@ /* 启动 */ init(); + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/canteen-nutrition-scale/02-dish-display.html b/other-module/canteen-device/canteen-nutrition-scale/02-dish-display.html index 5f302e7..1eba127 100644 --- a/other-module/canteen-device/canteen-nutrition-scale/02-dish-display.html +++ b/other-module/canteen-device/canteen-nutrition-scale/02-dish-display.html @@ -181,7 +181,8 @@
- Phone-192.168.1.165:5555 + + ◀ 返回 Phone-192.168.1.165:5555
@@ -311,5 +312,22 @@ window.location.href = '04-settings.html'; }); + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup-dual-large.html b/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup-dual-large.html index e80449e..d3641d1 100644 --- a/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup-dual-large.html +++ b/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup-dual-large.html @@ -215,6 +215,10 @@
+ +
+ ◀ 返回 +
@@ -302,6 +306,23 @@ ''; } document.getElementById('dishImg').innerHTML = dishFoodSVG(120, 90, ['#C87030', '#E8A040', '#D08028']); + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup-dual-small.html b/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup-dual-small.html index 40fef8d..095e018 100644 --- a/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup-dual-small.html +++ b/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup-dual-small.html @@ -86,6 +86,10 @@
+ +
📊 本餐次摄入 @@ -172,5 +176,22 @@
+ diff --git a/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup.html b/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup.html index 6ba17e2..72ab79b 100644 --- a/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup.html +++ b/other-module/canteen-device/canteen-nutrition-scale/03-meal-pickup.html @@ -305,6 +305,11 @@
+ + +
@@ -538,6 +543,23 @@ } // 宫保鸡丁:暖橙金 document.getElementById('dishEmoji').innerHTML = dishFoodSVG(48, 48, ['#C87030', '#E8A040', '#D08028']); + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/canteen-nutrition-scale/04-settings.html b/other-module/canteen-device/canteen-nutrition-scale/04-settings.html index a7dce97..0f5a352 100644 --- a/other-module/canteen-device/canteen-nutrition-scale/04-settings.html +++ b/other-module/canteen-device/canteen-nutrition-scale/04-settings.html @@ -263,7 +263,8 @@
- 设置 + + ◀ 返回 设置
@@ -521,5 +522,22 @@ if (e.target === spoonTareModal) closeSpoonTareModal(); }); + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + \ No newline at end of file diff --git a/other-module/canteen-device/canteen-nutrition-scale/05-dish-sampling.html b/other-module/canteen-device/canteen-nutrition-scale/05-dish-sampling.html index 0e2c429..37332b3 100644 --- a/other-module/canteen-device/canteen-nutrition-scale/05-dish-sampling.html +++ b/other-module/canteen-device/canteen-nutrition-scale/05-dish-sampling.html @@ -189,7 +189,8 @@ body {
- 餐品采样 + + ◀ 返回 餐品采样
@@ -672,5 +673,22 @@ function bindEvents() { /* 启动 */ init(); + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/canteen-nutrition-scale/06-sampling-history.html b/other-module/canteen-device/canteen-nutrition-scale/06-sampling-history.html index 8d50610..d29890e 100644 --- a/other-module/canteen-device/canteen-nutrition-scale/06-sampling-history.html +++ b/other-module/canteen-device/canteen-nutrition-scale/06-sampling-history.html @@ -230,7 +230,8 @@ body {
- 采样历史 + + ◀ 返回 采样历史
@@ -559,5 +560,22 @@ function resampleDish() { /* ===== 初始化 ===== */ renderWaterfall(); + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/clean-veg-ratio-scale/01-cutting-tasks.html b/other-module/canteen-device/clean-veg-ratio-scale/01-cutting-tasks.html index 3b6f392..2d910b0 100644 --- a/other-module/canteen-device/clean-veg-ratio-scale/01-cutting-tasks.html +++ b/other-module/canteen-device/clean-veg-ratio-scale/01-cutting-tasks.html @@ -177,7 +177,8 @@
- 今日切配任务 + + ◀ 返回 今日切配任务 --
@@ -596,5 +597,22 @@ el._timer = setTimeout(function() { el.classList.remove('show'); }, duration || 2000); } + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/clean-veg-ratio-scale/02-weighing.html b/other-module/canteen-device/clean-veg-ratio-scale/02-weighing.html index 1c08ee2..b541277 100644 --- a/other-module/canteen-device/clean-veg-ratio-scale/02-weighing.html +++ b/other-module/canteen-device/clean-veg-ratio-scale/02-weighing.html @@ -91,7 +91,8 @@
- 称重录入 + + ◀ 返回 称重录入 --
@@ -352,5 +353,22 @@ init(); + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/clean-veg-ratio-scale/03-cutting.html b/other-module/canteen-device/clean-veg-ratio-scale/03-cutting.html index 838228d..5fd174e 100644 --- a/other-module/canteen-device/clean-veg-ratio-scale/03-cutting.html +++ b/other-module/canteen-device/clean-veg-ratio-scale/03-cutting.html @@ -86,7 +86,8 @@
- 切配操作 + + ◀ 返回 切配操作 --
@@ -311,5 +312,22 @@ el._timer = setTimeout(function() { el.classList.remove('show'); }, duration || 2000); } + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/clean-veg-ratio-scale/04-history.html b/other-module/canteen-device/clean-veg-ratio-scale/04-history.html index 23e52a4..dc9dca0 100644 --- a/other-module/canteen-device/clean-veg-ratio-scale/04-history.html +++ b/other-module/canteen-device/clean-veg-ratio-scale/04-history.html @@ -70,7 +70,8 @@
- 切配记录 + + ◀ 返回 切配记录 --
@@ -246,5 +247,22 @@ var userName = getUrlParam('user'); if (userName) document.getElementById('topUser').textContent = '操作员: ' + userName; + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/clean-veg-ratio-scale/05-settings.html b/other-module/canteen-device/clean-veg-ratio-scale/05-settings.html index 3ea8285..92aac64 100644 --- a/other-module/canteen-device/clean-veg-ratio-scale/05-settings.html +++ b/other-module/canteen-device/clean-veg-ratio-scale/05-settings.html @@ -53,7 +53,8 @@
- 设备设置 + + ◀ 返回 设备设置 --
@@ -168,5 +169,22 @@ el._timer = setTimeout(function() { el.classList.remove('show'); }, duration || 2000); } + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/ratio-scale/01-packing-tasks.html b/other-module/canteen-device/ratio-scale/01-packing-tasks.html index 2b6fc55..e469a5e 100644 --- a/other-module/canteen-device/ratio-scale/01-packing-tasks.html +++ b/other-module/canteen-device/ratio-scale/01-packing-tasks.html @@ -143,7 +143,8 @@
- 今日打包任务 + + ◀ 返回 今日打包任务 --
@@ -599,5 +600,22 @@ el._timer = setTimeout(function() { el.classList.remove('show'); }, duration || 2000); } + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/ratio-scale/02-weighing-packing.html b/other-module/canteen-device/ratio-scale/02-weighing-packing.html index 139c8c6..96b85ae 100644 --- a/other-module/canteen-device/ratio-scale/02-weighing-packing.html +++ b/other-module/canteen-device/ratio-scale/02-weighing-packing.html @@ -109,7 +109,8 @@
- 称重打包 + + ◀ 返回 称重打包 --
@@ -405,5 +406,22 @@ init(); + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/ratio-scale/03-history.html b/other-module/canteen-device/ratio-scale/03-history.html index 398f5ac..e197f45 100644 --- a/other-module/canteen-device/ratio-scale/03-history.html +++ b/other-module/canteen-device/ratio-scale/03-history.html @@ -66,7 +66,8 @@
- 打包记录 + + ◀ 返回 打包记录 --
@@ -236,5 +237,22 @@ var userName = getUrlParam('user'); if (userName) document.getElementById('topUser').textContent = '操作员: ' + userName; + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/ratio-scale/04-settings.html b/other-module/canteen-device/ratio-scale/04-settings.html index a53df34..0920e5a 100644 --- a/other-module/canteen-device/ratio-scale/04-settings.html +++ b/other-module/canteen-device/ratio-scale/04-settings.html @@ -52,7 +52,8 @@
- 设备设置 + + ◀ 返回 设备设置 --
@@ -167,5 +168,22 @@ el._timer = setTimeout(function() { el.classList.remove('show'); }, duration || 2000); } + +/* 返回按钮:从哪来回哪去 */ +(function() { + var backBtn = document.getElementById('backBtn'); + if (backBtn) { + var params = new URLSearchParams(window.location.search); + var referer = params.get('referer'); + if (referer) { + backBtn.href = referer; + } else if (document.referrer && document.referrer.indexOf(window.location.hostname) !== -1) { + backBtn.href = document.referrer; + } else { + backBtn.href = 'index.html'; + } + } +})(); + diff --git a/other-module/canteen-device/raw-veg-inspection-scale/01-verify-inspection.html b/other-module/canteen-device/raw-veg-inspection-scale/01-verify-inspection.html index 4ad651d..1fd3f22 100644 --- a/other-module/canteen-device/raw-veg-inspection-scale/01-verify-inspection.html +++ b/other-module/canteen-device/raw-veg-inspection-scale/01-verify-inspection.html @@ -716,7 +716,8 @@
- 食材验收识别屏 + + ◀ 返回 食材验收识别屏