feat: 同步管理端、用户端与后端业务,并接通线上 Web 接口

补齐平台订阅、外部登录、CRM 同步与用户端页面;Nginx 转发用户端接口,登录页使用 Google 与 Apple 标志。

Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
wikiboss
2026-09-23 18:01:47 +08:00
父节点 8ea9c25386
当前提交 62e0ae4435
共有 227 个文件被更改,包括 21855 次插入 和 5264 次删除

查看文件

@@ -59,3 +59,59 @@ test('3. crm/leads locale 必须包含中英文案', () => {
assert.ok(content.includes('crmLeads.status.new'), '必须包含状态文案');
assert.ok(content.includes('crmLeads.source.ai_chat'), '必须包含来源文案');
});
test('4. crm/leads 导出必须调用 batchExport,空数据不落盘', () => {
const content = fs.readFileSync(leadsPagePath, 'utf-8');
const localeContent = fs.readFileSync(leadsLocalePath, 'utf-8');
assert.ok(
content.includes('admin/crm/lead/batchExport'),
'必须请求 POST /api/admin/crm/lead/batchExport'
);
assert.ok(
content.includes('crmLeads.export') || content.includes("t['crmLeads.export"),
'必须有导出按钮文案'
);
assert.ok(
content.includes('crmLeads.export.empty'),
'空数据必须提示 crmLeads.export.empty'
);
assert.ok(
/exportCount\s*<=\s*0|list\.length\s*===\s*0/.test(content),
'必须判断空导出,禁止空表头落盘冒充成功'
);
assert.ok(
/crmLeads\.export\.empty[\s\S]{0,120}return|Message\.info\([\s\S]{0,80}export\.empty[\s\S]{0,40}return/.test(
content
),
'空数据提示后必须 return,禁止继续下载'
);
assert.ok(
content.includes('createObjectURL') || content.includes('Blob'),
'有数据时必须下载 csv/xlsx'
);
assert.ok(
content.includes('.csv') || content.includes('.xlsx'),
'下载文件必须是 csv 或 xlsx'
);
assert.ok(
!content.includes('Alex') &&
!content.includes('John Doe') &&
!content.includes('示例客户') &&
!content.includes('张三') &&
!content.includes('假客户'),
'禁止前端写死示例客户冒充导出成功'
);
for (const key of [
'crmLeads.export',
'crmLeads.export.empty',
'crmLeads.export.success',
'crmLeads.export.fail',
]) {
assert.ok(localeContent.includes(key), `locale 必须包含 ${key}`);
}
assert.ok(localeContent.includes("'en-US'"), 'locale 必须含 en-US');
assert.ok(localeContent.includes("'zh-CN'"), 'locale 必须含 zh-CN');
assert.ok(localeContent.includes("'ar-SA'"), 'locale 必须含 ar-SA');
});