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卡 详情