Browse Source

Merge branch 'dev_trial' of https://gitea.anxinyun.cn/free-sun/FS-IOT into dev_trial

dev_trial
wenlele 2 years ago
parent
commit
1be4b614f6
  1. 1
      code/VideoAccess-VCMP/api/.vscode/launch.json
  2. 8
      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", "--redisHost 10.8.30.112",
"--redisPort 6379", "--redisPort 6379",
"--axyApiUrl http://127.0.0.1:4100", "--axyApiUrl http://127.0.0.1:4100",
// "--axyApiUrl http://10.8.30.161:31260",
"--iotAuthApi http://127.0.0.1:4200", "--iotAuthApi http://127.0.0.1:4200",
"--pomsApiUrl http://127.0.0.1:4600", "--pomsApiUrl http://127.0.0.1:4600",
"--godUrl https://restapi.amap.com/v3", "--godUrl https://restapi.amap.com/v3",

8
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 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(`gb28181/api/plugins`) || '')
// const serverDRes = (await ctx.app.fs.videoServerRequest.post(`gateway/plugins`) || '') const serverDRes = (await ctx.app.fs.videoServerRequest.post(`gateway/plugins`) || '')
const serverDArr = JSON.parse(serverDRes.replace(/'/g, '"')) || [] const serverDArr = JSON.parse(serverDRes.replace(/'/g, '"')) || []
const serverDConfig = serverDArr.find(s => s.Name == 'GB28181') const serverDConfig = serverDArr.find(s => s.Name == 'GB28181')
let serveD = {} let serveD = {}
@ -319,7 +319,7 @@ async function detail (ctx) {
station: bindStations, station: bindStations,
camera: cameras, camera: cameras,
createUser: { createUser: {
namePresent: corUser[0].namePresent namePresent: corUser.length ? corUser[0].namePresent : ''
}, },
accessWay: 'GB/T28181', accessWay: 'GB/T28181',
accessInfo: serveD accessInfo: serveD

Loading…
Cancel
Save