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,