From 6697e53613d5ce562a19795ab41b19803c2bb93d Mon Sep 17 00:00:00 2001
From: 905086 <k2049@qq.com>
Date: Sat, 07 Nov 2026 19:26:30 +0800
Subject: [PATCH] feat(tools): 新增工具卸载功能及相关实现

---
 fluttergamebox/lib/api/api_service.dart |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fluttergamebox/lib/api/api_service.dart b/fluttergamebox/lib/api/api_service.dart
index a5626ea..65e230b 100644
--- a/fluttergamebox/lib/api/api_service.dart
+++ b/fluttergamebox/lib/api/api_service.dart
@@ -118,6 +118,7 @@
   final String cover;
   final String description;
   final String fileUrl;
+  final String launchExe;
   Tool({
     required this.id,
     required this.name,
@@ -125,6 +126,7 @@
     required this.cover,
     required this.description,
     required this.fileUrl,
+    this.launchExe = '',
   });
   factory Tool.fromJson(Map<String, dynamic> j) => Tool(
         id: j['id'],
@@ -133,6 +135,7 @@
         cover: j['cover'] ?? '',
         description: j['description'] ?? '',
         fileUrl: j['file_url'] ?? '',
+        launchExe: j['launch_exe'] ?? '',
       );
 }
 
@@ -190,6 +193,9 @@
     return (res['data'] as List).map((e) => Tool.fromJson(e)).toList();
   }
 
+  static Future<Map<String, dynamic>> toolDownloadInfo(int toolId) async =>
+      await ApiClient.get('/api/tools/$toolId/download');
+
   static Future<String> announcements() async {
     final res = await ApiClient.get('/api/announcements');
     if (res['code'] != 0) return '';

--
Gitblit v1.10.0