chore: 更新各文件版本号,修复接口错误提示并优化配置规则
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中冗余的注释行
This commit is contained in:
+5
-2
@@ -1,2 +1,5 @@
|
|||||||
|
---
|
||||||
1. 每次更改都需更新版本号
|
alwaysApply: false
|
||||||
|
globs: *.lua
|
||||||
|
---
|
||||||
|
1. 每次更改都需更新相应文件的版本号
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
local DEFAULT_SERVER_BASE = "http://ticket.fse-media.group"
|
local DEFAULT_SERVER_BASE = "http://ticket.fse-media.group"
|
||||||
local DEFAULT_SERVER_PATH = "/api/tickets/check"
|
local DEFAULT_SERVER_PATH = "/api/tickets/check"
|
||||||
local GATE_OPEN_SECONDS = 2
|
local GATE_OPEN_SECONDS = 2
|
||||||
local VERSION = "v1.5.8"
|
local VERSION = "v1.5.9"
|
||||||
local VERSION_CHECK_INTERVAL = 5
|
local VERSION_CHECK_INTERVAL = 5
|
||||||
|
|
||||||
local CONFIG_PATH = "gate_config.json"
|
local CONFIG_PATH = "gate_config.json"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ticketmachine",
|
"name": "ticketmachine",
|
||||||
"version": "1.0.12",
|
"version": "1.0.13",
|
||||||
"main": "server/index.js",
|
"main": "server/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node server/index.js",
|
"start": "node server/index.js",
|
||||||
|
|||||||
@@ -1369,7 +1369,7 @@ router.post('/tickets/check', async (req, res) => {
|
|||||||
if (isSingleTicket) {
|
if (isSingleTicket) {
|
||||||
const fareInfo = LogicService.computeFareBoth(cur.start, exitCode);
|
const fareInfo = LogicService.computeFareBoth(cur.start, exitCode);
|
||||||
if (!fareInfo || fareInfo.paid_segments !== 1) {
|
if (!fareInfo || fareInfo.paid_segments !== 1) {
|
||||||
return deny('非单区间');
|
return deny('not_single_segment');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!matchesStation(terminal)) return deny('wrong_station');
|
if (!matchesStation(terminal)) return deny('wrong_station');
|
||||||
|
|||||||
+1
-3
@@ -1,6 +1,6 @@
|
|||||||
local CURRENT_STATION_CODE = 'Ticket-Machine'
|
local CURRENT_STATION_CODE = 'Ticket-Machine'
|
||||||
local API_BASE = 'http://ticket.fse-media.group/api'
|
local API_BASE = 'http://ticket.fse-media.group/api'
|
||||||
local VERSION = 'v1.5.9'
|
local VERSION = 'v1.5.10'
|
||||||
|
|
||||||
-- ###########################
|
-- ###########################
|
||||||
-- Core HTTP & JSON Utilities
|
-- Core HTTP & JSON Utilities
|
||||||
@@ -2462,8 +2462,6 @@ local function showOnlineVoucher()
|
|||||||
|
|
||||||
local ev, p1, p2, p3 = os.pullEvent()
|
local ev, p1, p2, p3 = os.pullEvent()
|
||||||
if ev == 'mouse_click' or ev == 'monitor_touch' then
|
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
|
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 == 'char' and #code < 5 then code = code .. p1:upper()
|
||||||
elseif ev == 'key' and p1 == keys.backspace then code = code:sub(1, -2)
|
elseif ev == 'key' and p1 == keys.backspace then code = code:sub(1, -2)
|
||||||
|
|||||||
Reference in New Issue
Block a user