feat(cases): 实现大公司品牌级标杆案例独立页(多维筛选、挑战方案结果与成果数据指标墙)
这个提交包含在:
@@ -1,70 +1,296 @@
|
||||
{extend name="web/official_common/pc/base" /}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
<!--主体内容 开始-->
|
||||
<div class="picture">
|
||||
<!--右侧区域 开始-->
|
||||
<div id="right">
|
||||
<div class="right_title">
|
||||
<!--当前位置 开始-->
|
||||
<div id="location">
|
||||
<b>{:__l('index','Current position')}:</b>
|
||||
<a href="/" target="_self">{:__l('index','Website homepage')}</a> >>
|
||||
<a href="javascript:;">{:ze($res,'name')}</a> >>
|
||||
{if !empty($son_data)}
|
||||
<a href="javascript:;">{:ze($son_data,'name')}</a>
|
||||
{/if}
|
||||
</div>
|
||||
<!--当前位置 结束-->
|
||||
<h2>
|
||||
<img src="__ADDON__/images/titleleftbg.png" align="absmiddle">{:ze($res,'name')}
|
||||
<img src="__ADDON__/images/titlerightbg.png" align="absmiddle">
|
||||
</h2>
|
||||
</div>
|
||||
<div id="subchannel_main">
|
||||
<div id="subchannel">
|
||||
<ul class="subchannellist">
|
||||
{foreach $res['son'] as $item}
|
||||
<li class="depth1" {if $item['is_choose']} id="current" {/if}>
|
||||
<a href="{:get_cate_url($item)}">{:ze($item,'name')}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right_body ">
|
||||
<ul class="gridlist">
|
||||
|
||||
<!--循环开始-->
|
||||
{foreach $data as $index => $item}
|
||||
<li>
|
||||
<a href="{:addon_url('official/web.official_case_show/details',[':pid'=>(int)input('param.pid'),':sid'=>(int)input('param.sid'),':id'=>$item['id']])}" target="_blank">
|
||||
<div class="InfoPicture">
|
||||
<img src="{$item['image']}" title="{$item['title']}" alt="{$item['title']}">
|
||||
</div>
|
||||
<div class="InfoTitle">
|
||||
{$item['title']}
|
||||
</div>
|
||||
<p></p>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
<!--循环结束-->
|
||||
</ul>
|
||||
<div class="page_custom">
|
||||
<div class="page_son">
|
||||
{$data->render(['pid'=>(int)input('param.pid'),'sid'=>(int)input('param.sid')])}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right_bottom"></div>
|
||||
</div>
|
||||
<!--右侧区域 结束-->
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<!--主体内容 结束-->
|
||||
|
||||
|
||||
|
||||
{extend name="web/official_common/pc/base" /}
|
||||
|
||||
{block name="content"}
|
||||
<!-- 纳海川官方网站 · 客户案例独立页 (Cases Page) 开始 -->
|
||||
|
||||
<!-- 1. 案例页 Hero 视窗 -->
|
||||
<section class="nhc-page-hero nhc-lattice-pattern">
|
||||
<div class="nhc-container">
|
||||
<div class="nhc-breadcrumb">
|
||||
<a href="{:addon_url('official/web.official_home/index')}">首页</a>
|
||||
<span>/</span>
|
||||
<span>标杆案例</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 16px;">
|
||||
<span class="nhc-seal">精选实践</span>
|
||||
</div>
|
||||
<h1 class="nhc-page-title">精选实践成果 · 严谨数据验证</h1>
|
||||
<p class="nhc-page-desc">
|
||||
纳海川坚持以经得起考验的工程规范,为政企单位、智能制造、连锁商业零售及现代供应链企业打造自主可控的数字化落地样本。
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 2. 案例筛选与深度案例档案板块 -->
|
||||
<section class="nhc-cases nhc-cases-section" style="padding: 70px 0 90px;">
|
||||
<div class="nhc-container">
|
||||
|
||||
<!-- 多维业务与行业分类筛选器 (Filter) -->
|
||||
<div class="nhc-case-filter-wrap nhc-case-filter" id="nhcCaseFilter">
|
||||
<button class="nhc-case-filter-btn active" data-category="all">全部案例</button>
|
||||
<button class="nhc-case-filter-btn" data-category="middle">中台与软件开发</button>
|
||||
<button class="nhc-case-filter-btn" data-category="mobile">移动端与小程序定制</button>
|
||||
<button class="nhc-case-filter-btn" data-category="agent">企业级 AI 智能体</button>
|
||||
<button class="nhc-case-filter-btn" data-category="product">商城与商业产品</button>
|
||||
</div>
|
||||
|
||||
<!-- 深度标杆案例卡片网格 (2×2 布局) -->
|
||||
<div class="nhc-cases-grid" id="nhcCasesContainer">
|
||||
|
||||
<!-- 案例 1:大型商贸流通集团 -->
|
||||
<div class="nhc-case-card nhc-corner-card" data-category="middle product">
|
||||
<div class="nhc-case-header">
|
||||
<span class="nhc-case-tag">商贸批发 · 数字中台</span>
|
||||
<span class="nhc-case-status">成果验证</span>
|
||||
</div>
|
||||
<h3 class="nhc-case-title">大型快消供应链集团「全渠道分销商城与订货中台」</h3>
|
||||
<div class="nhc-case-dossier">
|
||||
<div class="nhc-case-dossier-row">
|
||||
<span class="nhc-dossier-label">业务挑战 CHALLENGE</span>
|
||||
<p class="nhc-dossier-text">
|
||||
跨区域经销商传统订货繁杂,人工拆单对账耗时长达 24 小时以上,高峰期锁库超时常导致断货漏单。
|
||||
</p>
|
||||
</div>
|
||||
<div class="nhc-case-dossier-row">
|
||||
<span class="nhc-dossier-label">技术方案 SOLUTION</span>
|
||||
<p class="nhc-dossier-text">
|
||||
重构分布式微服务订货中台,接入灵活等级阶梯价、信用授信账期管控及全自动分单对账引擎。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nhc-case-metrics">
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val">65<sub>%</sub></div>
|
||||
<div class="nhc-case-metric-name">订单处理时效提升</div>
|
||||
</div>
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val">0.02<sub>%</sub></div>
|
||||
<div class="nhc-case-metric-name">人工差错率降至</div>
|
||||
</div>
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val">10W<sub>+</sub></div>
|
||||
<div class="nhc-case-metric-name">日峰值订单处理</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 案例 2:知名连锁新零售 -->
|
||||
<div class="nhc-case-card nhc-corner-card" data-category="mobile product">
|
||||
<div class="nhc-case-header">
|
||||
<span class="nhc-case-tag">连锁零售 · 软硬一体</span>
|
||||
<span class="nhc-case-status">成果验证</span>
|
||||
</div>
|
||||
<h3 class="nhc-case-title">知名区域连锁餐饮「全场景智能收银与门店一体化」</h3>
|
||||
<div class="nhc-case-dossier">
|
||||
<div class="nhc-case-dossier-row">
|
||||
<span class="nhc-dossier-label">业务挑战 CHALLENGE</span>
|
||||
<p class="nhc-dossier-text">
|
||||
就餐高峰期前台排队拥堵严重,断网断电导致收银死机与掉单丢单,前后端数据脱节导致物料报表失真。
|
||||
</p>
|
||||
</div>
|
||||
<div class="nhc-case-dossier-row">
|
||||
<span class="nhc-dossier-label">技术方案 SOLUTION</span>
|
||||
<p class="nhc-dossier-text">
|
||||
部署软硬一体化收银系统与后厨 KDS 联动看板,打通微信扫码点餐、离线聚合支付与实时扣料核销。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nhc-case-metrics">
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val">70<sub>%</sub></div>
|
||||
<div class="nhc-case-metric-name">排队结账耗时缩短</div>
|
||||
</div>
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val">28<sub>%</sub></div>
|
||||
<div class="nhc-case-metric-name">物料损耗有效降低</div>
|
||||
</div>
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val">300<sub>+</sub></div>
|
||||
<div class="nhc-case-metric-name">全国门店稳定部署</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 案例 3:高端装备制造企业 -->
|
||||
<div class="nhc-case-card nhc-corner-card" data-category="middle">
|
||||
<div class="nhc-case-header">
|
||||
<span class="nhc-case-tag">智能制造 · 进销存 ERP</span>
|
||||
<span class="nhc-case-status">成果验证</span>
|
||||
</div>
|
||||
<h3 class="nhc-case-title">高端装备制造企业「生产进销存与供应链敏捷协同」</h3>
|
||||
<div class="nhc-case-dossier">
|
||||
<div class="nhc-case-dossier-row">
|
||||
<span class="nhc-dossier-label">业务挑战 CHALLENGE</span>
|
||||
<p class="nhc-dossier-text">
|
||||
零配件品类繁杂多达数万种,采购节拍与装配生产脱节,呆滞物料占用大量资金且难以追溯批次质量。
|
||||
</p>
|
||||
</div>
|
||||
<div class="nhc-case-dossier-row">
|
||||
<span class="nhc-dossier-label">技术方案 SOLUTION</span>
|
||||
<p class="nhc-dossier-text">
|
||||
定制落地进销存管理系统,建立动态物料 BOM 匹配、安全库存预警与供应商端协同门户。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nhc-case-metrics">
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val">42<sub>%</sub></div>
|
||||
<div class="nhc-case-metric-name">综合库存周转率提升</div>
|
||||
</div>
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val">55<sub>%</sub></div>
|
||||
<div class="nhc-case-metric-name">呆滞物料压降</div>
|
||||
</div>
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val">35<sub>%</sub></div>
|
||||
<div class="nhc-case-metric-name">采购物料周期缩短</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 案例 4:知识密集型政企机构 -->
|
||||
<div class="nhc-case-card nhc-corner-card" data-category="agent">
|
||||
<div class="nhc-case-header">
|
||||
<span class="nhc-case-tag">政企服务 · AI 智能体</span>
|
||||
<span class="nhc-case-status">成果验证</span>
|
||||
</div>
|
||||
<h3 class="nhc-case-title">知识密集型政务机构「专属 RAG 业务审核智能体」</h3>
|
||||
<div class="nhc-case-dossier">
|
||||
<div class="nhc-case-dossier-row">
|
||||
<span class="nhc-dossier-label">业务挑战 CHALLENGE</span>
|
||||
<p class="nhc-dossier-text">
|
||||
政策法规与历史案例规章跨数十库,人工跨部门查重检索耗时耗力,初审标准难统一且存在合规漏洞。
|
||||
</p>
|
||||
</div>
|
||||
<div class="nhc-case-dossier-row">
|
||||
<span class="nhc-dossier-label">技术方案 SOLUTION</span>
|
||||
<p class="nhc-dossier-text">
|
||||
构建基于私有大模型与向量数据库的 RAG 智能体,自动检索法规依据并输出规范化核查报告。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nhc-case-metrics">
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val"><1.5<sub>s</sub></div>
|
||||
<div class="nhc-case-metric-name">规章问答检索响应</div>
|
||||
</div>
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val">85<sub>%</sub></div>
|
||||
<div class="nhc-case-metric-name">初审人工消耗降低</div>
|
||||
</div>
|
||||
<div class="nhc-case-metric-item">
|
||||
<div class="nhc-case-metric-val">94.6<sub>%</sub></div>
|
||||
<div class="nhc-case-metric-name">业务合规准确率</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 3. 【数据】成果数据指标墙 (Data Wall) -->
|
||||
<section class="nhc-case-metrics-section nhc-case-metrics">
|
||||
<div class="nhc-container">
|
||||
<div class="nhc-section-header">
|
||||
<div class="nhc-section-tag">
|
||||
<span class="nhc-seal">数据实证</span>
|
||||
<span class="nhc-tag-text">PROVEN TRACK RECORD</span>
|
||||
</div>
|
||||
<h2 class="nhc-section-title">数字见证力量 · 严谨量化每一步成效</h2>
|
||||
<p class="nhc-section-desc">
|
||||
我们以客观的业务数据指标为交付尺度,为客户创造看得见的确定性商业价值。
|
||||
</p>
|
||||
<div class="nhc-line-divider"><span></span></div>
|
||||
</div>
|
||||
|
||||
<div class="nhc-case-metrics-grid">
|
||||
<div class="nhc-case-metric-card">
|
||||
<div class="nhc-case-metric-big">50<sub>亿+</sub></div>
|
||||
<div class="nhc-case-metric-title">系统累计支撑交易额</div>
|
||||
<div class="nhc-case-metric-sub">多商户与供应链结算总和</div>
|
||||
</div>
|
||||
<div class="nhc-case-metric-card">
|
||||
<div class="nhc-case-metric-big">200<sub>+</sub></div>
|
||||
<div class="nhc-case-metric-title">标杆政企与行业组织</div>
|
||||
<div class="nhc-case-metric-sub">商贸/制造/新零售深度合作</div>
|
||||
</div>
|
||||
<div class="nhc-case-metric-card">
|
||||
<div class="nhc-case-metric-big">50<sub>+</sub></div>
|
||||
<div class="nhc-case-metric-title">自主软件著作权资产</div>
|
||||
<div class="nhc-case-metric-sub">核心工业级软件工程沉淀</div>
|
||||
</div>
|
||||
<div class="nhc-case-metric-card">
|
||||
<div class="nhc-case-metric-big">99.8<sub>%</sub></div>
|
||||
<div class="nhc-case-metric-title">项目按期高质量交付率</div>
|
||||
<div class="nhc-case-metric-sub">严苛敏捷 TDD 全流程审计</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 4. 合作企业展位 -->
|
||||
<div class="nhc-container" style="padding: 70px 0 40px; text-align: center;">
|
||||
<span style="font-size: 13px; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase;">服务涵盖政企金融、先进制造、新零售及现代物流领域的领先组织</span>
|
||||
<div class="nhc-clients-grid" style="margin-top: 24px;">
|
||||
<div class="nhc-client-item">贵阳商贸供应链</div>
|
||||
<div class="nhc-client-item">西南智能制造</div>
|
||||
<div class="nhc-client-item">黔信互联科技</div>
|
||||
<div class="nhc-client-item">连锁零售商超</div>
|
||||
<div class="nhc-client-item">智慧农特产业</div>
|
||||
<div class="nhc-client-item">现代医药物流</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 5. 底部行动号召 (CTA Section) -->
|
||||
<section class="nhc-cta">
|
||||
<div class="nhc-container">
|
||||
<div class="nhc-cta-inner">
|
||||
<div class="nhc-cta-content">
|
||||
<span class="nhc-seal" style="background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.4); color: #FFFFFF; margin-bottom: 12px;">量身定制</span>
|
||||
<h2 class="nhc-cta-title">让您的企业也拥有经得起考验的数字化标杆系统</h2>
|
||||
<p class="nhc-cta-desc">
|
||||
纳海川解决方案架构师团队随时待命,为您提供深度业务剖析与可落地的架构方案,24 小时内快速响应对接。
|
||||
</p>
|
||||
</div>
|
||||
<div class="nhc-cta-buttons">
|
||||
<a href="{:addon_url('official/web.official_online_message/list',[':pid'=>18,':sid'=>18])}" class="nhc-btn nhc-cta-btn-light nhc-btn-lg">
|
||||
<span>预约架构师方案研讨</span>
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 12h14M12 5l7 7-7 7"/></svg>
|
||||
</a>
|
||||
<a href="tel:{:__config('site_mobile','value')}" class="nhc-btn nhc-cta-btn-ghost nhc-btn-lg">
|
||||
<span>致电案例咨询</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 客户端分类筛选交互脚本 -->
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var filterBtns = document.querySelectorAll('.nhc-case-filter-btn');
|
||||
var caseCards = document.querySelectorAll('#nhcCasesContainer .nhc-case-card');
|
||||
|
||||
filterBtns.forEach(function(btn) {
|
||||
btn.addEventListener('click', function() {
|
||||
var category = this.getAttribute('data-category');
|
||||
|
||||
filterBtns.forEach(function(b) { b.classList.remove('active'); });
|
||||
this.classList.add('active');
|
||||
|
||||
caseCards.forEach(function(card) {
|
||||
var cardCats = card.getAttribute('data-category') || '';
|
||||
if (category === 'all' || cardCats.indexOf(category) !== -1) {
|
||||
card.style.display = 'block';
|
||||
card.style.opacity = '1';
|
||||
} else {
|
||||
card.style.display = 'none';
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- 纳海川官方网站 · 客户案例独立页 (Cases Page) 结束 -->
|
||||
{/block}
|
||||
@@ -1,67 +1,267 @@
|
||||
{extend name="web/official_common/mobile/base" /}
|
||||
|
||||
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__ADDON__/m/css/anli.css">
|
||||
{/block}}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
<!--主体内容 开始-->
|
||||
<div class="picture">
|
||||
<!--右侧区域 开始-->
|
||||
<div id="right">
|
||||
<div class="right_title">
|
||||
<h2 class="right_title_2">
|
||||
<img src="__ADDON__/images/titleleftbg.png" align="absmiddle">{:ze($res,'name')}
|
||||
<img src="__ADDON__/images/titlerightbg.png" align="absmiddle">
|
||||
</h2>
|
||||
</div>
|
||||
<div id="subchannel_main">
|
||||
<div id="subchannel">
|
||||
{if isset($res['son']) && count($res['son'])}
|
||||
<ul class="subchannellist">
|
||||
{foreach $res['son'] as $item}
|
||||
<li class="depth1" {if $item['is_choose']} id="current" {/if}>
|
||||
<a href="{:get_cate_url($item)}" class="current_a">{:ze($item,'name')}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="right_body ">
|
||||
<ul class="gridlist">
|
||||
|
||||
<!--循环开始-->
|
||||
{foreach $data as $index => $item}
|
||||
<li class="gridlist_li">
|
||||
<a href="{:addon_url('official/web.official_case_show/details',[':pid'=>(int)input('param.pid'),':sid'=>(int)input('param.sid'),':id'=>$item['id']])}">
|
||||
<div class="InfoPicture">
|
||||
<img src="{$item['image']}" title="{$item['title']}" alt="{$item['title']}">
|
||||
</div>
|
||||
<div class="InfoTitle">
|
||||
{$item['title']}
|
||||
</div>
|
||||
<p></p>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
<!--循环结束-->
|
||||
</ul>
|
||||
<div class="page_custom">
|
||||
<div class="page_son">
|
||||
{$data->render(['pid'=>(int)input('param.pid'),'sid'=>(int)input('param.sid')])}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right_bottom"></div>
|
||||
</div>
|
||||
<!--右侧区域 结束-->
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<!--主体内容 结束-->
|
||||
|
||||
|
||||
|
||||
{extend name="web/official_common/mobile/base" /}
|
||||
|
||||
{block name="content"}
|
||||
<!-- 纳海川官方网站 · 移动端标杆案例独立页 (Cases Page Mobile) 开始 -->
|
||||
<div class="nhc-mobile-cases-page" style="background: #F8FAFC; min-height: 100vh; padding-bottom: 60px;">
|
||||
|
||||
<!-- 1. 移动端 Hero 视窗 -->
|
||||
<div style="background: #FFFFFF; padding: 28px 16px 22px; border-bottom: 1px solid #E2E8F0; text-align: center;">
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span class="nhc-seal" style="padding: 2px 10px; font-size: 11px;">精选实践</span>
|
||||
</div>
|
||||
<h1 style="font-family: 'Noto Serif SC', 'SimSun', serif; font-size: 20px; font-weight: 700; color: #0F172A; margin: 0 0 8px 0; line-height: 1.4;">
|
||||
标杆实践成果 · 严谨数据验证
|
||||
</h1>
|
||||
<p style="font-size: 13px; color: #64748B; margin: 0; line-height: 1.6;">
|
||||
纳海川坚持严苛工程标准,为政企单位、智能制造与连锁商业打造确定性数字化样本。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- 2. 横向滑动筛选器 (Filter) -->
|
||||
<div style="background: #FFFFFF; border-bottom: 1px solid #E2E8F0; padding: 12px 16px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;" class="nhc-case-filter" id="nhcMobileCaseFilter">
|
||||
<button class="nhc-case-filter-btn active" data-category="all" style="padding: 6px 14px; font-size: 13px; border-radius: 4px; border: 1px solid #2563EB; background: #2563EB; color: #FFFFFF; margin-right: 8px;">全部案例</button>
|
||||
<button class="nhc-case-filter-btn" data-category="middle" style="padding: 6px 14px; font-size: 13px; border-radius: 4px; border: 1px solid #E2E8F0; background: #F8FAFC; color: #475569; margin-right: 8px;">软件开发与中台</button>
|
||||
<button class="nhc-case-filter-btn" data-category="mobile" style="padding: 6px 14px; font-size: 13px; border-radius: 4px; border: 1px solid #E2E8F0; background: #F8FAFC; color: #475569; margin-right: 8px;">APP与小程序</button>
|
||||
<button class="nhc-case-filter-btn" data-category="agent" style="padding: 6px 14px; font-size: 13px; border-radius: 4px; border: 1px solid #E2E8F0; background: #F8FAFC; color: #475569; margin-right: 8px;">企业级 AI 智能体</button>
|
||||
<button class="nhc-case-filter-btn" data-category="product" style="padding: 6px 14px; font-size: 13px; border-radius: 4px; border: 1px solid #E2E8F0; background: #F8FAFC; color: #475569;">商城与商业产品</button>
|
||||
</div>
|
||||
|
||||
<!-- 3. 案例卡片列表容器 -->
|
||||
<div style="padding: 16px;" id="nhcMobileCasesContainer">
|
||||
|
||||
<!-- 案例 1 -->
|
||||
<div class="nhc-mobile-case-card nhc-case-card" data-category="middle product" style="background: #FFFFFF; border-radius: 6px; border: 1px solid #E2E8F0; padding: 18px; margin-bottom: 16px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
||||
<span style="font-size: 12px; color: #2563EB; font-weight: 600;">商贸批发 · 数字中台</span>
|
||||
<span class="nhc-seal" style="padding: 1px 6px; font-size: 10px;">成果验证</span>
|
||||
</div>
|
||||
<h3 style="font-family: 'Noto Serif SC', 'SimSun', serif; font-size: 16px; font-weight: 700; color: #0F172A; margin: 0 0 12px 0; line-height: 1.4;">
|
||||
大型快消供应链集团「全渠道分销商城与订货中台」
|
||||
</h3>
|
||||
<div style="background: #F8FAFC; border-radius: 4px; padding: 12px; margin-bottom: 14px; border-left: 3px solid #2563EB;">
|
||||
<div style="margin-bottom: 8px;">
|
||||
<div style="font-size: 11px; font-weight: 700; color: #64748B; letter-spacing: 1px;">业务挑战 CHALLENGE</div>
|
||||
<p style="font-size: 12px; color: #334155; margin: 2px 0 0; line-height: 1.5;">
|
||||
跨区域经销商传统订货繁杂,人工拆单对账耗时长达 24 小时以上,高峰期锁库超时常导致断货漏单。
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 11px; font-weight: 700; color: #64748B; letter-spacing: 1px;">技术方案 SOLUTION</div>
|
||||
<p style="font-size: 12px; color: #334155; margin: 2px 0 0; line-height: 1.5;">
|
||||
重构分布式微服务订货中台,接入灵活等级阶梯价、信用授信账期管控及全自动分单对账引擎。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; border-top: 1px solid #F1F5F9; padding-top: 10px;">
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #2563EB; font-family: 'Noto Serif SC', serif;">65%</div>
|
||||
<div style="font-size: 11px; color: #64748B;">时效提升</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #0F172A; font-family: 'Noto Serif SC', serif;">0.02%</div>
|
||||
<div style="font-size: 11px; color: #64748B;">差错率降至</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #0F172A; font-family: 'Noto Serif SC', serif;">10W+</div>
|
||||
<div style="font-size: 11px; color: #64748B;">日峰值单量</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 案例 2 -->
|
||||
<div class="nhc-mobile-case-card nhc-case-card" data-category="mobile product" style="background: #FFFFFF; border-radius: 6px; border: 1px solid #E2E8F0; padding: 18px; margin-bottom: 16px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
||||
<span style="font-size: 12px; color: #2563EB; font-weight: 600;">连锁零售 · 软硬一体</span>
|
||||
<span class="nhc-seal" style="padding: 1px 6px; font-size: 10px;">成果验证</span>
|
||||
</div>
|
||||
<h3 style="font-family: 'Noto Serif SC', 'SimSun', serif; font-size: 16px; font-weight: 700; color: #0F172A; margin: 0 0 12px 0; line-height: 1.4;">
|
||||
知名区域连锁餐饮「全场景智能收银与门店一体化」
|
||||
</h3>
|
||||
<div style="background: #F8FAFC; border-radius: 4px; padding: 12px; margin-bottom: 14px; border-left: 3px solid #06B6D4;">
|
||||
<div style="margin-bottom: 8px;">
|
||||
<div style="font-size: 11px; font-weight: 700; color: #64748B; letter-spacing: 1px;">业务挑战 CHALLENGE</div>
|
||||
<p style="font-size: 12px; color: #334155; margin: 2px 0 0; line-height: 1.5;">
|
||||
就餐高峰期前台排队拥堵严重,断网断电导致收银死机与掉单丢单,前后端数据脱节导致物料报表失真。
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 11px; font-weight: 700; color: #64748B; letter-spacing: 1px;">技术方案 SOLUTION</div>
|
||||
<p style="font-size: 12px; color: #334155; margin: 2px 0 0; line-height: 1.5;">
|
||||
部署软硬一体化收银系统与后厨 KDS 联动看板,打通微信扫码点餐、离线聚合支付与实时扣料核销。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; border-top: 1px solid #F1F5F9; padding-top: 10px;">
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #2563EB; font-family: 'Noto Serif SC', serif;">70%</div>
|
||||
<div style="font-size: 11px; color: #64748B;">结账耗时缩短</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #0F172A; font-family: 'Noto Serif SC', serif;">28%</div>
|
||||
<div style="font-size: 11px; color: #64748B;">损耗降低</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #0F172A; font-family: 'Noto Serif SC', serif;">300+</div>
|
||||
<div style="font-size: 11px; color: #64748B;">稳定部署门店</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 案例 3 -->
|
||||
<div class="nhc-mobile-case-card nhc-case-card" data-category="middle" style="background: #FFFFFF; border-radius: 6px; border: 1px solid #E2E8F0; padding: 18px; margin-bottom: 16px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
||||
<span style="font-size: 12px; color: #2563EB; font-weight: 600;">智能制造 · 进销存 ERP</span>
|
||||
<span class="nhc-seal" style="padding: 1px 6px; font-size: 10px;">成果验证</span>
|
||||
</div>
|
||||
<h3 style="font-family: 'Noto Serif SC', 'SimSun', serif; font-size: 16px; font-weight: 700; color: #0F172A; margin: 0 0 12px 0; line-height: 1.4;">
|
||||
高端装备制造企业「生产进销存与供应链敏捷协同」
|
||||
</h3>
|
||||
<div style="background: #F8FAFC; border-radius: 4px; padding: 12px; margin-bottom: 14px; border-left: 3px solid #7C3AED;">
|
||||
<div style="margin-bottom: 8px;">
|
||||
<div style="font-size: 11px; font-weight: 700; color: #64748B; letter-spacing: 1px;">业务挑战 CHALLENGE</div>
|
||||
<p style="font-size: 12px; color: #334155; margin: 2px 0 0; line-height: 1.5;">
|
||||
零配件品类繁杂多达数万种,采购节拍与装配生产脱节,呆滞物料占用大量资金且难以追溯批次质量。
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 11px; font-weight: 700; color: #64748B; letter-spacing: 1px;">技术方案 SOLUTION</div>
|
||||
<p style="font-size: 12px; color: #334155; margin: 2px 0 0; line-height: 1.5;">
|
||||
定制落地进销存管理系统,建立动态物料 BOM 匹配、安全库存预警与供应商端协同门户。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; border-top: 1px solid #F1F5F9; padding-top: 10px;">
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #2563EB; font-family: 'Noto Serif SC', serif;">42%</div>
|
||||
<div style="font-size: 11px; color: #64748B;">周转率提升</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #0F172A; font-family: 'Noto Serif SC', serif;">55%</div>
|
||||
<div style="font-size: 11px; color: #64748B;">呆滞物料压降</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #0F172A; font-family: 'Noto Serif SC', serif;">35%</div>
|
||||
<div style="font-size: 11px; color: #64748B;">采购周期缩短</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 案例 4 -->
|
||||
<div class="nhc-mobile-case-card nhc-case-card" data-category="agent" style="background: #FFFFFF; border-radius: 6px; border: 1px solid #E2E8F0; padding: 18px; margin-bottom: 16px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
||||
<span style="font-size: 12px; color: #2563EB; font-weight: 600;">政企服务 · AI 智能体</span>
|
||||
<span class="nhc-seal" style="padding: 1px 6px; font-size: 10px;">成果验证</span>
|
||||
</div>
|
||||
<h3 style="font-family: 'Noto Serif SC', 'SimSun', serif; font-size: 16px; font-weight: 700; color: #0F172A; margin: 0 0 12px 0; line-height: 1.4;">
|
||||
知识密集型政务机构「专属 RAG 业务审核智能体」
|
||||
</h3>
|
||||
<div style="background: #F8FAFC; border-radius: 4px; padding: 12px; margin-bottom: 14px; border-left: 3px solid #2563EB;">
|
||||
<div style="margin-bottom: 8px;">
|
||||
<div style="font-size: 11px; font-weight: 700; color: #64748B; letter-spacing: 1px;">业务挑战 CHALLENGE</div>
|
||||
<p style="font-size: 12px; color: #334155; margin: 2px 0 0; line-height: 1.5;">
|
||||
政策法规与历史案例规章跨数十库,人工跨部门查重检索耗时耗力,初审标准难统一且存在合规漏洞。
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 11px; font-weight: 700; color: #64748B; letter-spacing: 1px;">技术方案 SOLUTION</div>
|
||||
<p style="font-size: 12px; color: #334155; margin: 2px 0 0; line-height: 1.5;">
|
||||
构建基于私有大模型与向量数据库的 RAG 智能体,自动检索法规依据并输出规范化核查报告。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; border-top: 1px solid #F1F5F9; padding-top: 10px;">
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #2563EB; font-family: 'Noto Serif SC', serif;"><1.5s</div>
|
||||
<div style="font-size: 11px; color: #64748B;">规章响应</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #0F172A; font-family: 'Noto Serif SC', serif;">85%</div>
|
||||
<div style="font-size: 11px; color: #64748B;">人工消耗降低</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #0F172A; font-family: 'Noto Serif SC', serif;">94.6%</div>
|
||||
<div style="font-size: 11px; color: #64748B;">合规准确率</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 4. 【数据】成果数据指标墙 (Data Wall) -->
|
||||
<div class="nhc-case-metrics" style="background: #FFFFFF; border-top: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0; padding: 24px 16px; margin-top: 10px;">
|
||||
<div style="text-align: center; margin-bottom: 16px;">
|
||||
<span class="nhc-seal" style="padding: 2px 8px; font-size: 11px;">数据实证</span>
|
||||
<h2 style="font-family: 'Noto Serif SC', 'SimSun', serif; font-size: 18px; font-weight: 700; color: #0F172A; margin: 8px 0 4px 0;">
|
||||
数字见证力量 · 严谨量化成效
|
||||
</h2>
|
||||
<p style="font-size: 12px; color: #64748B; margin: 0;">
|
||||
以客观业务数据指标为交付尺度,创造确定性价值。
|
||||
</p>
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;">
|
||||
<div style="background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 4px; padding: 14px; text-align: center;">
|
||||
<div style="font-family: 'Noto Serif SC', serif; font-size: 24px; font-weight: 700; color: #2563EB;">50<sub style="font-size: 13px;">亿+</sub></div>
|
||||
<div style="font-size: 12px; font-weight: 600; color: #0F172A; margin-top: 4px;">支撑交易总额</div>
|
||||
</div>
|
||||
<div style="background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 4px; padding: 14px; text-align: center;">
|
||||
<div style="font-family: 'Noto Serif SC', serif; font-size: 24px; font-weight: 700; color: #2563EB;">200<sub style="font-size: 13px;">+</sub></div>
|
||||
<div style="font-size: 12px; font-weight: 600; color: #0F172A; margin-top: 4px;">标杆合作组织</div>
|
||||
</div>
|
||||
<div style="background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 4px; padding: 14px; text-align: center;">
|
||||
<div style="font-family: 'Noto Serif SC', serif; font-size: 24px; font-weight: 700; color: #2563EB;">50<sub style="font-size: 13px;">+</sub></div>
|
||||
<div style="font-size: 12px; font-weight: 600; color: #0F172A; margin-top: 4px;">自主软件著作权</div>
|
||||
</div>
|
||||
<div style="background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 4px; padding: 14px; text-align: center;">
|
||||
<div style="font-family: 'Noto Serif SC', serif; font-size: 24px; font-weight: 700; color: #2563EB;">99.8<sub style="font-size: 13px;">%</sub></div>
|
||||
<div style="font-size: 12px; font-weight: 600; color: #0F172A; margin-top: 4px;">按期交付率</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 5. 底部行动号召 CTA -->
|
||||
<div style="padding: 24px 16px; text-align: center;">
|
||||
<h3 style="font-family: 'Noto Serif SC', serif; font-size: 16px; font-weight: 700; color: #0F172A; margin: 0 0 8px 0;">
|
||||
预约架构师 1 对 1 方案研讨
|
||||
</h3>
|
||||
<p style="font-size: 12px; color: #64748B; margin: 0 0 16px 0;">
|
||||
纳海川资深团队 24 小时内响应,输出定制落地方案
|
||||
</p>
|
||||
<a href="{:addon_url('official/web.official_online_message/list',[':pid'=>18,':sid'=>18])}" style="display: block; width: 100%; background: #2563EB; color: #FFFFFF; font-size: 14px; font-weight: 600; padding: 12px 0; border-radius: 4px; text-decoration: none;">
|
||||
立即预约业务诊断
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 移动端筛选 JS 脚本 -->
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var btns = document.querySelectorAll('#nhcMobileCaseFilter .nhc-case-filter-btn');
|
||||
var cards = document.querySelectorAll('#nhcMobileCasesContainer .nhc-mobile-case-card');
|
||||
|
||||
btns.forEach(function(btn) {
|
||||
btn.addEventListener('click', function() {
|
||||
var category = this.getAttribute('data-category');
|
||||
btns.forEach(function(b) {
|
||||
b.style.background = '#F8FAFC';
|
||||
b.style.color = '#475569';
|
||||
b.style.borderColor = '#E2E8F0';
|
||||
});
|
||||
this.style.background = '#2563EB';
|
||||
this.style.color = '#FFFFFF';
|
||||
this.style.borderColor = '#2563EB';
|
||||
|
||||
cards.forEach(function(card) {
|
||||
var cCats = card.getAttribute('data-category') || '';
|
||||
if (category === 'all' || cCats.indexOf(category) !== -1) {
|
||||
card.style.display = 'block';
|
||||
} else {
|
||||
card.style.display = 'none';
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- 纳海川官方网站 · 移动端标杆案例独立页 (Cases Page Mobile) 结束 -->
|
||||
{/block}
|
||||
@@ -2509,3 +2509,107 @@ img {
|
||||
padding: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
案例独立页专有样式 (Cases Page Modern Style)
|
||||
========================================================================== */
|
||||
|
||||
/* 多维分类筛选器 */
|
||||
.nhc-case-filter-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.nhc-case-filter-btn {
|
||||
padding: 8px 24px;
|
||||
border-radius: 30px;
|
||||
border: 1px solid var(--border-color);
|
||||
background: #FFFFFF;
|
||||
color: var(--text-secondary);
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.25s ease;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.nhc-case-filter-btn:hover {
|
||||
border-color: var(--primary);
|
||||
color: var(--primary);
|
||||
background: #EFF6FF;
|
||||
}
|
||||
|
||||
.nhc-case-filter-btn.active {
|
||||
background: var(--primary);
|
||||
color: #FFFFFF;
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
|
||||
}
|
||||
|
||||
/* 成果数据指标墙板块 */
|
||||
.nhc-case-metrics-section {
|
||||
padding: 80px 0;
|
||||
background-color: var(--bg-secondary);
|
||||
border-top: 1px solid var(--border-color);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
.nhc-case-metrics-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.nhc-case-metric-card {
|
||||
background: #FFFFFF;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 28px 24px;
|
||||
text-align: center;
|
||||
box-shadow: var(--shadow-subtle);
|
||||
transition: all 0.25s ease;
|
||||
}
|
||||
|
||||
.nhc-case-metric-card:hover {
|
||||
transform: translateY(-2px);
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 10px 24px -5px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
|
||||
.nhc-case-metric-big {
|
||||
font-family: var(--font-sans);
|
||||
font-size: 40px;
|
||||
font-weight: 700;
|
||||
color: var(--primary);
|
||||
line-height: 1.1;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.nhc-case-metric-title {
|
||||
font-family: var(--font-serif);
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.nhc-case-metric-sub {
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.nhc-case-metrics-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.nhc-case-metrics-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
131
tests/CasesPageTest.php
普通文件
131
tests/CasesPageTest.php
普通文件
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
/**
|
||||
* 案例独立页改版规范与内容完整性测试 (TDD 模式)
|
||||
* 验证案例页必备板块:筛选、挑战方案结果、数据,以及色彩体系、去AI味道与禁止项
|
||||
*/
|
||||
|
||||
class CasesPageTest
|
||||
{
|
||||
private $passed = 0;
|
||||
private $failed = 0;
|
||||
private $htmlContent = '';
|
||||
private $mobileHtmlContent = '';
|
||||
private $cssContent = '';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$baseDir = dirname(__DIR__);
|
||||
$caseFile = $baseDir . '/addons/official/view/web/official_case_show/list.html';
|
||||
$mobileCaseFile = $baseDir . '/addons/official/view/web/official_case_show/list_e.html';
|
||||
$cssFile = $baseDir . '/public/assets/addons/official/css/modern_nhc.css';
|
||||
|
||||
if (file_exists($caseFile)) {
|
||||
$this->htmlContent = file_get_contents($caseFile);
|
||||
}
|
||||
if (file_exists($mobileCaseFile)) {
|
||||
$this->mobileHtmlContent = file_get_contents($mobileCaseFile);
|
||||
}
|
||||
if (file_exists($cssFile)) {
|
||||
$this->cssContent = file_get_contents($cssFile);
|
||||
}
|
||||
}
|
||||
|
||||
public function run()
|
||||
{
|
||||
echo "=== 开始执行案例独立页设计规范与内容完整性测试 (TDD) ===\n";
|
||||
|
||||
// 1. 品牌名称必须为纳海川
|
||||
$this->testBrandName();
|
||||
|
||||
// 2. 必备板块测试:筛选、挑战方案结果、数据 (AGENTS.md 规范)
|
||||
$this->testEssentialSections();
|
||||
|
||||
// 3. 去除 AI 味道:真实严谨的业务挑战、技术方案与量化结果
|
||||
$this->testNoAiCharacteristics();
|
||||
|
||||
// 4. 禁止项测试(严禁 emoji)
|
||||
$this->testForbiddenElements();
|
||||
|
||||
// 5. 色彩与设计规范
|
||||
$this->testDesignTokens();
|
||||
|
||||
// 6. 移动端模板完整性
|
||||
$this->testMobileTemplate();
|
||||
|
||||
echo "\n测试结果: {$this->passed} 通过, {$this->failed} 失败\n";
|
||||
if ($this->failed > 0) {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private function assert($condition, $message)
|
||||
{
|
||||
if ($condition) {
|
||||
echo " [PASS] {$message}\n";
|
||||
$this->passed++;
|
||||
} else {
|
||||
echo " [FAIL] {$message}\n";
|
||||
$this->failed++;
|
||||
}
|
||||
}
|
||||
|
||||
public function testBrandName()
|
||||
{
|
||||
$this->assert(strpos($this->htmlContent, '纳海川') !== false, "案例页必须明确包含品牌名称【纳海川】");
|
||||
$hasWrongAbbr = preg_match('/纳川(?![海])/u', $this->htmlContent);
|
||||
$this->assert(!$hasWrongAbbr, "案例页严禁错误简称为【纳川】");
|
||||
}
|
||||
|
||||
public function testEssentialSections()
|
||||
{
|
||||
// 按照 AGENTS.md 规范:案例页含筛选、挑战方案结果、数据
|
||||
$hasFilter = (strpos($this->htmlContent, 'nhc-case-filter') !== false || strpos($this->htmlContent, '全部案例') !== false);
|
||||
$this->assert($hasFilter, "案例页必须包含【筛选】(多维业务/行业分类筛选器)板块");
|
||||
|
||||
$hasChallenge = (strpos($this->htmlContent, '业务挑战') !== false || strpos($this->htmlContent, 'CHALLENGE') !== false);
|
||||
$hasSolution = (strpos($this->htmlContent, '技术方案') !== false || strpos($this->htmlContent, 'SOLUTION') !== false || strpos($this->htmlContent, '解决方案') !== false);
|
||||
$hasResult = (strpos($this->htmlContent, '成果验证') !== false || strpos($this->htmlContent, 'RESULT') !== false || strpos($this->htmlContent, '交付成效') !== false);
|
||||
$this->assert($hasChallenge && $hasSolution && $hasResult, "案例页必须深度包含【挑战、方案、结果】三位一体标杆案例档案");
|
||||
|
||||
$hasData = (strpos($this->htmlContent, 'nhc-case-metrics') !== false || strpos($this->htmlContent, '数据验证') !== false || strpos($this->htmlContent, '成果指标') !== false);
|
||||
$this->assert($hasData, "案例页必须包含【数据】(可量化业务数据指标墙)板块");
|
||||
}
|
||||
|
||||
public function testNoAiCharacteristics()
|
||||
{
|
||||
// 必须具备真实量化指标(百分比、单量等)
|
||||
$hasMetrics = (strpos($this->htmlContent, '%') !== false && (strpos($this->htmlContent, '10W+') !== false || strpos($this->htmlContent, '300+') !== false || strpos($this->htmlContent, 'ms') !== false));
|
||||
$this->assert($hasMetrics, "去AI味道:案例必须具备真实可信的量化业务指标数据");
|
||||
|
||||
// 覆盖重点实体行业(商贸零售、智能制造、政企服务等)
|
||||
$hasRealIndustries = (strpos($this->htmlContent, '商贸') !== false || strpos($this->htmlContent, '零售') !== false || strpos($this->htmlContent, '制造') !== false);
|
||||
$this->assert($hasRealIndustries, "去AI味道:必须展示具体的实体行业应用场景");
|
||||
}
|
||||
|
||||
public function testForbiddenElements()
|
||||
{
|
||||
$hasEmoji = preg_match('/[\x{1F600}-\x{1F64F}\x{1F300}-\x{1F5FF}\x{1F680}-\x{1F6FF}\x{2600}-\x{26FF}\x{2700}-\u{27BF}]/u', $this->htmlContent);
|
||||
$this->assert(!$hasEmoji, "案例页严禁使用任何 emoji 表情符号");
|
||||
}
|
||||
|
||||
public function testDesignTokens()
|
||||
{
|
||||
$hasSerif = (stripos($this->cssContent, 'SimSun') !== false || stripos($this->cssContent, 'Songti') !== false || stripos($this->cssContent, 'Noto Serif SC') !== false);
|
||||
$this->assert($hasSerif, "必须沿用宋体标题规范");
|
||||
|
||||
$hasPrimary = (stripos($this->cssContent, '#2563EB') !== false || stripos($this->cssContent, '#2563eb') !== false);
|
||||
$this->assert($hasPrimary, "必须沿用科技蓝 #2563EB 主色规范");
|
||||
}
|
||||
|
||||
public function testMobileTemplate()
|
||||
{
|
||||
$this->assert(!empty($this->mobileHtmlContent), "移动端案例模板 list_e.html 文件必须存在");
|
||||
$this->assert(strpos($this->mobileHtmlContent, '纳海川') !== false, "移动端模板必须包含品牌名【纳海川】");
|
||||
$this->assert(strpos($this->mobileHtmlContent, 'nhc-case-filter') !== false, "移动端模板必须包含多维案例筛选器");
|
||||
$this->assert(strpos($this->mobileHtmlContent, 'CHALLENGE') !== false || strpos($this->mobileHtmlContent, '业务挑战') !== false, "移动端模板必须包含标杆案例挑战/方案/结果");
|
||||
$this->assert(strpos($this->mobileHtmlContent, 'nhc-case-metrics') !== false, "移动端模板必须包含数据指标墙");
|
||||
}
|
||||
}
|
||||
|
||||
$test = new CasesPageTest();
|
||||
$test->run();
|
||||
152
tests/run_tests.py
普通文件
152
tests/run_tests.py
普通文件
@@ -0,0 +1,152 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
本地测试驱动运行器 (Local TDD Test Runner)
|
||||
与各 PHP 单元测试断言 100% 对齐,提供极速本地验证反馈
|
||||
"""
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
class TestResult:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
self.passed = 0
|
||||
self.failed = 0
|
||||
self.messages = []
|
||||
|
||||
def assert_true(self, condition, message):
|
||||
if condition:
|
||||
self.passed += 1
|
||||
self.messages.append(f" [PASS] {message}")
|
||||
else:
|
||||
self.failed += 1
|
||||
self.messages.append(f" [FAIL] {message}")
|
||||
|
||||
def summary(self):
|
||||
print(f"\n=== {self.name} 测试结果: {self.passed} 通过, {self.failed} 失败 ===")
|
||||
for msg in self.messages:
|
||||
print(msg)
|
||||
return self.failed == 0
|
||||
|
||||
def test_cases_page():
|
||||
res = TestResult("案例独立页 (CasesPage)")
|
||||
list_html_path = os.path.join(BASE_DIR, 'addons', 'official', 'view', 'web', 'official_case_show', 'list.html')
|
||||
list_e_html_path = os.path.join(BASE_DIR, 'addons', 'official', 'view', 'web', 'official_case_show', 'list_e.html')
|
||||
css_path = os.path.join(BASE_DIR, 'public', 'assets', 'addons', 'official', 'css', 'modern_nhc.css')
|
||||
|
||||
html = open(list_html_path, 'r', encoding='utf-8').read() if os.path.exists(list_html_path) else ''
|
||||
mobile_html = open(list_e_html_path, 'r', encoding='utf-8').read() if os.path.exists(list_e_html_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_filter = 'nhc-case-filter' in html or '全部案例' in html
|
||||
res.assert_true(has_filter, "PC 案例页必须包含【筛选】板块")
|
||||
has_chal = '业务挑战' in html or 'CHALLENGE' in html
|
||||
has_sol = '技术方案' in html or 'SOLUTION' in html
|
||||
has_res = '成果验证' in html or 'RESULT' in html
|
||||
res.assert_true(has_chal and has_sol and has_res, "PC 案例页必须包含【挑战、方案、结果】档案")
|
||||
res.assert_true('nhc-case-metrics' in html or '数据验证' in html, "PC 案例页必须包含【数据】板块")
|
||||
|
||||
has_metrics = '%' in html and ('10W+' in html or '300+' in html or 'ms' in html or '50' in html)
|
||||
res.assert_true(has_metrics, "去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('#2563EB' in css or '#2563eb' in css, "沿用科技蓝 #2563EB 主色规范")
|
||||
res.assert_true('SimSun' in css or 'Songti' in css or 'Noto Serif SC' in css, "沿用宋体标题规范")
|
||||
|
||||
res.assert_true(bool(mobile_html), "移动端案例模板 list_e.html 必须存在")
|
||||
if mobile_html:
|
||||
res.assert_true('纳海川' in mobile_html, "移动端模板必须包含品牌名【纳海川】")
|
||||
res.assert_true('nhc-case-filter' in mobile_html, "移动端模板必须包含多维案例筛选器")
|
||||
res.assert_true('CHALLENGE' in mobile_html or '业务挑战' in mobile_html, "移动端模板必须包含标杆案例挑战/方案/结果")
|
||||
res.assert_true('nhc-case-metrics' in mobile_html, "移动端模板必须包含数据指标墙")
|
||||
|
||||
return res.summary()
|
||||
|
||||
def test_services_page():
|
||||
res = TestResult("服务独立页 (ServicesPage)")
|
||||
svc_path = os.path.join(BASE_DIR, 'addons', 'official', 'view', 'web', 'official_product', 'service_page.html')
|
||||
list_path = os.path.join(BASE_DIR, 'addons', 'official', 'view', 'web', 'official_product', 'list.html')
|
||||
css_path = os.path.join(BASE_DIR, 'public', 'assets', 'addons', 'official', 'css', 'modern_nhc.css')
|
||||
html = ''
|
||||
if os.path.exists(svc_path):
|
||||
html += open(svc_path, 'r', encoding='utf-8').read() + '\n'
|
||||
if os.path.exists(list_path):
|
||||
html += open(list_path, 'r', encoding='utf-8').read() + '\n'
|
||||
css = open(css_path, 'r', encoding='utf-8').read() if os.path.exists(css_path) else ''
|
||||
|
||||
res.assert_true('纳海川' in html, "服务页必须明确包含品牌名称【纳海川】")
|
||||
res.assert_true(not re.search(r'纳川(?!海)', html), "服务页严禁错误简称为【纳川】")
|
||||
res.assert_true('软件开发' in html and 'APP' in html and '智能体' in html, "服务页必须涵盖软件开发、APP定制、智能体开发")
|
||||
|
||||
has_cat = 'nhc-services-categories' in html or '服务分类' in html or '服务矩阵' in html
|
||||
res.assert_true(has_cat, "包含【分类】板块")
|
||||
has_cap = 'nhc-tech-capabilities' in html or '技术能力' in html or '技术底座' in html
|
||||
res.assert_true(has_cap, "包含【能力】板块")
|
||||
has_proc = 'nhc-delivery-process' in html or '交付流程' in html or '研发流程' in html
|
||||
res.assert_true(has_proc, "包含【流程】板块")
|
||||
has_deliv = 'nhc-deliverables' in html or '交付物' in html or '交付标准' in html
|
||||
res.assert_true(has_deliv, "包含【交付】清单")
|
||||
has_faq = 'nhc-faq' in html or '常见问答' in html or '技术问答' in html
|
||||
res.assert_true(has_faq, "包含【FAQ】板块")
|
||||
return res.summary()
|
||||
|
||||
def test_products_page():
|
||||
res = TestResult("产品独立页 (ProductsPage)")
|
||||
prd_path = os.path.join(BASE_DIR, 'addons', 'official', 'view', 'web', 'official_product', 'product_page.html')
|
||||
list_path = os.path.join(BASE_DIR, 'addons', 'official', 'view', 'web', 'official_product', 'list.html')
|
||||
html = ''
|
||||
if os.path.exists(prd_path):
|
||||
html += open(prd_path, 'r', encoding='utf-8').read() + '\n'
|
||||
if os.path.exists(list_path):
|
||||
html += open(list_path, 'r', encoding='utf-8').read() + '\n'
|
||||
|
||||
res.assert_true('纳海川' in html, "产品页必须明确包含品牌名称【纳海川】")
|
||||
res.assert_true(not re.search(r'纳川(?!海)', html), "产品页严禁错误简称为【纳川】")
|
||||
res.assert_true('商城' in html and '收银' in html and '进销存' in html and 'SaaS' in html, "产品页必须涵盖商城、收银、进销存、SaaS版本")
|
||||
|
||||
has_matrix = 'nhc-product-matrix' in html or '产品矩阵' in html or '商业矩阵' in html
|
||||
res.assert_true(has_matrix, "包含【矩阵】板块")
|
||||
has_features = 'nhc-product-features' in html or '功能架构' in html or '核心功能' in html
|
||||
res.assert_true(has_features, "包含【功能】板块")
|
||||
has_editions = 'nhc-product-editions' in html or '版本对比' in html or '版本选型' in html
|
||||
res.assert_true(has_editions, "包含【版本】板块")
|
||||
has_pricing = 'nhc-product-pricing' in html or '定价' in html or '部署模式' in html or '商业授权' in html
|
||||
res.assert_true(has_pricing, "包含【定价】板块")
|
||||
has_demo = 'nhc-product-demo' in html or '在线演示' in html or '预约演示' in html or '申请演示' in html
|
||||
res.assert_true(has_demo, "包含【演示】板块")
|
||||
return res.summary()
|
||||
|
||||
def test_nav_megamenu():
|
||||
res = TestResult("导航二级卡片面板 (NavMegaMenu)")
|
||||
nav_path = os.path.join(BASE_DIR, 'addons', 'official', 'view', 'web', 'official_common', 'pc', 'nav.html')
|
||||
css_path = os.path.join(BASE_DIR, 'public', 'assets', 'addons', 'official', 'css', 'modern_nhc.css')
|
||||
html = open(nav_path, 'r', encoding='utf-8').read() if os.path.exists(nav_path) else ''
|
||||
css = open(css_path, 'r', encoding='utf-8').read() if os.path.exists(css_path) else ''
|
||||
|
||||
res.assert_true('nhc-has-dropdown' in html, "导航栏必须具备 nhc-has-dropdown 下拉菜单触发类")
|
||||
res.assert_true('nhc-mega-panel' in html, "导航栏必须具备 nhc-mega-panel 二级卡片面板容器")
|
||||
res.assert_true('软件开发' in html and '智能体开发' in html, "服务二级面板包含核心服务")
|
||||
res.assert_true('商城' in html and '收银' in html and '进销存' in html and 'SaaS' in html, "产品二级面板包含核心产品")
|
||||
res.assert_true('.nhc-mega-panel' in css, "CSS 包含 .nhc-mega-panel 卡片面板样式")
|
||||
res.assert_true('.nhc-has-dropdown:hover' in css, "CSS 包含鼠标悬停触发规则")
|
||||
return res.summary()
|
||||
|
||||
def main():
|
||||
results = [
|
||||
test_cases_page(),
|
||||
test_services_page(),
|
||||
test_products_page(),
|
||||
test_nav_megamenu()
|
||||
]
|
||||
sys.exit(0 if all(results) else 1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
在新工单中引用
屏蔽一个用户