睿能科技
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

217 lines
9.9 KiB

<!doctype html>
<html lang="zh-CN">
{php} // TDK设置 ================================= START
$tdk_title = $hc_content['seo_title'] ?? '';
if(empty($tdk_title)){
$tdk_title = $hc_content['title'] ?? '搜索结果';
}
$tdk_description = $hc_content['seo_description'] ?? '';
if(empty($tdk_description)){
$tdk_description = $hc_content['sub_title'] ?? '';
}
$tdk_keywords = $hc_content['seo_keywords'] ?? '';
if(empty($tdk_keywords)){
$tdk_keywords = $hc_content['sub_title'] ?? '';
}
$create_time_str = $hc_content['create_time'] ?? '';
$hc_content_tmp_news = $hc_content;
// dd($hc_content);
// dd($create_time_int);
// TDK设置 ================================= END {/php}
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{$tdk_title}</title>
<meta name="keywords" content="{$tdk_keywords}" />
<meta name="description" content="{$tdk_description}" />
<!-- 公共CSS 自动被打包进页面 -->
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<script>
// 设计稿 1920px 宽度下 1rem = 16Px;放在 head 里避免刷新时 rem 闪动
(function () {
var h = document.documentElement;
// 设计稿宽度
var DESIGN_WIDTH = 1920;
// 设计稿1rem = 16Px
var REM_AT_DESIGN = 16;
// 最小字体大小-限制, 同时注意所有的box的大小也有了最小限制
var MIN_ROOT_FONT_SIZE = 14;
function setRootFontSize() {
// 当前屏幕可视宽度(每次计算都取最新值)
var W = h.getBoundingClientRect().width;
var size = (W / DESIGN_WIDTH) * REM_AT_DESIGN;
if (size < MIN_ROOT_FONT_SIZE) size = MIN_ROOT_FONT_SIZE;
h.style.fontSize = size + "px";
}
setRootFontSize();
var resizeRaf = 0;
window.addEventListener("resize", function () {
if (resizeRaf) return;
resizeRaf = requestAnimationFrame(function () {
resizeRaf = 0;
setRootFontSize();
});
});
})();
</script>
<link rel="stylesheet" href="https://unpkg.com/lenis@1.3.23/dist/lenis.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net.cn/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" />
<link
href="https://cdn.jsdelivr.net.cn/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aos@2.3.4/dist/aos.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" />
<script type="module" crossorigin src="/themes/dist_static/static/js/news-detail.js"></script>
<link rel="modulepreload" crossorigin href="/themes/dist_static/static/js/common.js" />
<link rel="modulepreload" crossorigin href="/themes/dist_static/static/js/news2.js" />
<link rel="stylesheet" crossorigin href="/themes/dist_static/static/css/common.css" />
<link rel="stylesheet" crossorigin href="/themes/dist_static/static/css/news-detail.css" />
</head>
<body>
<!-- 引入公共头部 -->
<!-- header -->
{include file="components/header"}
<main class="main-news-detail" data-header-dark data-nav="新闻动态">
<div class="nd-page">
<div class="nd-layout">
<nav class="nd-breadcrumb" aria-label="面包屑">
<a class="nd-breadcrumb__link" href="{:getMuiLangUrl('/')}">首页</a>
<span class="nd-breadcrumb__sep" aria-hidden="true">
<svg viewBox="-1 -1 8.59082 13.0605" xmlns="http://www.w3.org/2000/svg" fill="none">
<path d="M0 4.12464e-05L5 5.00004L10 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" transform="matrix(0,-1,1,0,0.530273,10.5303)" />
</svg>
</span>
<!-- 获取父级分类 -->
{php}
$parent_cate_url = '';
{/php}
{hcTaglib:category id="$current_cate['parent_id']" item="vo" field="*"}
<a class="nd-breadcrumb__link" href="{$vo.alias}">{$vo.title}</a>
{php}
$parent_cate_url = $vo['alias'];
{/php}
{/hcTaglib:category}
{if $current_cate['id'] != uiId('news')}
<span class="nd-breadcrumb__sep" aria-hidden="true">
<svg viewBox="-1 -1 8.59082 13.0605" xmlns="http://www.w3.org/2000/svg" fill="none">
<path d="M0 4.12464e-05L5 5.00004L10 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" transform="matrix(0,-1,1,0,0.530273,10.5303)" />
</svg>
</span>
<span class="nd-breadcrumb__current">{$current_cate['title']}</span>
{/if}
</nav>
<a class="nd-back" href="{$parent_cate_url}">
<span class="nd-back__icon" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2014.0703%2011.3135'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='14.070312'%20height='11.313477'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M6.9994%201.41422L8.41362%200L12.656%204.2424L12.6561%204.2423L14.0703%205.65652L14.0702%205.65662L14.0705%205.65686L12.6563%207.07108L12.656%207.07082L8.41346%2011.3134L6.99924%209.89916L10.3126%206.5858L0%206.5858L0%204.5858L10.171%204.5858L6.9994%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="14"
height="11"
/>
</span>
<span class="nd-back__text">Back</span>
</a>
<article class="nd-article">
<header class="nd-article__header">
<h1 class="nd-article__title">{$hc_content_tmp_news['title']}</h1>
<time class="nd-article__date" datetime="{$create_time_str}">{:date('Y-m-d',strtotime($create_time_str)) ?? ''}</time>
</header>
<div class="nd-richtext">
{$hc_content_tmp_news['content']|raw}
</div>
<nav class="nd-pager" aria-label="上下篇">
{php}
// 与 HcTaglib::tagPreContent / tagNextContent 一致,只查相邻一篇
$id = (int)request()->param('id');
$cid = (int)request()->param('cid');
if ($cid <= 0) {
$cid = (int)($current_cate['id'] ?? ($hc_content['category_id'] ?? 0));
}
$sellerId = (int)($hc_content['seller_id'] ?? 1);
$siteId = (int)($current_cate['website_id'] ?? 1);
$lang = (string)($current_cate['lang'] ?? ($hc_content['lang'] ?? 'zh'));
$preContent = \app\service\ContentService::getPreContent([
'id' => $id,
'cid' => $cid,
'seller_id' => $sellerId,
'website_id' => $siteId,
'lang' => $lang,
]);
$nextContent = \app\service\ContentService::getNextContent([
'id' => $id,
'cid' => $cid,
'seller_id' => $sellerId,
'website_id' => $siteId,
'lang' => $lang,
]);
$preId = 0;
$preTitle = '';
$preCid = $cid;
if (!empty($preContent)) {
$preId = (int)$preContent['id'];
$preTitle = $preContent['title'];
}
$nextId = 0;
$nextTitle = '';
$nextCid = $cid;
if (!empty($nextContent)) {
$nextId = (int)$nextContent['id'];
$nextTitle = $nextContent['title'];
}
{/php}
{if condition="empty($preId)"}
<a class="nd-pager__item nd-pager__item--prev" href="javascript:;">
<span class="nd-pager__label" title="没有了">上一篇:没有了</span>
</a>
{else /}
<a class="nd-pager__item nd-pager__item--prev" href="{:hcUrl('Detail/index',['id'=>$preId,'cid'=>$preCid])}">
<span class="nd-pager__label" title="{$preTitle}">上一篇:{$preTitle}</span>
</a>
{/if}
{if condition="empty($nextId)"}
<a class="nd-pager__item nd-pager__item--next" href="javascript:;">
<span class="nd-pager__label" title="没有了">下一篇:没有了</span>
</a>
{else /}
<a class="nd-pager__item nd-pager__item--next" href="{:hcUrl('Detail/index',['id'=>$nextId,'cid'=>$nextCid])}">
<span class="nd-pager__label" title="{$nextTitle}">下一篇:{$nextTitle}</span>
</a>
{/if}
</nav>
</article>
</div>
</div>
</main>
{include file="components/mask"}
<!-- 模块:底部 -->
{include file="components/footer"}
<script src="https://unpkg.com/lenis@1.3.23/dist/lenis.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/ScrollTrigger.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
<script
src="https://cdn.jsdelivr.net.cn/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"
></script>
<script src="https://cdn.jsdelivr.net/npm/aos@2.3.4/dist/aos.min.js"></script>
<script src="https://unpkg.com/counterup2@2.0.2/dist/index.js"></script>
</body>
</html>