mirror of
https://github.com/LifeArchiveProject/WeChatDataAnalysis.git
synced 2026-06-18 15:54:08 +08:00
fix: return aes_key to frontend
This commit is contained in:
@@ -459,8 +459,8 @@ export const useApi = () => {
|
||||
}
|
||||
|
||||
// 获取数据库密钥
|
||||
const getDbKey = async () => {
|
||||
return await request('/get_db_key')
|
||||
const getKeys = async () => {
|
||||
return await request('/get_keys')
|
||||
}
|
||||
|
||||
// 获取图片密钥
|
||||
@@ -509,7 +509,7 @@ export const useApi = () => {
|
||||
getWrappedAnnual,
|
||||
getWrappedAnnualMeta,
|
||||
getWrappedAnnualCard,
|
||||
getDbKey,
|
||||
getKeys,
|
||||
getImageKey,
|
||||
getWxStatus,
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
import { ref, reactive, computed, onMounted, onBeforeUnmount } from 'vue'
|
||||
import { useApi } from '~/composables/useApi'
|
||||
|
||||
const { decryptDatabase, saveMediaKeys, getSavedKeys, getDbKey, getImageKey, getWxStatus } = useApi()
|
||||
const { decryptDatabase, saveMediaKeys, getSavedKeys, getKeys, getImageKey, getWxStatus } = useApi()
|
||||
|
||||
const loading = ref(false)
|
||||
const error = ref('')
|
||||
@@ -541,7 +541,7 @@ const handleGetDbKey = async () => {
|
||||
|
||||
warning.value = '正在启动微信,请确保微信未开启“自动登录”,并在弹窗中正常登录。'
|
||||
|
||||
const res = await getDbKey()
|
||||
const res = await getKeys()
|
||||
|
||||
if (res && res.status === 0) {
|
||||
if (res.data?.db_key) {
|
||||
@@ -703,13 +703,13 @@ const handleDecrypt = async () => {
|
||||
if (!validateForm()) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
loading.value = true
|
||||
error.value = ''
|
||||
warning.value = ''
|
||||
|
||||
resetDbDecryptProgress()
|
||||
|
||||
|
||||
try {
|
||||
const canSse = process.client && typeof window !== 'undefined' && typeof EventSource !== 'undefined'
|
||||
|
||||
@@ -730,7 +730,6 @@ const handleDecrypt = async () => {
|
||||
if (accounts.length > 0) mediaAccount.value = accounts[0]
|
||||
} catch (e) {}
|
||||
|
||||
clearManualKeys()
|
||||
currentStep.value = 1
|
||||
await prefillKeysForAccount(mediaAccount.value)
|
||||
|
||||
@@ -827,7 +826,6 @@ const handleDecrypt = async () => {
|
||||
loading.value = false
|
||||
|
||||
if (data.status === 'completed') {
|
||||
clearManualKeys()
|
||||
currentStep.value = 1
|
||||
await prefillKeysForAccount(mediaAccount.value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user