refactor(i18n): 全工程面向国际用户与全球现代商务重构,彻底清理出海跨境等单向视角表达并对齐自动化测试
这个提交包含在:
@@ -406,7 +406,7 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
audioPronunciationUrl: 'https://cdn.omnicard.ai/audio/alex-pronunciation.mp3',
|
||||
status: 'published',
|
||||
themeCode: 'corporate_navy',
|
||||
remark: '内部高管名片,核心出海带队',
|
||||
remark: '内部高管名片,国际业务核心',
|
||||
internalConfig: '{"rateLimit": 1000, "debug": false}',
|
||||
});
|
||||
|
||||
@@ -425,7 +425,7 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
colSpan: 2 as BentoColSpan,
|
||||
rowSpan: 1 as BentoRowSpan,
|
||||
title: '个人简介与身份卡',
|
||||
content: '专注于中东与欧洲出海数字商务拓客',
|
||||
content: '专注于中东与欧洲数字商务合作',
|
||||
status: 1,
|
||||
},
|
||||
{
|
||||
@@ -440,7 +440,7 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
type: 'case' as BentoBlockType,
|
||||
colSpan: 2 as BentoColSpan,
|
||||
rowSpan: 2 as BentoRowSpan,
|
||||
title: '新能源出海案例',
|
||||
title: '新能源国际合作案例',
|
||||
content: '协助头部光伏企业落地阿布扎比',
|
||||
status: 1,
|
||||
},
|
||||
@@ -448,8 +448,8 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
type: 'article' as BentoBlockType,
|
||||
colSpan: 1 as BentoColSpan,
|
||||
rowSpan: 1 as BentoRowSpan,
|
||||
title: '2026出海白皮书',
|
||||
content: '深度解读跨境智能名片获客漏斗',
|
||||
title: '2026全球数字名片白皮书',
|
||||
content: '深度解读全球智能名片获客漏斗',
|
||||
status: 1,
|
||||
},
|
||||
];
|
||||
@@ -488,14 +488,14 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
it('P04: 博客文章发布与 SEO OpenGraph 社交卡片自动提炼', async () => {
|
||||
const rawHtmlContent = `
|
||||
<article>
|
||||
<h1>出海获客新引擎:2026 跨境数字名片实战洞察</h1>
|
||||
<p>在全球数字化出海与国际展会场景中,传统的纸质名片不仅浪费印刷成本,且存在高达 88% 的即时丢弃率。通过引入具备 NFC 极速碰触、多语言自适应以及 24 小时 AI 自动留资的智能微官网,出海销售代表能够在 30 秒内建立品牌信任,并让每一位海外客商的浏览轨迹实时映射在销售雷达上,实现端到端的精准线索转化。</p>
|
||||
<h1>全球获客新引擎:2026 数字名片实战洞察</h1>
|
||||
<p>在全球数字化与国际商务展会场景中,传统的纸质名片不仅浪费印刷成本,且存在高达 88% 的即时丢弃率。通过引入具备 NFC 极速碰触、多语言自适应以及 24 小时 AI 自动留资的智能微官网,销售代表能够在 30 秒内建立品牌信任,并让每一位国际客商的浏览轨迹实时映射在销售雷达上,实现端到端的精准线索转化。</p>
|
||||
</article>
|
||||
`;
|
||||
|
||||
const articleEntity = await articleRepo.save({
|
||||
cardId: sharedCardId,
|
||||
title: '出海获客新引擎:2026 跨境数字名片实战洞察',
|
||||
title: '全球获客新引擎:2026 数字名片实战洞察',
|
||||
content: rawHtmlContent,
|
||||
coverImage: 'https://cdn.omnicard.ai/articles/og-banner.png',
|
||||
isPublished: true,
|
||||
@@ -506,7 +506,7 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
|
||||
expect(ogMeta.title).toBe(articleEntity.title);
|
||||
expect(ogMeta.image).toBe('https://cdn.omnicard.ai/articles/og-banner.png');
|
||||
expect(ogMeta.description).toContain('在全球数字化出海与国际展会场景中');
|
||||
expect(ogMeta.description).toContain('在全球数字化与国际商务展会场景中');
|
||||
expect(ogMeta.description.length).toBeLessThanOrEqual(160);
|
||||
expect(ogMeta.description).not.toContain('<p>');
|
||||
});
|
||||
@@ -746,7 +746,7 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
it('P13: 名片 AI 顾问人设、基调与留资触发阈值配置', async () => {
|
||||
const config = await aiConciergeService.saveByCardId(sharedCardId, {
|
||||
personaType: 'trade_expert',
|
||||
welcomeMsg: '您好!我是 Alex 的 AI 出海顾问,请问有什么可以协助您的?',
|
||||
welcomeMsg: '您好!我是 Alex 的 AI 商务顾问,请问有什么可以协助您的?',
|
||||
triggerLeadThreshold: 75,
|
||||
promptTemplate: 'You are an export trade consultant specialized in clean energy solutions.',
|
||||
toneStyle: 'professional',
|
||||
@@ -758,14 +758,14 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
expect(config.triggerLeadThreshold).toBe(75);
|
||||
|
||||
const queried = await aiConciergeService.getByCardId(sharedCardId);
|
||||
expect(queried?.welcomeMsg).toContain('Alex 的 AI 出海顾问');
|
||||
expect(queried?.welcomeMsg).toContain('Alex 的 AI 商务顾问');
|
||||
});
|
||||
|
||||
it('P14: 知识库 RAG 滑动窗口文本分块与重叠切片算法', () => {
|
||||
const rawDocText = `
|
||||
OmniCard AI 致力于为全球商务出海团队提供次世代数字名片与微官网解决方案。
|
||||
OmniCard AI 致力于为全球商务团队提供次世代数字名片与微官网解决方案。
|
||||
支持中东、欧洲及北美地区的主流商务支付与 CRM 系统无缝互联。
|
||||
我们针对新能源、智能硬件及跨境电商客户提供定制化的展会获客方案,
|
||||
我们针对新能源、智能硬件及全球电商客户提供定制化的展会获客方案,
|
||||
配合实体 NFC 智能卡片,可实现秒级留资并自动将高意向线索同步至公海池。
|
||||
`.trim();
|
||||
|
||||
@@ -782,7 +782,7 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
const testChunks = [
|
||||
{
|
||||
index: 0,
|
||||
content: '公司主营产品包含新能源储能电站与光伏逆变器海外解决方案。',
|
||||
content: '公司主营产品包含新能源储能电站与光伏逆变器全球解决方案。',
|
||||
length: 30,
|
||||
},
|
||||
{
|
||||
@@ -808,7 +808,7 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
expect(results[0].score).toBeGreaterThan(0.5);
|
||||
});
|
||||
|
||||
it('P16: 外贸行业术语库 (Glossary) 导入与出海多语言润色替换', async () => {
|
||||
it('P16: 行业专有术语库 (Glossary) 导入与国际多语言润色替换', async () => {
|
||||
const importRes = await aiGlossaryService.batchImport([
|
||||
{
|
||||
sourceTerm: 'digital business card',
|
||||
@@ -1103,15 +1103,15 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
// =========================================================================
|
||||
describe('主干流 6: 多租户与商业化 (Points 27-30)', () => {
|
||||
it('P27: 组织架构部门树多层级递归与成员名片分配 (TeamMembersService)', async () => {
|
||||
// 1. 初始化部门树结构:总部 -> 海外销售中心 -> 中东拓展组
|
||||
// 1. 初始化部门树结构:总部 -> 国际销售中心 -> 中东拓展组
|
||||
const headDept = await deptRepo.save({
|
||||
name: '全球出海总部',
|
||||
name: '全球总部',
|
||||
parentId: null as any,
|
||||
orderNum: 1,
|
||||
});
|
||||
|
||||
const salesDept = await deptRepo.save({
|
||||
name: '海外拓展事业群',
|
||||
name: '全球拓展事业群',
|
||||
parentId: headDept.id,
|
||||
orderNum: 2,
|
||||
});
|
||||
|
||||
在新工单中引用
屏蔽一个用户