feat(about): 实现大公司品牌级关于我们独立页(东方工程哲学、十年技术发展历程、专家团队与资质资产体系)

这个提交包含在:
wikiboss
2026-10-08 17:22:35 +08:00
父节点 27c46b58f6
当前提交 4ab9edc83d
共有 5 个文件被更改,包括 1006 次插入 和 83 次删除

查看文件

@@ -139,12 +139,51 @@ def test_nav_megamenu():
res.assert_true('.nhc-has-dropdown:hover' in css, "CSS 包含鼠标悬停触发规则")
return res.summary()
def test_about_page():
res = TestResult("关于我们独立页 (AboutPage)")
single_path = os.path.join(BASE_DIR, 'addons', 'official', 'view', 'web', 'official_home', 'single.html')
single_e_path = os.path.join(BASE_DIR, 'addons', 'official', 'view', 'web', 'official_home', 'single_e.html')
css_path = os.path.join(BASE_DIR, 'public', 'assets', 'addons', 'official', 'css', 'modern_nhc.css')
html = open(single_path, 'r', encoding='utf-8').read() if os.path.exists(single_path) else ''
mobile_html = open(single_e_path, 'r', encoding='utf-8').read() if os.path.exists(single_e_path) else ''
css = open(css_path, 'r', encoding='utf-8').read() if os.path.exists(css_path) else ''
res.assert_true('纳海川' in html, "PC 关于我们页必须明确包含品牌名称【纳海川】")
res.assert_true(not re.search(r'纳川(?!海)', html), "PC 关于我们页严禁错误简称为【纳川】")
has_brand = 'nhc-about-brand' in html or '工程哲学' in html or '品牌' in html
res.assert_true(has_brand, "必须包含【品牌】(品牌渊源与东方工程哲学)板块")
has_team = 'nhc-about-team' in html or '技术委员会' in html or '核心团队' in html
res.assert_true(has_team, "必须包含【团队】(技术委员会专家与核心团队)板块")
has_certs = 'nhc-about-qualifications' in html or '软件著作权' in html or '合规体系' in html
res.assert_true(has_certs, "必须包含【资质】(权威资质、软著资产与安全合规体系)板块")
has_milestones = '2016' in html or '2019' in html or '2024' in html or '发展历程' in html
res.assert_true(has_milestones, "去AI味道:展示具体发展历程或里程碑")
has_tech = '架构师' in html or '全栈' in html or '智能体' in html
res.assert_true(has_tech, "去AI味道:展示严谨技术职称与专业领域")
has_certs_concrete = 'ISO' in html or '著作权' in html or '等保' in html
res.assert_true(has_certs_concrete, "去AI味道:展示具体行业认证体系与软著资产")
has_emoji = bool(re.search(r'[\U0001F600-\U0001F64F\U0001F300-\U0001F5FF\U0001F680-\U0001F6FF\u2600-\u26FF\u2700-\u27BF]', html))
res.assert_true(not has_emoji, "严禁使用任何 emoji 表情符号")
res.assert_true(bool(mobile_html), "移动端关于我们模板 single_e.html 必须存在")
if mobile_html:
res.assert_true('纳海川' in mobile_html, "移动端模板包含品牌名【纳海川】")
res.assert_true('团队' in mobile_html or '专家' in mobile_html, "移动端模板包含核心团队介绍")
res.assert_true('资质' in mobile_html or '著作权' in mobile_html, "移动端模板包含资质认证板块")
return res.summary()
def main():
results = [
test_cases_page(),
test_services_page(),
test_products_page(),
test_nav_megamenu()
test_nav_megamenu(),
test_about_page()
]
sys.exit(0 if all(results) else 1)