mirror of
https://github.com/LifeArchiveProject/WeChatDataAnalysis.git
synced 2026-02-19 06:10:52 +08:00
feat: frontend support auto get key
This commit is contained in:
@@ -344,6 +344,20 @@ export const useApi = () => {
|
||||
const url = `/wrapped/annual/cards/${safeId}` + (query.toString() ? `?${query.toString()}` : '')
|
||||
return await request(url)
|
||||
}
|
||||
|
||||
// 获取数据库解密密钥
|
||||
const getDbKey = () => {
|
||||
return useFetch('/api/get_db_key', {
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取图片解密密钥
|
||||
const getImageKey = () => {
|
||||
return useFetch('/api/get_image_key', {
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
detectWechat,
|
||||
@@ -375,6 +389,8 @@ export const useApi = () => {
|
||||
cancelChatExport,
|
||||
getWrappedAnnual,
|
||||
getWrappedAnnualMeta,
|
||||
getWrappedAnnualCard
|
||||
getWrappedAnnualCard,
|
||||
getDbKey,
|
||||
getImageKey,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user