| 1 | /* |
| 2 | * @Author: nevin |
| 3 | * @Date: 2025-01-23 15:48:14 |
| 4 | * @LastEditTime: 2025-02-14 22:36:25 |
| 5 | * @LastEditors: nevin |
| 6 | * @Description: |
| 7 | */ |
| 8 | |
| 9 | /** |
| 10 | * 视频截帧 |
| 11 | * @param path |
| 12 | * @param time |
| 13 | */ |
| 14 | export async function ipcGetVideoCover(path: string, time?: string) { |
| 15 | const res: string = await window.ipcRenderer.invoke( |
| 16 | 'ICP_GET_VIDEO_COVER', |
| 17 | path, |
| 18 | time, |
| 19 | ); |
| 20 | return res; |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * 下载文件到本地 |
| 25 | * @param url |
| 26 | * @param name |
| 27 | */ |
| 28 | export async function ipcDownFile(url: string, name?: string) { |
| 29 | const res: string = await window.ipcRenderer.invoke( |
| 30 | 'ICP_TOOL_DOWN_FILE', |
| 31 | url, |
| 32 | name, |
| 33 | ); |
| 34 | return res; |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * 日志路径获取 |
| 39 | * @param log |
| 40 | */ |
| 41 | export async function ipcGetLogFlies() { |
| 42 | const res: string[] = await window.ipcRenderer.invoke('GLOBAL_LOG_GET_FLIES'); |
| 43 | return res; |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * 本地文件上传 |
| 48 | * @param path |
| 49 | */ |
| 50 | export async function ipcUpFlie(path: string) { |
| 51 | const res: string[] = await window.ipcRenderer.invoke( |
| 52 | 'ICP_TOOL_UP_FILE', |
| 53 | path, |
| 54 | ); |
| 55 | return res; |
| 56 | } |
| 57 |