diff --git a/frontend/composables/useApi.js b/frontend/composables/useApi.js index 13efb89..a5be2d2 100644 --- a/frontend/composables/useApi.js +++ b/frontend/composables/useApi.js @@ -61,6 +61,22 @@ export const useApi = () => { body: data }) } + + // 导入预览API + const importDecryptedPreview = async (data) => { + return await request('/import_decrypted/preview', { + method: 'POST', + body: data + }) + } + + // 导入已解密目录API + const importDecrypted = async (data) => { + return await request('/import_decrypted', { + method: 'POST', + body: data + }) + } // 健康检查API const healthCheck = async () => { @@ -601,10 +617,21 @@ export const useApi = () => { return `${base}/biz/proxy_image?${query.toString()}` } + const pickSystemDirectory = async (params = {}) => { + const query = new URLSearchParams() + if (params && params.title) query.set('title', params.title) + if (params && params.initial_dir) query.set('initial_dir', params.initial_dir) + const url = '/system/pick_directory' + (query.toString() ? `?${query.toString()}` : '') + return await request(url) + } + return { + pickSystemDirectory, detectWechat, detectCurrentAccount, decryptDatabase, + importDecryptedPreview, + importDecrypted, healthCheck, listChatAccounts, getChatAccountInfo, diff --git a/frontend/pages/detection-result.vue b/frontend/pages/detection-result.vue index f05d5f7..5b677fa 100644 --- a/frontend/pages/detection-result.vue +++ b/frontend/pages/detection-result.vue @@ -24,26 +24,36 @@ - -
+ 当前指定检测路径:{{ customPath }} + 如果自动检测漏了,您可以手动指定微信数据根目录 (通常名为 xwechat_files) 让系统重新扫描。 +
未找到时可填写 xwechat_files 根目录。
+