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 = {