Browse Source

fix GB28181 参数请求及解析恢复至原版

dev_trial
巴林闲侠 2 years ago
parent
commit
86e898c8d5
  1. 1
      code/VideoAccess-VCMP/api/.vscode/launch.json
  2. 4
      code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js

1
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",

4
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

Loading…
Cancel
Save