refactor: 全局去除误导性AI描述与浮夸修饰,面向生产环境标准化商务智能术语
这个提交包含在:
@@ -161,6 +161,7 @@ import {
|
||||
refreshCards,
|
||||
resolveCardHomeText,
|
||||
statusLabel,
|
||||
formatSvgDataUri,
|
||||
CardHomeCopyKey,
|
||||
CardHomeItem,
|
||||
CardHomePageOptions,
|
||||
@@ -360,7 +361,7 @@ async function updateActiveCardQr(card: CardHomeItem | null): Promise<void> {
|
||||
qrLoading.value = true;
|
||||
const res = await fetchCardQrcodeSvg(key);
|
||||
if (res != null) {
|
||||
activeQrSvg.value = res.svg != null ? res.svg : '';
|
||||
activeQrSvg.value = res.svg != null ? formatSvgDataUri(res.svg) : '';
|
||||
activeQrUrl.value = res.url != null ? res.url : '';
|
||||
}
|
||||
} catch (_e) {
|
||||
|
||||
@@ -363,3 +363,24 @@ export function pickShareCard(list: CardHomeItem[]): CardHomeItem | null {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function formatSvgDataUri(svg: string | null | undefined): string {
|
||||
if (svg == null) {
|
||||
return '';
|
||||
}
|
||||
const trimmed = svg.trim();
|
||||
if (trimmed === '') {
|
||||
return '';
|
||||
}
|
||||
if (
|
||||
trimmed.indexOf('http://') === 0 ||
|
||||
trimmed.indexOf('https://') === 0 ||
|
||||
trimmed.indexOf('data:') === 0
|
||||
) {
|
||||
return trimmed;
|
||||
}
|
||||
if (trimmed.indexOf('<svg') === 0) {
|
||||
return 'data:image/svg+xml;utf8,' + encodeURIComponent(trimmed);
|
||||
}
|
||||
return trimmed;
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ const EXCHANGE_TEXTS: Record<string, Record<string, string>> = {
|
||||
submit: '提交留资',
|
||||
submitting: '提交中...',
|
||||
badge: '双向名片互换',
|
||||
badgeAi: 'AI 极速识别',
|
||||
badgeAi: '智能扫描识别',
|
||||
contactSectionTitle: '联系人信息',
|
||||
contactSectionDesc: '留下真实商务联系方式,便于后续及时跟进',
|
||||
intentTitle: '沟通意向 (快捷选择)',
|
||||
|
||||
@@ -52,3 +52,29 @@ test('5. 个人资料顶部身份区域与配额进度条具备点击交互响
|
||||
assert.ok(content.includes('onEditProfileClick'), '顶部身份卡片必须具备 onEditProfileClick');
|
||||
assert.ok(content.includes('onQuotaClick'), '配额进度条必须具备 onQuotaClick 交互反馈');
|
||||
});
|
||||
|
||||
test('6. profile/index.uvue 必须集成 Executive 商业资产罗盘指标看板', () => {
|
||||
const content = fs.readFileSync(profileUvuePath, 'utf-8');
|
||||
|
||||
assert.ok(content.includes('metricsCards'), '指标看板必须包含活跃名片统计');
|
||||
assert.ok(content.includes('metricsVisitors'), '指标看板必须包含雷达访客统计');
|
||||
assert.ok(content.includes('metricsLeads'), '指标看板必须包含沉淀线索统计');
|
||||
assert.ok(content.includes('/pages/owner/radar'), '雷达指标必须支持跳转到雷达页');
|
||||
assert.ok(content.includes('/pages/owner/leads'), '线索指标必须支持跳转到线索页');
|
||||
});
|
||||
|
||||
test('7. profile/index.uvue 触控热区保证与底部安全区适配', () => {
|
||||
const content = fs.readFileSync(profileUvuePath, 'utf-8');
|
||||
|
||||
assert.ok(content.includes('env(safe-area-inset-bottom'), '必须适配视口底部安全区');
|
||||
assert.ok(content.includes('min-height: 44px') || content.includes('min-height: 46px') || content.includes('min-height: 48px'), '核心按钮与触控区必须保证 >= 44px');
|
||||
});
|
||||
|
||||
test('8. profile/index.uvue 必须符合 Bento Grid、漫反射软阴影与极光流光视觉 Token', () => {
|
||||
const content = fs.readFileSync(profileUvuePath, 'utf-8');
|
||||
|
||||
assert.ok(content.includes('bento-card'), '必须应用 bento-card 便当盒结构');
|
||||
assert.ok(content.includes('box-shadow'), '必须包含漫反射软阴影设计');
|
||||
assert.ok(content.includes('linear-gradient'), '必须包含品牌微渐变或极光流光微效果');
|
||||
});
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户