From 3311ee70ce6d2868ba6186ce2e1785bc1123abad Mon Sep 17 00:00:00 2001
From: HenryDu8133 <813367384@qq.com>
Date: Tue, 14 Jul 2026 01:43:24 +0800
Subject: [PATCH] =?UTF-8?q?feat(ticket-order):=20=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E5=8D=95=E7=BA=BF=E5=9C=B0=E9=93=81=E5=9B=BE=E9=80=89=E4=B8=AD?=
=?UTF-8?q?=E9=AB=98=E4=BA=AE=E9=87=91=E7=BA=BF=E5=8F=8A=E7=AE=AD=E5=A4=B4?=
=?UTF-8?q?=E5=8A=A8=E7=94=BB=EF=BC=8C=E5=8F=96=E6=B6=88=E9=BC=A0=E6=A0=87?=
=?UTF-8?q?=E6=82=AC=E6=B5=AE=E5=8A=A8=E7=94=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/style.css | 7 +++++++
web/ticket-order.js | 47 +++++++++++++++++++++++++++++++++++++--------
2 files changed, 46 insertions(+), 8 deletions(-)
diff --git a/web/style.css b/web/style.css
index a4ecf38..357de10 100644
--- a/web/style.css
+++ b/web/style.css
@@ -3699,7 +3699,14 @@ body.jr-ticket-board-page .jr-board-card:last-child {
.jr-panel-headline {
flex-direction: column;
align-items: flex-start;
+ gap: 12px;
}
+}
+
+@keyframes tvmArrowMove {
+ 0% { transform: translateX(-10px); }
+ 100% { transform: translateX(10px); }
+}
.jr-query-stat,
.jr-ticket-preview,
diff --git a/web/ticket-order.js b/web/ticket-order.js
index 46973c8..cf63188 100644
--- a/web/ticket-order.js
+++ b/web/ticket-order.js
@@ -131,7 +131,7 @@
gap: 6px;
box-shadow: ${isActive ? '0 2px 4px rgba(0,0,0,0.1)' : 'none'};
white-space: nowrap;
- " onmouseover="this.style.transform='scale(1.02)'" onmouseout="this.style.transform='scale(1)'">
+ ">
${line.name || line.线路名称 || '未知线路'}
@@ -148,12 +148,40 @@
stationsHtml += `
`;
- // The track line background
stationsHtml += `
`;
+ // Draw highlighted route line if start and end are on the same line
+ let routeStartIndex = -1;
+ let routeEndIndex = -1;
+
+ if (selection[0] && selection[1] && Array.isArray(currentRoute) && currentRoute.length > 0) {
+ routeStartIndex = stops.indexOf(selection[0]);
+ routeEndIndex = stops.indexOf(selection[1]);
+
+ if (routeStartIndex !== -1 && routeEndIndex !== -1) {
+ const startPos = Math.min(routeStartIndex, routeEndIndex);
+ const endPos = Math.max(routeStartIndex, routeEndIndex);
+ const leftOffset = 35 + startPos * 70; // 70px is the width of each station node
+ const lineWidth = (endPos - startPos) * 70;
+
+ // Base yellow highlight line
+ stationsHtml += `
`;
+
+ // Animated arrows
+ const isForward = routeStartIndex < routeEndIndex;
+ const arrowCount = Math.max(1, Math.floor(lineWidth / 40));
+
+ stationsHtml += `
`;
+ for (let i = 0; i < arrowCount; i++) {
+ stationsHtml += ``;
+ }
+ stationsHtml += `
`;
+ }
+ }
+
let hasStations = false;
- stops.forEach(code => {
- if (code === '-') return; // Skip breakpoints in this view
+ stops.forEach((code, index) => {
+ if (code === '-') return;
hasStations = true;
const name = stationNameByCode[code] || code;
@@ -181,24 +209,28 @@
let nodeSize = isTransfer ? '20px' : '14px';
let nodeBorder = isTransfer ? '4px' : '3px';
let badgeHtml = '';
+ let nodeZIndex = 4;
if (isSelectedFrom) {
nodeColor = 'var(--success, #16a34a)';
nodeSize = '24px';
+ nodeZIndex = 5;
badgeHtml = `
起点
`;
} else if (isSelectedTo) {
nodeColor = 'var(--danger, #dc2626)';
nodeSize = '24px';
+ nodeZIndex = 5;
badgeHtml = `
终点
`;
} else if (inRoute) {
nodeColor = 'var(--primary, #facc15)';
+ nodeZIndex = 5;
if (!isTransfer) nodeSize = '18px';
else nodeSize = '24px';
}
let transferDotsHtml = '';
if (isTransfer) {
- transferDotsHtml = `
`;
+ transferDotsHtml = `
`;
transferLines.slice(0, 3).forEach(l => {
transferDotsHtml += `
`;
});
@@ -208,15 +240,14 @@
stationsHtml += `