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