From 761fd61deb1a3b188d2f6d14d0974791a0bbcd4d Mon Sep 17 00:00:00 2001 From: HenryDu8133 <813367384@qq.com> Date: Fri, 10 Jul 2026 10:31:52 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E5=90=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=89=88=E6=9C=AC=E5=8F=B7=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=E5=B9=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=85=8D=E7=BD=AE=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 更新package.json版本至1.0.13,gate.lua版本至v1.5.9,ticketmachine.lua版本至v1.5.10 2. 修改服务器接口的错误提示文案,将中文“非单区间”改为英文“not_single_segment” 3. 优化.trae/rules/目录下的提交规则配置文件格式与说明内容 4. 移除ticketmachine.lua中冗余的注释行 --- .trae/rules/版本号.md | 7 +++++-- gate.lua | 2 +- package.json | 2 +- server/routes/api.js | 2 +- ticketmachine.lua | 4 +--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.trae/rules/版本号.md b/.trae/rules/版本号.md index aecff26..f3f2a7e 100644 --- a/.trae/rules/版本号.md +++ b/.trae/rules/版本号.md @@ -1,2 +1,5 @@ - -1. 每次更改都需更新版本号 \ No newline at end of file +--- +alwaysApply: false +globs: *.lua +--- +1. 每次更改都需更新相应文件的版本号 \ No newline at end of file diff --git a/gate.lua b/gate.lua index 2bdd9a8..f9762ed 100644 --- a/gate.lua +++ b/gate.lua @@ -1,7 +1,7 @@ local DEFAULT_SERVER_BASE = "http://ticket.fse-media.group" local DEFAULT_SERVER_PATH = "/api/tickets/check" local GATE_OPEN_SECONDS = 2 -local VERSION = "v1.5.8" +local VERSION = "v1.5.9" local VERSION_CHECK_INTERVAL = 5 local CONFIG_PATH = "gate_config.json" diff --git a/package.json b/package.json index 9dcb362..a44ecd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ticketmachine", - "version": "1.0.12", + "version": "1.0.13", "main": "server/index.js", "scripts": { "start": "node server/index.js", diff --git a/server/routes/api.js b/server/routes/api.js index af9d20b..3a08349 100644 --- a/server/routes/api.js +++ b/server/routes/api.js @@ -1369,7 +1369,7 @@ router.post('/tickets/check', async (req, res) => { if (isSingleTicket) { const fareInfo = LogicService.computeFareBoth(cur.start, exitCode); if (!fareInfo || fareInfo.paid_segments !== 1) { - return deny('非单区间'); + return deny('not_single_segment'); } } else { if (!matchesStation(terminal)) return deny('wrong_station'); diff --git a/ticketmachine.lua b/ticketmachine.lua index aa1924e..d6f157c 100644 --- a/ticketmachine.lua +++ b/ticketmachine.lua @@ -1,6 +1,6 @@ local CURRENT_STATION_CODE = 'Ticket-Machine' local API_BASE = 'http://ticket.fse-media.group/api' -local VERSION = 'v1.5.9' +local VERSION = 'v1.5.10' -- ########################### -- Core HTTP & JSON Utilities @@ -2462,8 +2462,6 @@ local function showOnlineVoucher() local ev, p1, p2, p3 = os.pullEvent() if ev == 'mouse_click' or ev == 'monitor_touch' then - -- For mouse_click: p1=button, p2=x, p3=y - -- For monitor_touch: p1=side, p2=x, p3=y for _, b in ipairs(Buttons) do if inRect(b, p2, p3) then clickSound(); if b.onClick then b.onClick() end; break end end elseif ev == 'char' and #code < 5 then code = code .. p1:upper() elseif ev == 'key' and p1 == keys.backspace then code = code:sub(1, -2)