Browse Source

! 注释与安心云的绑定数据通信

之前用的是 315-video 分支
现在准备切到 315 分支 暂时没有绑定功能
dev_trial
CODE 11 months ago
parent
commit
3c486af6f8
  1. 11
      code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js
  2. 20
      code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js

11
code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js

@ -129,7 +129,8 @@ async function getCameraProject (ctx, next) {
} }
// 查在安心云绑定的数据 // 查在安心云绑定的数据
const axbindCameraRes = await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } }) const axbindCameraRes = []
// await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
// 查对应创建者信息 // 查对应创建者信息
const corUsers = const corUsers =
@ -233,7 +234,8 @@ async function detail (ctx) {
throw errMsg throw errMsg
} }
const cameraProject = await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraRes.id } }) const cameraProject = []
// await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraRes.id } })
const bindStations = [] const bindStations = []
for (let c of cameraProject) { for (let c of cameraProject) {
for (let s of c.stations) { for (let s of c.stations) {
@ -410,7 +412,7 @@ async function del (ctx) {
if (cameraId) { if (cameraId) {
await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraId } }) // await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraId } })
} }
await transaction.commit(); await transaction.commit();
@ -494,7 +496,8 @@ async function cameraExport (ctx) {
} }
// 查在安心云绑定的数据 // 查在安心云绑定的数据
const axbindCameraRes = await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } }) const axbindCameraRes = []
// await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
// 查对应创建者信息 // 查对应创建者信息
const corUsers = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',') || -1}/message`, { query: { token } }) const corUsers = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',') || -1}/message`, { query: { token } })

20
code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js

@ -171,9 +171,10 @@ async function get (ctx) {
} }
// 查在安心云绑定的数据 // 查在安心云绑定的数据
const axbindCameraRes = cameraIds.length ? const axbindCameraRes = []
await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } }) // cameraIds.length ?
: [] // await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
// : []
// 查用户信息 // 查用户信息
const createUserRes = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',') || -1}/message`, { query: { token } }) const createUserRes = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',') || -1}/message`, { query: { token } })
@ -236,7 +237,7 @@ async function del (ctx, next) {
} }
}) })
if (cameraIds.length) { if (cameraIds.length) {
await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } }) // await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
} }
await transaction.commit(); await transaction.commit();
@ -290,7 +291,8 @@ async function detail (ctx) {
cameras.push(c.dataValues) cameras.push(c.dataValues)
} }
const cameraProject = await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } }) const cameraProject = []
// await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
const bindStations = [] const bindStations = []
for (let c of cameraProject) { for (let c of cameraProject) {
for (let s of c.stations) { for (let s of c.stations) {
@ -397,10 +399,10 @@ async function nvrExport (ctx) {
} }
// 查在安心云绑定的数据 // 查在安心云绑定的数据
const axbindCameraRes = const axbindCameraRes = []
cameraIds.length ? // cameraIds.length ?
await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } }) // await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
: [] // : []
// 查用户信息 // 查用户信息
const createUserRes = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',') || -1}/message`, { query: { token } }) const createUserRes = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',') || -1}/message`, { query: { token } })

Loading…
Cancel
Save