This commit is contained in:
cc
2026-05-02 19:08:07 +08:00
parent 318b553d0e
commit 1e3a496021
15 changed files with 251 additions and 86 deletions

View File

@@ -154,15 +154,17 @@ export class WcdbService {
/**
* 测试数据库连接
*/
async testConnection(dbPath: string, hexKey: string, wxid: string): Promise<{ success: boolean; error?: string; sessionCount?: number }> {
return this.callWorker('testConnection', { dbPath, hexKey, wxid })
async testConnection(accountDir: string, hexKey: string): Promise<{ success: boolean; error?: string; sessionCount?: number }> {
return this.callWorker('testConnection', { accountDir, hexKey })
}
/**
* 打开数据库
* @param accountDir 账号目录的完整路径
* @param hexKey 解密密钥
*/
async open(dbPath: string, hexKey: string, wxid: string): Promise<boolean> {
return this.callWorker('open', { dbPath, hexKey, wxid })
async open(accountDir: string, hexKey: string): Promise<boolean> {
return this.callWorker('open', { accountDir, hexKey })
}
async getLastInitError(): Promise<string | null> {