From 9ebf51063d1b12fe3b1be9a322bd814cf30945c2 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Tue, 6 Dec 2022 11:21:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=95=9C=E5=83=8F=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/VideoAccess-VCMP/api/app/lib/controllers/mirror/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/mirror/index.js b/code/VideoAccess-VCMP/api/app/lib/controllers/mirror/index.js index 7ec79ed..445c553 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/mirror/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/mirror/index.js @@ -231,6 +231,7 @@ async function get (ctx) { const { models } = ctx.fs.dc; const { userId } = ctx.fs.api const { mid } = ctx.params + const { check } = ctx.query // 查当前镜像的全部信息 const mirrorRes = await models.Mirror.findOne({ attributes: { @@ -284,6 +285,9 @@ async function get (ctx) { let returnData if (mirrorRes) { + if (check && !mirrorRes.publish) { + throw '尚未发布' + } const { mirrorCameras, mirrorFilterGroups, mirrorTrees } = mirrorRes.dataValues returnData = { ...mirrorRes.dataValues,