From 39b07a8733e589ca1634cf0b4e2dd0d33a8e2c25 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Mon, 8 Aug 2022 10:22:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=A4=E7=9F=B3=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VideoAccess-VCMP/api/app/lib/controllers/status/push.js | 1 - .../api/app/lib/schedule/freshYingshiMsg.js | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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