From 54daffc29d2da8e9650b26ed5b7a54c65f4cc622 Mon Sep 17 00:00:00 2001 From: 2977094657 <2977094657@qq.com> Date: Tue, 12 Aug 2025 15:58:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(detection):=20=E5=85=81=E8=AE=B8=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E8=BE=93=E5=85=A5=E6=95=B0=E6=8D=AE=E5=BA=93=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E8=BF=9B=E8=A1=8C=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/pages/detection-result.vue | 22 ++- frontend/pages/detection.vue | 269 ---------------------------- src/wechat_decrypt_tool/api.py | 4 +- 3 files changed, 23 insertions(+), 272 deletions(-) delete mode 100644 frontend/pages/detection.vue diff --git a/frontend/pages/detection-result.vue b/frontend/pages/detection-result.vue index 8be5194..c9901bb 100644 --- a/frontend/pages/detection-result.vue +++ b/frontend/pages/detection-result.vue @@ -23,6 +23,21 @@ 返回首页 + + +
+ +
+ + +
+

未找到时可填写 xwechat_files 根目录。

+
@@ -183,13 +198,18 @@ import { useApi } from '~/composables/useApi' const { detectWechat } = useApi() const loading = ref(false) const detectionResult = ref(null) +const customPath = ref('') // 开始检测 const startDetection = async () => { loading.value = true try { - const result = await detectWechat() + const params = {} + if (customPath.value && customPath.value.trim()) { + params.data_root_path = customPath.value.trim() + } + const result = await detectWechat(params) detectionResult.value = result } catch (err) { console.error('检测过程中发生错误:', err) diff --git a/frontend/pages/detection.vue b/frontend/pages/detection.vue deleted file mode 100644 index e13a10f..0000000 --- a/frontend/pages/detection.vue +++ /dev/null @@ -1,269 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/wechat_decrypt_tool/api.py b/src/wechat_decrypt_tool/api.py index 1d9b792..2a5ba87 100644 --- a/src/wechat_decrypt_tool/api.py +++ b/src/wechat_decrypt_tool/api.py @@ -273,12 +273,12 @@ async def root(): @app.get("/api/wechat-detection", summary="详细检测微信安装信息") -async def detect_wechat_detailed(): +async def detect_wechat_detailed(data_root_path: Optional[str] = None): """详细检测微信安装信息,包括版本、路径、消息目录等。""" logger.info("开始执行微信检测") try: from .wechat_detection import detect_wechat_installation - info = detect_wechat_installation() + info = detect_wechat_installation(data_root_path=data_root_path) # 添加一些统计信息 stats = {