From a86e8f762f259dd88b1fa418d9e7f6e7d884de9b Mon Sep 17 00:00:00 2001 From: 2977094657 <2977094657@qq.com> Date: Tue, 19 Aug 2025 17:10:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(detection):=20=E6=B7=BB=E5=8A=A0=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E7=99=BB=E5=BD=95=E8=B4=A6=E5=8F=B7=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/assets/css/tailwind.css | 28 ++ frontend/composables/useApi.js | 20 +- frontend/pages/detection-result.vue | 99 +++++- frontend/stores/app.js | 8 + src/wechat_decrypt_tool/api.py | 29 +- src/wechat_decrypt_tool/wechat_detection.py | 332 +++++++++++++++++++- 6 files changed, 488 insertions(+), 28 deletions(-) diff --git a/frontend/assets/css/tailwind.css b/frontend/assets/css/tailwind.css index 0e20b4f..b7335d6 100644 --- a/frontend/assets/css/tailwind.css +++ b/frontend/assets/css/tailwind.css @@ -39,6 +39,9 @@ /* 边框颜色 */ --border-color: #e7e7e7; --border-light: #f4f4f4; + + /* 统一消息圆角(聊天所有消息共用) */ + --message-radius: 4px; } body { @@ -52,6 +55,31 @@ /* 微信风格组件样式 */ @layer components { + /* 聊天气泡尾巴(左右),与高度 42px 居中对齐 */ + .bubble-tail-l, .bubble-tail-r { position: relative; } + .bubble-tail-l::after { + content: ''; + position: absolute; + left: -4px; + top: 12px; /* 36px 中线 18px,减去 6px ≈ 12px */ + width: 12px; height: 12px; + background: #FFFFFF; + transform: rotate(45deg); + border-radius: 2px; + } + .bubble-tail-r::after { + content: ''; + position: absolute; + right: -4px; + top: 12px; + width: 12px; height: 12px; + background: #95EC69; + transform: rotate(45deg); + border-radius: 2px; + } + /* 统一的消息圆角工具类 */ + .msg-radius { border-radius: var(--message-radius); } + .msg-bubble { @apply leading-normal break-words text-pretty; border-radius: var(--message-radius); } /* 按钮样式 */ .btn { @apply px-6 py-3 rounded-full font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 transform active:scale-95; diff --git a/frontend/composables/useApi.js b/frontend/composables/useApi.js index 011945c..64ac39f 100644 --- a/frontend/composables/useApi.js +++ b/frontend/composables/useApi.js @@ -27,8 +27,23 @@ export const useApi = () => { } // 微信检测API - const detectWechat = async () => { - return await request('/wechat-detection') + const detectWechat = async (params = {}) => { + const query = new URLSearchParams() + if (params && params.data_root_path) { + query.set('data_root_path', params.data_root_path) + } + const url = '/wechat-detection' + (query.toString() ? `?${query.toString()}` : '') + return await request(url) + } + + // 检测当前登录账号API + const detectCurrentAccount = async (params = {}) => { + const query = new URLSearchParams() + if (params && params.data_root_path) { + query.set('data_root_path', params.data_root_path) + } + const url = '/current-account' + (query.toString() ? `?${query.toString()}` : '') + return await request(url) } // 数据库解密API @@ -46,6 +61,7 @@ export const useApi = () => { return { detectWechat, + detectCurrentAccount, decryptDatabase, healthCheck } diff --git a/frontend/pages/detection-result.vue b/frontend/pages/detection-result.vue index c9901bb..4d7eccd 100644 --- a/frontend/pages/detection-result.vue +++ b/frontend/pages/detection-result.vue @@ -91,7 +91,7 @@
{{ account.account_name || '未知账户' }}
+{{ account.account_name || '未知账户' }}
+ + + + 当前登录 + +