From 6fd9c3b2875951f84ad908d8cfd824c16294ed50 Mon Sep 17 00:00:00 2001 From: deartibers <947466799@qq.com> Date: Thu, 1 Sep 2022 09:14:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=8E=A5=E5=8F=A3=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/app/lib/controllers/camera/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js index dd28cf2..46aa73a 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js @@ -262,7 +262,7 @@ async function detail (ctx) { async function getCameraListAll (ctx) { try { const { models } = ctx.fs.dc; - + var front = new moment(); //验证前时间 const cameraRes = await models.Camera.findAll({ attributes: { exclude: ['delete', 'recycleTime', 'rtmp', 'createUserId', 'nvrId', 'kindId', 'yingshiSecretId', 'gbId'] }, order: [['id', 'DESC']], @@ -286,7 +286,9 @@ async function getCameraListAll (ctx) { ], }] }) - + var after = new moment(); + var duration = moment.duration(after.diff(front))._data.milliseconds; + console.log('duration',duration) ctx.status = 200; ctx.body = cameraRes } catch (error) {