diff --git a/code/VideoAccess-VCMP/api/.vscode/launch.json b/code/VideoAccess-VCMP/api/.vscode/launch.json index 6c0fe3e..37c9c3e 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 7af7c58..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,9 +298,9 @@ async function detail (ctx) { } } - const corUser = await ctx.app.fs.authRequest.get(`user/${nvrRes.createUserId}/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 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, '"')) || [] const serverDConfig = serverDArr.find(s => s.Name == 'GB28181') let serveD = {} @@ -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