From 52776c18e92e1ac9ee6427bdd9f63583a24535ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=9F=B5=E7=90=B4?= <757188142@qq.com> Date: Thu, 9 Apr 2026 09:14:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(health-consult):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E9=94=AE=E8=B7=AF=E7=94=B1=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E7=A7=91=E5=AE=A4/=E7=96=BE?= =?UTF-8?q?=E7=97=85=E4=B8=93=E5=AE=B6=E6=95=B0=E9=87=8F=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用 ?from 参数记录来源页,修复多入口页面返回键硬编码问题 - expert-profile 返回键根据来源跳回 index/expert-list,fallback history.back - text-chat 移除返回键(咨询进行中不允许随意返回,避免循环跳转) - rate-doctor 新增返回键,提交后跳转 my-records 而非 index - record-detail 跳转 text-chat 时携带 ?from=record-detail 参数 - find-expert 科室面板和疾病面板新增专家数量展示 Co-Authored-By: Claude Sonnet 4.6 --- employee-app/health-consult/expert-list.html | 6 +- .../health-consult/expert-profile.html | 21 ++++- employee-app/health-consult/find-expert.html | 77 +++++++++++++------ employee-app/health-consult/index.html | 22 ++++-- employee-app/health-consult/rate-doctor.html | 22 +++++- .../health-consult/record-detail.html | 4 +- employee-app/health-consult/text-chat.html | 5 +- 7 files changed, 115 insertions(+), 42 deletions(-) diff --git a/employee-app/health-consult/expert-list.html b/employee-app/health-consult/expert-list.html index 817421f..c976acb 100644 --- a/employee-app/health-consult/expert-list.html +++ b/employee-app/health-consult/expert-list.html @@ -113,7 +113,7 @@
-
+
👨‍⚕️
@@ -134,7 +134,7 @@
-
+
👩‍⚕️
@@ -155,7 +155,7 @@
-
+
👨‍⚕️
diff --git a/employee-app/health-consult/expert-profile.html b/employee-app/health-consult/expert-profile.html index a0e6e45..1d43339 100644 --- a/employee-app/health-consult/expert-profile.html +++ b/employee-app/health-consult/expert-profile.html @@ -360,7 +360,7 @@ @@ -518,7 +518,7 @@ /* [交互] 确认须知后根据类型跳转 */ function confirmNotice() { if (currentNoticeType === 'text') { - window.location.href = 'text-chat.html'; + window.location.href = 'text-chat.html?from=expert-profile'; } else if (currentNoticeType === 'video') { window.location.href = 'video-booking.html'; } @@ -530,6 +530,23 @@ closeModal('noticeModal'); } }); + + /** + * 返回上一页:优先读取 ?from 参数,否则 history.back(),最终 fallback 到 index.html + */ + function goBack() { + var params = new URLSearchParams(window.location.search); + var from = params.get('from'); + if (from === 'index') { + window.location.href = 'index.html'; + } else if (from === 'expert-list') { + window.location.href = 'expert-list.html'; + } else if (history.length > 1) { + history.back(); + } else { + window.location.href = 'index.html'; + } + } diff --git a/employee-app/health-consult/find-expert.html b/employee-app/health-consult/find-expert.html index 211b3d0..45a4771 100644 --- a/employee-app/health-consult/find-expert.html +++ b/employee-app/health-consult/find-expert.html @@ -70,10 +70,12 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items: .dept-right-content { flex: 1; overflow-y: auto; padding: 16px 12px; background: #fff; } .dept-grid { display: none; flex-wrap: wrap; gap: 10px; } .dept-grid.active { display: flex; } -.dept-item { width: calc(50% - 5px); background: #f7f8fa; border-radius: 10px; padding: 14px 10px; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: all 0.2s; font-size: 13px; color: #333; } +.dept-item { width: calc(50% - 5px); background: #f7f8fa; border-radius: 10px; padding: 12px 10px; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: all 0.2s; font-size: 13px; color: #333; } .dept-item:hover { background: #e6f4ff; color: #1677ff; } .dept-item:active { transform: scale(0.96); } .dept-icon { font-size: 18px; flex-shrink: 0; } +.dept-item-text { display: flex; flex-direction: column; gap: 2px; } +.dept-item-count { font-size: 11px; color: #999; } /* ===== 疾病面板 ===== */ /* 疾病分类横向Tab */ @@ -90,6 +92,7 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items: .disease-item:active { transform: scale(0.98); } .disease-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } .disease-name { font-size: 14px; color: #333; flex: 1; } +.disease-count { font-size: 12px; color: #999; margin-right: 4px; } .disease-arrow { color: #ccc; flex-shrink: 0; } @@ -201,37 +204,37 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
-
❤️心内科
-
🧠神经内科
-
🔬内分泌科
-
🫁消化内科
-
💨呼吸科
-
🫘肾内科
+
❤️
心内科12位专家
+
🧠
神经内科9位专家
+
🔬
内分泌科8位专家
+
🫁
消化内科11位专家
+
💨
呼吸科7位专家
+
🫘
肾内科6位专家
-
🦴骨科
-
🔪普通外科
-
🧠神经外科
-
🫀泌尿外科
+
🦴
骨科10位专家
+
🔪
普通外科8位专家
+
🧠
神经外科5位专家
+
🫀
泌尿外科7位专家
-
👩妇科
-
🤰产科
-
🧬生殖科
+
👩
妇科9位专家
+
🤰
产科6位专家
+
🧬
生殖科4位专家
-
👶儿内科
-
🩹儿外科
-
🍼新生儿科
+
👶
儿内科8位专家
+
🩹
儿外科5位专家
+
🍼
新生儿科3位专家
-
👁️眼科
-
👂耳鼻喉科
-
🦷口腔科
+
👁️
眼科7位专家
+
👂
耳鼻喉科6位专家
+
🦷
口腔科5位专家
-
🧴皮肤科
-
💊性病科
+
🧴
皮肤科8位专家
+
💊
性病科3位专家
@@ -253,26 +256,31 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
冠心病 + 12位专家
高血压 + 18位专家
心律失常 + 9位专家
心肌炎 + 6位专家
心力衰竭 + 8位专家
@@ -281,26 +289,31 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
糖尿病 + 15位专家
甲状腺疾病 + 10位专家
肥胖症 + 7位专家
痛风 + 8位专家
骨质疏松 + 6位专家
@@ -309,26 +322,31 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
颈椎病 + 11位专家
腰椎间盘突出 + 9位专家
关节炎 + 13位专家
骨折 + 8位专家
肩周炎 + 7位专家
@@ -337,26 +355,31 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
头痛偏头痛 + 9位专家
失眠 + 12位专家
眩晕 + 7位专家
帕金森 + 5位专家
癫痫 + 6位专家
@@ -365,26 +388,31 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
胃炎 + 14位专家
胃溃疡 + 10位专家
结肠炎 + 8位专家
肝炎 + 11位专家
胆囊炎 + 7位专家
@@ -393,26 +421,31 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
慢性咳嗽 + 9位专家
哮喘 + 11位专家
慢阻肺 + 8位专家
肺炎 + 13位专家
支气管炎 + 10位专家
diff --git a/employee-app/health-consult/index.html b/employee-app/health-consult/index.html index ee48df4..1a64aef 100644 --- a/employee-app/health-consult/index.html +++ b/employee-app/health-consult/index.html @@ -140,7 +140,7 @@ @@ -180,7 +180,7 @@
-
+
👨‍⚕️
张建国 主任医师
@@ -196,12 +196,12 @@
咨询 2,356次
回复率 99%
- +
-
+
👩‍⚕️
李晓梅 副主任医师
@@ -217,12 +217,12 @@
咨询 1,892次
回复率 98%
- +
-
+
👨‍⚕️
王志远 主任医师
@@ -238,7 +238,7 @@
咨询 3,105次
回复率 97%
- +
@@ -248,5 +248,13 @@
+ diff --git a/employee-app/health-consult/rate-doctor.html b/employee-app/health-consult/rate-doctor.html index 4ca81f2..e9015b8 100644 --- a/employee-app/health-consult/rate-doctor.html +++ b/employee-app/health-consult/rate-doctor.html @@ -96,8 +96,9 @@
- + @@ -149,10 +150,25 @@ } /** - * 提交评价,跳转到首页 + * 提交评价,跳转到咨询记录页 */ function submitRate() { - window.location.href = 'index.html'; + window.location.href = 'my-records.html'; + } + + /** + * 返回上一页:读取 ?from 参数决定目标页 + */ + function goBack() { + var params = new URLSearchParams(window.location.search); + var from = params.get('from'); + if (from === 'text-chat') { + window.location.href = 'text-chat.html'; + } else if (history.length > 1) { + history.back(); + } else { + window.location.href = 'my-records.html'; + } } diff --git a/employee-app/health-consult/record-detail.html b/employee-app/health-consult/record-detail.html index 549cc95..bfe594c 100644 --- a/employee-app/health-consult/record-detail.html +++ b/employee-app/health-consult/record-detail.html @@ -173,7 +173,7 @@
- + 💬
查看历史对话记录
@@ -186,7 +186,7 @@ diff --git a/employee-app/health-consult/text-chat.html b/employee-app/health-consult/text-chat.html index f07146a..2e45100 100644 --- a/employee-app/health-consult/text-chat.html +++ b/employee-app/health-consult/text-chat.html @@ -102,9 +102,8 @@ 🔋
- +
-
👨‍⚕️
张建国医生 @@ -167,7 +166,7 @@ - +