From 042720d8124b76a367c1d02c90600954b78906d7 Mon Sep 17 00:00:00 2001 From: HenryDu8133 <813367384@qq.com> Date: Sun, 28 Jun 2026 11:02:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(web,=20server):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=93=81=E7=89=8C=E6=96=87=E6=A1=88=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?IC=E5=8D=A1=E6=89=B9=E9=87=8F=E6=9F=A5=E8=AF=A2=E5=B9=B6?= =?UTF-8?q?=E9=87=8D=E6=9E=84=E6=90=9C=E7=B4=A2=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一替换全站所有HTML页面的品牌标题为FarSight-T.N.E铁路运输,调整部分页面的中文显示文案,例如删除ticket-board.html中的冗余说明文字。格式化重构blog.html的代码结构与缩进,修复末尾无换行的问题。 后端完善/ic-cards/query接口:支持空查询返回全部IC卡列表,按创建时间倒序排序,添加卡片状态和类型的标准化标签,优化请求日志记录。 全面重构IC卡搜索页面的前端逻辑,新增批量查看所有IC卡功能,支持点击卡片查看详情与操作历史,优化状态管理与渲染流程。 --- server/routes/public.js | 12 +++- web/blog.html | 134 +++++++++++++++++++----------------- web/ic-card-admin.html | 2 +- web/ic-card-detail.html | 4 +- web/ic-card-order.html | 4 +- web/ic-card-search.html | 4 +- web/ic-card-search.js | 147 ++++++++++++++++++++++++++++++++++------ web/login.html | 2 +- web/ticket-board.html | 4 +- web/ticket-order.html | 2 +- web/ticket-route.html | 2 +- web/ticket-search.html | 2 +- 12 files changed, 219 insertions(+), 100 deletions(-) diff --git a/server/routes/public.js b/server/routes/public.js index 496ecd6..abda02d 100644 --- a/server/routes/public.js +++ b/server/routes/public.js @@ -345,8 +345,16 @@ router.post('/orders/:code/consume', async (req, res) => { router.get('/ic-cards/query', async (req, res) => { const q = String(req.query.q || '').trim(); if (!q) { - appendReqLog(req, { category: 'public', type: 'ic_card_query_invalid', level: 'warn', detail: { q } }); - return res.status(400).json({ ok: false, error: 'query required' }); + const cards = (DataService.getIcCards() || []) + .slice() + .sort((a, b) => Number(b?.created_ts || 0) - Number(a?.created_ts || 0)) + .map((card) => ({ + ...presentIcCard(card), + status_label: mapIcCardStatus(card.status), + card_type_label: mapIcCardType(card.card_type) + })); + appendReqLog(req, { category: 'public', type: 'ic_card_query_all', detail: { total: cards.length } }); + return res.json({ ok: true, cards }); } const normCardId = normalizeIcCardId(q); const normOrderCode = String(q || '').trim().toUpperCase(); diff --git a/web/blog.html b/web/blog.html index 6a33198..a637041 100644 --- a/web/blog.html +++ b/web/blog.html @@ -1,66 +1,74 @@  - - - -FMG - - - - - - -
-
-
- - 返回首页 - -
-
-Logo -

-FMG -

-
-
-
-
- -
-
- 服务器状态
-
- -
-
-
-
- - -
- - - - + + + + FMG + + + + + + + +
+
+
+ + 返回首页 + +
+
+ Logo +

+ FMG +

+
+
+
+
+ +
+
+ 服务器状态 +
+
+ +
+
+
+
+ + +
+ + + + + \ No newline at end of file diff --git a/web/ic-card-admin.html b/web/ic-card-admin.html index fe8197f..30340f8 100644 --- a/web/ic-card-admin.html +++ b/web/ic-card-admin.html @@ -30,7 +30,7 @@
- FSE 铁路运输 + FarSight-T.N.E铁路运输 IC 卡管理后台
diff --git a/web/ic-card-detail.html b/web/ic-card-detail.html index f9f4e59..78a0fb1 100644 --- a/web/ic-card-detail.html +++ b/web/ic-card-detail.html @@ -30,8 +30,8 @@
- FSE Railway - IC Card Detail + FarSight-T.N.E铁路运输 + IC卡 详情