Browse Source

Merge branch 'dev_trial' of https://gitea.anxinyun.cn/free-sun/FS-IOT into dev_trial

release_1.3.0
wenlele 3 years ago
parent
commit
df2093417e
  1. 6
      code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js

6
code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js

@ -262,7 +262,7 @@ async function detail (ctx) {
async function getCameraListAll (ctx) { async function getCameraListAll (ctx) {
try { try {
const { models } = ctx.fs.dc; const { models } = ctx.fs.dc;
var front = new moment(); //验证前时间
const cameraRes = await models.Camera.findAll({ const cameraRes = await models.Camera.findAll({
attributes: { exclude: ['delete', 'recycleTime', 'rtmp', 'createUserId', 'nvrId', 'kindId', 'yingshiSecretId', 'gbId'] }, attributes: { exclude: ['delete', 'recycleTime', 'rtmp', 'createUserId', 'nvrId', 'kindId', 'yingshiSecretId', 'gbId'] },
order: [['id', 'DESC']], 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.status = 200;
ctx.body = cameraRes ctx.body = cameraRes
} catch (error) { } catch (error) {

Loading…
Cancel
Save