Browse Source

busLine 默认返回 []

dev
巴林闲侠 1 year ago
parent
commit
a9c0557d18
  1. 4
      api/app/lib/controllers/overview/operation.js

4
api/app/lib/controllers/overview/operation.js

@ -170,11 +170,11 @@ async function busLine (ctx) {
const { busLicence } = ctx.query const { busLicence } = ctx.query
const zhidiaoData = app.fs.zhidiaoData const zhidiaoData = app.fs.zhidiaoData
let rslt = {} let rslt = []
if (zhidiaoData) { if (zhidiaoData) {
let corBus = (zhidiaoData.busRun || []).find(b => b.busNoChar == busLicence) let corBus = (zhidiaoData.busRun || []).find(b => b.busNoChar == busLicence)
if (corBus) { if (corBus) {
rslt = (zhidiaoData.busLine || {})[corBus.lineNo] || {} rslt = (zhidiaoData.busLine || {})[corBus.lineNo] || []
} }
} }

Loading…
Cancel
Save