123456789101112131415161718192021222324252627 |
- import request from '@/utils/request';
- import { BaseResponse } from './type';
- import { DA_HUA_URL_PREFIX } from '@/constants/constants';
- export interface DAHUALoginParams {
- userName: string;
- signature: string;
- randomKey: string;
- encryptType: 'MD5';
- clientType: 'winpc';
- pid: 2548;
- }
- export interface LoginResponse extends BaseResponse {
- token?: string;
- userId?: string | number;
- }
- export const DAHUALogin = (params: DAHUALoginParams) =>
- request<LoginResponse>('POST', {
- url: `${DA_HUA_URL_PREFIX}/videoService/accounts/authorize`,
- data: params,
- headers: {
- 'Content-Type': 'application/json',
- 'X-Subject-Token': '',
- },
- });
|