feat(community,faq): support dynamic community topics, notice, and FAQ center

这个提交包含在:
xcbyy
2026-10-10 10:04:49 +08:00
父节点 82ba59f373
当前提交 8845fbe7cb
共有 5 个文件被更改,包括 383 次插入 和 16 次删除

查看文件

@@ -80,4 +80,50 @@ describe('平台通用配置与合规管理 TDD 自动化测试', () => {
expect(merged.customer_service.hotline).toBe('400-123-4567');
expect(merged.safety_notice.title).toBe('官方公告');
});
it('6. 友圈热门话题与置顶公告配置校验 (P4)', () => {
const defaultTopics = [
{ name: '#深夜电台', count: '1.2w+', hot: true },
{ name: '#周末密室剧本杀', count: '8.5k', hot: true },
{ name: '#王者峡谷车队', count: '2.1w+', hot: false }
];
expect(defaultTopics.length).toBe(3);
expect(defaultTopics.filter(t => t.hot).length).toBe(2);
const notice = {
tag: '头条',
title: '友圈同城搭子发帖公约:严禁发布广告与不文明交友行为'
};
const secResult = secService.checkText(notice.title);
expect(secResult.pass).toBe(true);
const badNotice = {
tag: '广告',
title: '添加客服微信提供上门特殊服务'
};
const badSec = secService.checkText(badNotice.title);
expect(badSec.pass).toBe(false);
expect(badSec.code).toBe(87014);
});
it('7. 帮助中心与常见问题 FAQ 配置校验 (P5)', () => {
const faqList = [
{
question: '如何成为认证陪伴师/陪玩大神?',
answer: '进入【我的】->【入驻申请】,提交实名认证与技能资质,平台将在 24 小时内完成人工审核。',
category: '陪伴师相关'
},
{
question: '遇到订单纠纷如何申请平台仲裁?',
answer: '在【订单详情】中点击【申请仲裁退款】,客服与平台专员将在 2 小时内介入调解。',
category: '订单与退款'
}
];
expect(faqList.length).toBe(2);
expect(faqList[0].category).toBe('陪伴师相关');
const check = secService.checkText(JSON.stringify(faqList));
expect(check.pass).toBe(true);
});
});