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';
+ }
+ }