import { ApiClientFactory } from '..//core/api.client.factory'; import { QRModel, ShareParams } from '../model/Qr.model'; export class QrService { constructor(private factory: ApiClientFactory) {} // 视频播放器组件化 async fetchPlayerComponentization(projectId: string) { const response = await this.factory.entity.get(`/api/${projectId}/qrCode/allDevice`); return response; } // 设备列表组件化 async fetchDeviceListComponentization(projectId: string, devcieIds: string) { const response = await this.factory.entity.get( `/api/${projectId}/qrCode/partDevice?deviceIds=${devcieIds}` ); return response; } // web组件化列表 async fetchWebComponentList(projectId: string) { const response = await this.factory.entity.get(`/api/${projectId}/qrCode/webComponentList`); return response; } // 生成当前项目下设备播放二维码列表 async fetchVideoListComponentization(projectId: string) { const response = await this.factory.entity.get(`/api/${projectId}/qrCode/deviceList`); return response; } async updateDeviceShared(params: ShareParams) { const response = await this.factory.entity.put(`/api/url/redirect/share`, params); return response; } }