import { request } from '@umijs/max';

// 获取视频设备列表
export async function getVideoDevicePage(params: {
  pageNo: number;
  pageSize: number;
  indexCode?: string;
  name?: string;
  regionName?: string;
}) {
  return request('/sjdz/iot-data/service/sensorInfo/getVideoDevicePage', {
    method: 'GET',
    params,
    headers: {
      Authorization: '504b098609691cae80a286973542e106',
    },
  });
}

// 获取监控点预览取流URL
export async function getPreviewUrl(params: {
  indexCode: string;
}) {
  return request('/sjdz/iot-data/service/sensorInfo/getPreviewUrl', {
    method: 'GET',
    params,
    headers: {
      Authorization: '504b098609691cae80a286973542e106',
    },
  });
}

// 获取视频设备详情
export async function getVideoDetail(params: {
  indexCode: string;
}) {
  return request('/sjdz/iot-data/service/sensorInfo/getVideoDetail', {
    method: 'GET',
    params,
    headers: {
      Authorization: '504b098609691cae80a286973542e106',
    },
  });
} 