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
-27
View File
@@ -163,33 +163,6 @@ router.get('/check-update', (req, res) => {
res.json({ update_counter: globalUpdateCounter });
});
router.post('/machine-location', async (req, res) => {
const data = req.body || {};
if (!data.device_id) return res.status(400).json({ ok: false, error: 'device_id required' });
if (!data.station && data.station_code) {
data.station = resolveStationName(data.station_code);
}
await DataService.updateMachineLocation(data.device_id, data);
res.json({ ok: true });
});
router.get('/machine-locations', (req, res) => {
const locs = DataService.getMachineLocations() || {};
res.json({ ok: true, data: locs });
});
router.put('/machine-location/:id', async (req, res) => {
const id = req.params.id;
const data = req.body || {};
const current = DataService.getMachineLocations()[id];
if (!current) return res.status(404).json({ ok: false, error: 'machine not found' });
if (!data.station && data.station_code) {
data.station = resolveStationName(data.station_code);
}
await DataService.updateMachineLocation(id, data);
res.json({ ok: true });
});
// Config
router.get('/config', (req, res) => {
const cfg = DataService.getConfig();
-5
View File
@@ -224,11 +224,6 @@ router.get('/fares/query', (req, res) => {
}
});
router.get('/machine-locations', (req, res) => {
const locs = DataService.getMachineLocations() || {};
res.json({ ok: true, data: locs });
});
router.get('/config', (req, res) => {
const cfg = DataService.getConfig();
res.json({