feat: 新增 error 和 pass 两个 DFPWM 二进制文件
This commit is contained in:
@@ -233,7 +233,7 @@
|
||||
</div>
|
||||
|
||||
<script src="/custom-dialog.js?v=11"></script>
|
||||
<script src="/ticket-order.js?v=20"></script>
|
||||
<script src="/ticket-order.js?v=21"></script>
|
||||
<script src="/public-status.js?v=13"></script>
|
||||
<script src="/ai-assistant.js?v=6"></script>
|
||||
<script>
|
||||
|
||||
@@ -408,6 +408,58 @@
|
||||
return merged;
|
||||
}
|
||||
|
||||
function getStationPoint(code) {
|
||||
const normalized = String(code || '').trim();
|
||||
if (!normalized) return null;
|
||||
const canonical = stationCanonicalByCode[normalized] || normalized;
|
||||
const x = stationXByCanonical[canonical];
|
||||
const y = stationYByCanonical[normalized];
|
||||
if (!Number.isFinite(x) || !Number.isFinite(y)) return null;
|
||||
return { x, y };
|
||||
}
|
||||
|
||||
function renderRouteOverlay() {
|
||||
const svgEl = mapContainer.querySelector('svg');
|
||||
if (!svgEl) return;
|
||||
|
||||
const existing = svgEl.querySelector('.route-overlay-group');
|
||||
if (existing) existing.remove();
|
||||
|
||||
if (!Array.isArray(currentRoute) || currentRoute.length < 2) return;
|
||||
|
||||
const points = currentRoute.map(getStationPoint).filter(Boolean);
|
||||
if (points.length < 2) return;
|
||||
|
||||
const ns = 'http://www.w3.org/2000/svg';
|
||||
const group = document.createElementNS(ns, 'g');
|
||||
group.setAttribute('class', 'route-overlay-group');
|
||||
|
||||
const pathData = points.map((pt, idx) => `${idx === 0 ? 'M' : 'L'} ${pt.x} ${pt.y}`).join(' ');
|
||||
|
||||
const glow = document.createElementNS(ns, 'path');
|
||||
glow.setAttribute('d', pathData);
|
||||
glow.setAttribute('fill', 'none');
|
||||
glow.setAttribute('stroke', 'rgba(250, 204, 21, 0.38)');
|
||||
glow.setAttribute('stroke-width', '18');
|
||||
glow.setAttribute('stroke-linecap', 'round');
|
||||
glow.setAttribute('stroke-linejoin', 'round');
|
||||
|
||||
const main = document.createElementNS(ns, 'path');
|
||||
main.setAttribute('d', pathData);
|
||||
main.setAttribute('fill', 'none');
|
||||
main.setAttribute('stroke', '#facc15');
|
||||
main.setAttribute('stroke-width', '8');
|
||||
main.setAttribute('stroke-linecap', 'round');
|
||||
main.setAttribute('stroke-linejoin', 'round');
|
||||
|
||||
group.appendChild(glow);
|
||||
group.appendChild(main);
|
||||
|
||||
const firstStation = svgEl.querySelector('.map-station');
|
||||
if (firstStation) svgEl.insertBefore(group, firstStation);
|
||||
else svgEl.appendChild(group);
|
||||
}
|
||||
|
||||
function updateSelectionUI(skipPreview = false) {
|
||||
if (!(selection[0] && selection[1])) {
|
||||
currentRoute = [];
|
||||
@@ -446,6 +498,8 @@
|
||||
if (el) el.classList.add('route-transfer');
|
||||
}
|
||||
}
|
||||
|
||||
renderRouteOverlay();
|
||||
|
||||
// Auto preview if both selected
|
||||
if(!skipPreview && selection[0] && selection[1]) previewPrice();
|
||||
|
||||
Reference in New Issue
Block a user