修复联系人页面导出异常

This commit is contained in:
cc
2026-05-04 18:33:02 +08:00
parent 7233f4249d
commit fd0db6e306
2 changed files with 21 additions and 7 deletions

View File

@@ -166,7 +166,15 @@ async function run() {
let result: any
if (config.mode === 'contacts') {
const { contactExportService } = await import('./services/contactExportService')
const [{ contactExportService }, { chatService }] = await Promise.all([
import('./services/contactExportService'),
import('./services/chatService')
])
chatService.setRuntimeConfig({
dbPath: config.dbPath,
decryptKey: config.decryptKey,
myWxid: config.myWxid
})
result = await contactExportService.exportContacts(
String(config.outputDir || ''),
config.options || {}