更新后台管理消息列表;

This commit is contained in:
karlcarlo
2025-12-15 17:44:35 +08:00
parent 41d2d893d3
commit a7b3454f61
22 changed files with 1620 additions and 356 deletions

View File

@@ -436,11 +436,15 @@ export const workflowService = {
}
console.log('当前页面支持获取客户ID,entry:', contextInfo.entry);
// alert(`当前页面支持获取客户ID,entry: ${contextInfo.entry}`);
// 在支持获取客户ID的页面,尝试获取真实客户ID
customerResult = await weComHook.getCurExternalContact()
.then(customerInfo => {
console.log('成功获取到客户ID:', customerInfo);
console.log('成功获取到客户ID,完整数据:', customerInfo);
console.log('客户ID字段值:', customerInfo.externalUserId);
console.log('客户数据所有键名:', Object.keys(customerInfo || {}));
// alert(`成功获取到客户ID: ${customerInfo.externalUserId}\n完整数据键名: ${Object.keys(customerInfo || {}).join(', ')}`);
return {
...customerInfo,
context: contextInfo,
@@ -500,6 +504,7 @@ export const workflowService = {
// 5. 获取会话历史
if (onProgress) onProgress('history', 'loading');
let historyResult;
// alert(`5. 获取会话历史开始 userId: ${customerResult.externalUserId}`);
if (!customerResult.externalUserId || customerResult.mock) {
console.warn('使用模拟历史数据');
historyResult = {