feat(ticket-order): 修改绘图路径为直线连接各点

简化代码逻辑,移除多余的中间变量计算
This commit is contained in:
2026-07-05 16:11:40 +08:00
parent ec43baf6c0
commit b8537f89b8
+1 -4
View File
@@ -243,10 +243,7 @@
let d = `M ${pts[0].x} ${pts[0].y}`;
for (let i = 1; i < pts.length; i++) {
const prev = pts[i-1];
const curr = pts[i];
const midX = (prev.x + curr.x) / 2;
d += ` C ${midX} ${prev.y}, ${midX} ${curr.y}, ${curr.x} ${curr.y}`;
d += ` L ${pts[i].x} ${pts[i].y}`;
}
svgContent += `<path d="${d}" fill="none" stroke="${li.color}" stroke-width="8" stroke-linecap="round" stroke-linejoin="round" />`;
}