From 86e898c8d5477d13f073dc1687a7dad376356d25 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Tue, 15 Nov 2022 17:06:11 +0800 Subject: [PATCH] =?UTF-8?q?fix=20GB28181=20=E5=8F=82=E6=95=B0=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=8F=8A=E8=A7=A3=E6=9E=90=E6=81=A2=E5=A4=8D=E8=87=B3?= =?UTF-8?q?=E5=8E=9F=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/VideoAccess-VCMP/api/.vscode/launch.json | 1 + code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/VideoAccess-VCMP/api/.vscode/launch.json b/code/VideoAccess-VCMP/api/.vscode/launch.json index e812e78..12b2114 100644 --- a/code/VideoAccess-VCMP/api/.vscode/launch.json +++ b/code/VideoAccess-VCMP/api/.vscode/launch.json @@ -20,6 +20,7 @@ "--redisHost 10.8.30.112", "--redisPort 6379", "--axyApiUrl http://127.0.0.1:4100", + // "--axyApiUrl http://10.8.30.161:31260", "--iotAuthApi http://127.0.0.1:4200", "--pomsApiUrl http://127.0.0.1:4600", "--godUrl https://restapi.amap.com/v3", diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js b/code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js index ad32aea..dca6b59 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js @@ -298,7 +298,7 @@ async function detail (ctx) { } } - const corUser = await ctx.app.fs.authRequest.get(`user/${nvrRes.createUserId}/message`, { query: { token } }) + const corUser = await ctx.app.fs.authRequest.get(`user/${nvrRes.createUserId || -1}/message`, { query: { token } }) // const serverDRes = (await ctx.app.fs.videoServerRequest.post(`gb28181/api/plugins`) || '') const serverDRes = (await ctx.app.fs.videoServerRequest.post(`gateway/plugins`) || '') const serverDArr = JSON.parse(serverDRes.replace(/'/g, '"')) || [] @@ -319,7 +319,7 @@ async function detail (ctx) { station: bindStations, camera: cameras, createUser: { - namePresent: corUser[0].namePresent + namePresent: corUser.length ? corUser[0].namePresent : '' }, accessWay: 'GB/T28181', accessInfo: serveD