设备基本信息设置

This commit is contained in:
柳清爽
2025-03-31 17:33:05 +08:00
parent dbf20fd870
commit 1cb8e9f397
5 changed files with 242 additions and 10 deletions

View File

@@ -33,6 +33,22 @@ export const fetchDeviceDetail = async (id: string | number): Promise<ApiRespons
return api.get<ApiResponse<any>>(`/v1/devices/${id}`);
};
// 更新设备任务配置
export const updateDeviceTaskConfig = async (
id: string | number,
config: {
autoAddFriend?: boolean;
autoReply?: boolean;
momentsSync?: boolean;
aiChat?: boolean;
}
): Promise<ApiResponse<any>> => {
return api.post<ApiResponse<any>>(`/v1/devices/task-config`, {
id,
...config
});
};
// 删除设备
export const deleteDevice = async (id: number): Promise<ApiResponse<any>> => {
return api.delete<ApiResponse<any>>(`/v1/devices/${id}`);