diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/status/push.js b/code/VideoAccess-VCMP/api/app/lib/controllers/status/push.js index bd9678e..d508f1d 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/status/push.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/status/push.js @@ -11,7 +11,6 @@ async function edit (ctx) { receiver, cameraId } = ctx.request.body; - let configId_ = configId let receiverSorted = receiver.sort() let cameraIdSorted = cameraId.sort() diff --git a/code/VideoAccess-VCMP/api/app/lib/schedule/freshYingshiMsg.js b/code/VideoAccess-VCMP/api/app/lib/schedule/freshYingshiMsg.js index f41e1d5..4713d41 100644 --- a/code/VideoAccess-VCMP/api/app/lib/schedule/freshYingshiMsg.js +++ b/code/VideoAccess-VCMP/api/app/lib/schedule/freshYingshiMsg.js @@ -47,6 +47,7 @@ module.exports = function (app, opts) { name: d.deviceName, } if (existD) { + // 状态改变 if (existD.online != storageD.online) { // 状态更新 if (storageD.online == 'ON' && !existD.playUrl) { @@ -66,7 +67,7 @@ module.exports = function (app, opts) { online: storageD.online, ipctype: storageD.ipctype, }) - // 记录日志 + // 记录在离线日志 const cameraRes = await models.Camera.findAll({ where: { gbId: existD.id @@ -85,6 +86,9 @@ module.exports = function (app, opts) { } } } else { + // 播放地址更新 + const playUrlRes = await getYingshiPlayUrl({ deviceSerial: d.deviceSerial, token: tokenYingshi }) + storageD.playUrl = playUrlRes const yingshiRes = await models.GbCamera.create(storageD) await models.Camera.update({ gbId: yingshiRes.id