Browse Source

refactor(about): 将静态内容替换为动态数据渲染

- 使用模板变量 {$current_cate.title} 替换硬编码的导航标题
- 使用模板变量 {$current_cate.content|raw} 替换静态的页面主标题
- 使用模板变量 {$current_cate.description} 动态渲染视频源地址
- 集成 hcTaglib:category 标签动态获取公司介绍内容
- 使用模板变量 {$vo.title} 和 {:nl2br($vo.description)} 渲染公司简介
- 添加 PHP 逻辑解析统计数据显示结构化数据
- 使用 volist 循环动态渲染统计数据列表
- 集成 hcTaglib:category 标签获取发展历程背景图片
- 使用 content 标签循环渲染历史事件时间轴内容
- 移除所有硬编码的静态文本和图片路径配置
master
zhangf@suq.cn 2 weeks ago
parent
commit
2ff679c8fd
  1. 158
      public/themes/website/1/zh/demo/about.html

158
public/themes/website/1/zh/demo/about.html

@ -54,55 +54,51 @@
<!-- header -->
{include file="components/header"}
<main class="main-about" data-nav="关于睿能">
<main class="main-about" data-nav="{$current_cate.title}">
<section class="ab-hero">
<div class="ab-hero__title section__wrap" data-header-dark>
<h1>
<span>国内领先的工业自动化</span>
<span>控制产品及解决方案供应商</span>
<span>{$current_cate.content|raw}</span>
</h1>
</div>
<div class="ab-hero__media" aria-hidden="true">
<video src="/themes/dist_static/static/assets/about-1hlZrO-H.mp4" muted autoplay loop playsinline width="1920" height="720"></video>
<video src="{$current_cate.description}" muted autoplay loop playsinline width="1920" height="720"></video>
</div>
</section>
{hcTaglib:category id="372" item="vo" field="*"}
<section class="ab-intro section__wrap" id="intro" data-header-dark>
<h2 class="ab-intro__title">公司简介</h2>
<h2 class="ab-intro__title">{$vo.title}</h2>
<div class="ab-intro__body">
<div class="ab-intro__texts">
<p>睿能科技成立于2007年,2017年在上海证券交易所主板上市(股票代码:603933),是专业从事工业自动化产品研发、生产、销售和服务的高科技企业。</p>
<p>
公司总部位于福州,旗下拥有20多个子公司,在上海、武汉、福州、嘉兴设立研发中心,是“国家火炬计划重点高新技术企业”、“福建省企业技术中心”、“中国纺织机械行业电脑横机智能控制系统产品研发中心”、“福建省纺织设备智能控制企业工程技术研究中心”等。公司坚持以科技创新驱动技术和产品的发展,通过多年的沉淀,形成了一批具有国内领先水平的核心技术和专利技术。
</p>
<p>
睿能科技以“用卓越自动化共创美好未来”为使命愿景,践行“客户第一、真诚协作、结果导向、追求卓越”的核心价值观,通过持续技术创新与场景化解决方案的开发,致力成为世界一流的工业自动化产品和解决方案供应商,为客户提供高适配性行业解决方案,实现客户与企业价值共赢,持续赋能全球智能制造升级。
</p>
</div>
<p>{:nl2br($vo.description)}</p>
</div>
{php}
$stats_raw = explode(',', $vo['desc']);
$stats_list = [];
foreach ($stats_raw as $item) {
$parts = explode(';', $item);
if (count($parts) === 3) {
$stats_list[] = ['num' => $parts[0], 'unit' => $parts[1], 'text' => $parts[2]];
}
}
{/php}
<ul class="ab-intro__stats">
{volist name="stats_list" id="stat"}
<li>
<strong><span class="counter">20</span><span class="ab-intro__stats-unit"></span></strong>
<span>专注通用工业自动化领域</span>
</li>
<li>
<strong><span class="counter">1500</span><span class="ab-intro__stats-unit">+</span></strong>
<span>专业的技术团队</span>
</li>
<li>
<strong><span class="counter">20</span><span class="ab-intro__stats-unit">+</span></strong>
<span>子公司</span>
</li>
<li>
<strong><span class="counter">6</span><span class="ab-intro__stats-unit"></span></strong>
<span>研发中心</span>
<strong><span class="counter">{$stat.num}</span><span class="ab-intro__stats-unit">{$stat.unit}</span></strong>
<span>{$stat.text}</span>
</li>
{/volist}
</ul>
</div>
</section>
{/hcTaglib:category}
<section class="ab-history" id="history" data-header-dark>
{hcTaglib:category id="373" item="vo" field="*"}
<section class="ab-history" id="history" data-header-dark style="background-image: url({$vo.thumbnail.url ?? ''})">
<div class="ab-history__head section__wrap">
<h2 class="ab-history__title">发展历程</h2>
<h2 class="ab-history__title">{$vo.title}</h2>
<div class="s-arrows">
<button type="button" class="s-arrows__prev" aria-label="上一项">
<svg viewBox="0 0 12.2529 11.314" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.252930" height="11.313965" fill="none" customFrame="#000000">
@ -120,106 +116,17 @@
</div>
<div class="ab-history__swiper swiper section__wrap">
<div class="swiper-wrapper">
{hcTaglib:content cid="$vo.id" moduleId="1" name="contentList" item="case_top" limit="10" mainField="id,title,sub_title,content,thumbnail" sort="sort desc" subField="" onlyData="2"}
<article class="swiper-slide ab-history__slide">
<time class="ab-history__year" datetime="2025">2025<span></span></time>
<div class="ab-history__dot" aria-hidden="true"></div>
<h3 class="ab-history__slide-title">嘉兴睿能智能制造基地投产运营</h3>
<p class="ab-history__slide-desc">英飞凌-贝能创新应用中心成立,聚焦人形机器人领域</p>
<div class="ab-history__media">
<img src="/themes/dist_static/static/images/section-3-img-1-D68SSw3D.png" alt="" width="400" height="260" loading="lazy" />
</div>
</article>
<article class="swiper-slide ab-history__slide">
<time class="ab-history__year" datetime="2024">2024<span></span></time>
<div class="ab-history__dot" aria-hidden="true"></div>
<h3 class="ab-history__slide-title">布局协作、人形机器人核心部件</h3>
<p class="ab-history__slide-desc">福州总部基地正式投产<br>设立柬埔寨办事处,加速东南亚市场拓展步伐</p>
<div class="ab-history__media">
<img src="/themes/dist_static/static/images/section-3-img-2-Ir9V6VmE.png" alt="" width="400" height="260" loading="lazy" />
</div>
</article>
<article class="swiper-slide ab-history__slide">
<time class="ab-history__year" datetime="2021">2021<span></span></time>
<div class="ab-history__dot" aria-hidden="true"></div>
<h3 class="ab-history__slide-title">收购奇电电气与深圳亿维</h3>
<p class="ab-history__slide-desc">完善工业自动化产品矩阵,构建全产业链能力</p>
<div class="ab-history__media">
<img src="/themes/dist_static/static/images/section-3-img-3-BNWFzWuJ.png" alt="" width="400" height="260" loading="lazy" />
</div>
</article>
<article class="swiper-slide ab-history__slide">
<time class="ab-history__year" datetime="2018">2018<span></span></time>
<div class="ab-history__dot" aria-hidden="true"></div>
<h3 class="ab-history__slide-title">成立上海睿能高齐、江苏睿能</h3>
<p class="ab-history__slide-desc">启动高性能伺服系统自主研发,正式布局通用自动化赛道</p>
<div class="ab-history__media">
<img src="/themes/dist_static/static/images/section-3-img-4-qZvhoI_Q.png" alt="" width="400" height="260" loading="lazy" />
</div>
</article>
<article class="swiper-slide ab-history__slide">
<time class="ab-history__year" datetime="2017">2017<span></span></time>
<div class="ab-history__dot" aria-hidden="true"></div>
<h3 class="ab-history__slide-title">A股主板上市</h3>
<p class="ab-history__slide-desc">股票代码603933</p>
<div class="ab-history__media">
<img src="/themes/dist_static/static/images/section-3-img-5-DSzvcDOG.png" alt="" width="400" height="260" loading="lazy" />
</div>
</article>
<article class="swiper-slide ab-history__slide">
<time class="ab-history__year" datetime="2016">2016<span></span></time>
<div class="ab-history__dot" aria-hidden="true"></div>
<h3 class="ab-history__slide-title">获评国家级"电脑横机智能控制系统产品研发中心"</h3>
<p class="ab-history__slide-desc"></p>
<div class="ab-history__media">
<img src="/themes/dist_static/static/images/section-3-img-6-BhmmrKXg.png" alt="" width="400" height="260" loading="lazy" />
</div>
</article>
<article class="swiper-slide ab-history__slide">
<time class="ab-history__year" datetime="2013">2013<span></span></time>
<div class="ab-history__dot" aria-hidden="true"></div>
<h3 class="ab-history__slide-title">自主研发《纺织机械专用伺服控制系统V2.0》,获国家重点新产品奖</h3>
<p class="ab-history__slide-desc"></p>
<div class="ab-history__media">
<img src="/themes/dist_static/static/images/section-3-img-7-01tA_lnb.png" alt="" width="400" height="260" loading="lazy" />
</div>
</article>
<article class="swiper-slide ab-history__slide">
<time class="ab-history__year" datetime="2012">2012<span></span></time>
<time class="ab-history__year" datetime="2025">{$case_top.sub_title}<span></span></time>
<div class="ab-history__dot" aria-hidden="true"></div>
<h3 class="ab-history__slide-title">战略并购贝能国际</h3>
<p class="ab-history__slide-desc">构建"纺织电控+半导体分销"双轮驱动模式,强化产业链整合能力</p>
<div class="ab-history__media">
<img src="/themes/dist_static/static/images/section-3-img-8-BrNjBTX2.png" alt="" width="400" height="260" loading="lazy" />
</div>
</article>
<article class="swiper-slide ab-history__slide">
<time class="ab-history__year" datetime="2011">2011<span></span></time>
<div class="ab-history__dot" aria-hidden="true"></div>
<h3 class="ab-history__slide-title">推出"单系统全电脑横机控制系统"</h3>
<p class="ab-history__slide-desc"></p>
<div class="ab-history__media">
<img src="/themes/dist_static/static/images/section-3-img-9-CfRXM-o0.png" alt="" width="400" height="260" loading="lazy" />
</div>
</article>
<article class="swiper-slide ab-history__slide">
<time class="ab-history__year" datetime="2009">2009<span></span></time>
<div class="ab-history__dot" aria-hidden="true"></div>
<h3 class="ab-history__slide-title">获"高新技术企业"认证</h3>
<p class="ab-history__slide-desc"></p>
<div class="ab-history__media">
<img src="/themes/dist_static/static/images/section-3-img-10-BEDBg0hy.png" alt="" width="400" height="260" loading="lazy" />
</div>
</article>
<article class="swiper-slide ab-history__slide">
<time class="ab-history__year" datetime="2007">2007<span></span></time>
<div class="ab-history__dot" aria-hidden="true"></div>
<h3 class="ab-history__slide-title">公司成立</h3>
<p class="ab-history__slide-desc"></p>
<h3 class="ab-history__slide-title">{$case_top.title}</h3>
<p class="ab-history__slide-desc">{$case_top.content|strip_tags}</p>
<div class="ab-history__media">
<img src="/themes/dist_static/static/images/section-3-img-11-Cv2PzDNu.png" alt="" width="400" height="260" loading="lazy" />
<img src="{$case_top.thumbnail.url ?? ''}" alt="" width="400" height="260" loading="lazy" />
</div>
</article>
{/hcTaglib:content}
</div>
</div>
<div class="ab-history__arrows-mobile">
@ -239,6 +146,7 @@
</div>
</div>
</section>
{/hcTaglib:category}
<section class="ab-culture" id="culture">
<div class="ab-culture__bg" aria-hidden="true">

Loading…
Cancel
Save