const zhidiaoSystem = require('../../../utils/zhidiaoSystem.js'); const moment = require('moment') let isDev = false isDev = true module.exports = function (app, opts) { const busLines = app.fs.scheduleInit( { interval: '24 0 */1 * * *', immediate: true, proRun: false, disabled: false }, async () => { try { const { models, ORM: sequelize } = app.fs.dc const Authorization = zhidiaoSystem.createAuthorization() const busRunRes = await app.fs.zhidiaoRequest.get(`getBusRunList`, { header: { Authorization: Authorization } }) const busLineRes = await app.fs.zhidiaoRequest.get(`getLinePointList`, { header: { Authorization: Authorization } }) console.log(`定时获取BUS路线信息`); app.fs.zhidiaoData = { busLine: busLineRes, busRun: busRunRes } } catch (error) { console.error(error); } } ) return { busLines, } }