fix(client): 修复极速名片编辑与潜客详情白屏,补齐战报空状态与AI回退逻辑

这个提交包含在:
wikiboss
2026-09-21 15:23:29 +08:00
父节点 51a2f37180
当前提交 99b73bb309
共有 7 个文件被更改,包括 908 次插入 和 171 次删除

查看文件

@@ -49,7 +49,12 @@ export type AiChatCopyKey =
| 'leadCardTitle'
| 'leadCardDesc'
| 'submitFailed'
| 'error';
| 'error'
| 'statusOnline'
| 'advisorSubtitle'
| 'quickPricing'
| 'quickCases'
| 'quickServices';
export type SendChatInput = {
cardId: string | number;
@@ -217,6 +222,21 @@ export function resolveAiChatText(key: AiChatCopyKey): string {
if (key === 'submitFailed') {
return zh ? '提交失败,请重试' : 'Submission failed, please retry';
}
if (key === 'statusOnline') {
return zh ? '在线 · 全天候接待' : 'Online · 24/7 Available';
}
if (key === 'advisorSubtitle') {
return zh ? '专属智能顾问为您解答业务' : 'Digital concierge ready to assist';
}
if (key === 'quickPricing') {
return zh ? '产品方案与报价' : 'Pricing & Plans';
}
if (key === 'quickCases') {
return zh ? '标杆客户与案例' : 'Client Success Cases';
}
if (key === 'quickServices') {
return zh ? '核心服务能力' : 'Core Capabilities';
}
return '';
}
@@ -240,7 +260,19 @@ export function applyAiChatOptions(
state: AiChatState,
options: AiChatPageOptions | null
): boolean {
const cardIdRaw = options != null ? options.cardId || options.id || '' : '';
let cardIdRaw = options != null ? options.cardId || options.id || '' : '';
if (String(cardIdRaw).trim() === '') {
try {
const stored = uni.getStorageSync('omnicard_active_card_id');
if (stored != null && String(stored).trim() !== '') {
cardIdRaw = String(stored).trim();
} else {
cardIdRaw = '1001';
}
} catch (_e) {
cardIdRaw = '1001';
}
}
const langRaw = options != null ? options.lang || options.locale || '' : '';
state.cardId = String(cardIdRaw).trim();
@@ -396,7 +428,7 @@ export async function sendStreamMessage(
: 'For pricing and partnership details, we have tailored options. Please leave your details below to receive our pricing sheet.';
} else {
fullReply = zh
? '我是名片智能顾问,很高兴为您服务。我可以为您介绍名片主页、Bento微官网与出海团队能力。请随时提问。'
? '我是名片智能顾问,很高兴为您服务。我可以为您介绍名片主页、Bento微官网与团队专业能力。请随时提问。'
: 'I am the digital concierge for this card. I can introduce the profile, Bento blocks, and our capabilities. Feel free to ask.';
}