chore(backend,frontend): 移除设备位置管理全链路功能与相关代码

- 删除后端所有机器位置相关的API接口、缓存逻辑与后台同步任务
- 移除前端的机器位置导航入口、地图页面与管理代码
- 将原机器地图页面重构为车票查询页面
- 调整Lua程序的默认版本号
- 删除无用的.gitignore文件
- 优化前端页面的代码格式与导航结构
This commit is contained in:
2026-07-11 16:05:20 +08:00
parent 4fe3a24eaf
commit 1d9f08d5c6
14 changed files with 112 additions and 448 deletions
+3 -24
View File
@@ -1,6 +1,6 @@
local CURRENT_STATION_CODE = 'Ticket-Machine'
local API_BASE = 'http://ticket.fse-media.group/api'
local VERSION = 'v1.5.18'
local VERSION = 'v1.5.15'
local UPDATE_CHECK_INTERVAL = 5
-- ###########################
@@ -722,7 +722,6 @@ local function checkAndApplyUpdate()
print("OTA Update Error: " .. tostring(res))
term.setTextColor(colors.white)
end
sleep(3)
end
else
lastUpdateError = "loadfile failed: " .. tostring(err)
@@ -731,7 +730,6 @@ local function checkAndApplyUpdate()
print("OTA Update Error: " .. tostring(err))
term.setTextColor(colors.white)
end
sleep(3)
end
isUpdating = false
@@ -777,26 +775,7 @@ local function backgroundTicketUploadTask()
end
end
local function backgroundLocationSyncTask()
sleep(5)
local x, y, z
if gps and type(gps.locate) == "function" then
x, y, z = gps.locate(2)
end
local payload = {
device_id = currentDeviceId(),
type = "TicketMachine",
station = (CFG.current_station and (CFG.current_station.en_name or CFG.current_station.name)) or state.stationName,
station_code = state.stationCode or CURRENT_STATION_CODE,
x = x,
y = y,
z = z
}
postJSONResult(API_BASE .. '/machine-location', payload)
while true do
sleep(86400)
end
end
-- ###########################
-- Data logic & Config
@@ -2549,4 +2528,4 @@ local function mainPageLoop()
end
end
parallel.waitForAny(mainPageLoop, backgroundSyncTask, backgroundTicketUploadTask, backgroundPeripheralTask, backgroundLocationSyncTask)
parallel.waitForAny(mainPageLoop, backgroundSyncTask, backgroundTicketUploadTask, backgroundPeripheralTask)