diff --git a/apps/web-antd/src/api/aiot/device/index.ts b/apps/web-antd/src/api/aiot/device/index.ts index ccf6fbedb..7066818f4 100644 --- a/apps/web-antd/src/api/aiot/device/index.ts +++ b/apps/web-antd/src/api/aiot/device/index.ts @@ -29,6 +29,7 @@ export namespace AiotDeviceApi { type?: string; // 'default' | 'ffmpeg' app?: string; stream?: string; + cameraCode?: string; // 摄像头唯一编码 srcUrl?: string; timeout?: number; rtspType?: string; // '0'=TCP, '1'=UDP, '2'=Multicast @@ -189,15 +190,11 @@ export function deleteRoi(roiId: string) { * 获取摄像头截图 URL * 截图接口需要认证,通过 query param 传递 access-token */ -export async function getSnapUrl( - app: string, - stream: string, -): Promise { +export async function getSnapUrl(cameraCode: string): Promise { const token = await getWvpToken(); return ( `${apiURL}/aiot/device/roi/snap` + - `?app=${encodeURIComponent(app)}` + - `&stream=${encodeURIComponent(stream)}` + + `?cameraCode=${encodeURIComponent(cameraCode)}` + `&access-token=${encodeURIComponent(token)}` + `&t=${Date.now()}` );