Browse Source

栏目category

master
xiaodong 3 weeks ago
parent
commit
7881669691
  1. 284
      public/themes/website/1/zh/demo/category.html

284
public/themes/website/1/zh/demo/category.html

@ -1,11 +1,11 @@
<!doctype html>
<html lang="zh-CN">
{php} {php}
var_dump($current_cate);
// var_dump($current_cate);
$current_cate_id = $current_cate['id'] ?? ''; $current_cate_id = $current_cate['id'] ?? '';
//exit(); //exit();
{/php} {/php}
<!doctype html>
<html lang="zh-CN">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -94,7 +94,7 @@ $current_cate_id = $current_cate['id'] ?? '';
$sub_cate_id = $vo['id']; // 获取子分类的ID $sub_cate_id = $vo['id']; // 获取子分类的ID
$need_show_sub_content = $vo['need_show_sub_content'] ?? 0; //是否需要展示此分类下的内容列表0=不展示,1=展示 $need_show_sub_content = $vo['need_show_sub_content'] ?? 0; //是否需要展示此分类下的内容列表0=不展示,1=展示
{/php} {/php}
<li class="c-sidebar__item is-active" data-category-item="product-control-{$key}">
<li class="c-sidebar__item {if $key==1}is-active{/if}" data-category-item="product-control-{$key}">
<button type="button" class="c-sidebar__trigger" data-category-id="product-control-{$key}" data-category-name="{$vo.title}" aria-expanded="true"> <button type="button" class="c-sidebar__trigger" data-category-id="product-control-{$key}" data-category-name="{$vo.title}" aria-expanded="true">
<span>{$vo.title}</span> <span>{$vo.title}</span>
@ -108,7 +108,7 @@ $current_cate_id = $current_cate['id'] ?? '';
<ul class="c-sidebar__subs"> <ul class="c-sidebar__subs">
{hcTaglib:subcategory pid="$sub_cate_id" item="vo_sub" sort="" key="key_sub"} {hcTaglib:subcategory pid="$sub_cate_id" item="vo_sub" sort="" key="key_sub"}
<li> <li>
<button type="button" class="c-sidebar__sub" data-category-id="product-control-{$key}" data-sub-id="product-control-{$key_sub}">{$vo_sub.title}</button>
<button type="button" class="c-sidebar__sub" data-category-id="product-control-{$key}" data-sub-id="product-plc-{$key_sub}">{$vo_sub.title}</button>
</li> </li>
{/hcTaglib:subcategory} {/hcTaglib:subcategory}
</ul> </ul>
@ -122,6 +122,7 @@ $current_cate_id = $current_cate['id'] ?? '';
{hcTaglib:subcategory pid="333" item="vo" sort="" key="key"} {hcTaglib:subcategory pid="333" item="vo" sort="" key="key"}
{php} {php}
$sub_cate_id = $vo['id']; // 获取子分类的ID $sub_cate_id = $vo['id']; // 获取子分类的ID
// var_dump($sub_cate_id);exit;
// $need_show_sub_content = $vo['need_show_sub_content'] ?? 0; //是否需要展示此分类下的内容列表0=不展示,1=展示 // $need_show_sub_content = $vo['need_show_sub_content'] ?? 0; //是否需要展示此分类下的内容列表0=不展示,1=展示
{/php} {/php}
@ -129,14 +130,19 @@ $current_cate_id = $current_cate['id'] ?? '';
{hcTaglib:subcategory pid="$sub_cate_id" item="vo_sub" sort="" key="key_sub"} {hcTaglib:subcategory pid="$sub_cate_id" item="vo_sub" sort="" key="key_sub"}
<!-- 获取当前分类的所有文章 --> <!-- 获取当前分类的所有文章 -->
{hcTaglib:contentPage2 cid="$vo_sub.id" mainField="id,category_id,title,sub_title" subField="" name="hc_content" limit="100" item="content_sub22" sort="sort asc"}
{hcTaglib:contentPage2 cid="$vo_sub.id" mainField="id,category_id,title,sub_title,thumbnail" subField="" name="hc_content" limit="100" item="content_sub22" sort="sort asc"}
{/hcTaglib:contentPage2} {/hcTaglib:contentPage2}
{if !empty($hc_content)} {if !empty($hc_content)}
<div class="c-grid" data-product-grid> <div class="c-grid" data-product-grid>
{volist name="hc_content" id="vo_content"} {volist name="hc_content" id="vo_content"}
<!-- <li><a href="{:hcUrl('detail/index',['id'=>$vo_content['id'],'cid'=>$vo_content['category_id']])}">{$vo_content.title}&#45;&#45;666666666666</a></li> -->
<article class="s-product-card" data-sub="motion-plc">
{php}
// $sub_cate_id = $vo['id']; // 获取子分类的ID
// var_dump($vo_content->toArray());exit;
// $need_show_sub_content = $vo['need_show_sub_content'] ?? 0; //是否需要展示此分类下的内容列表0=不展示,1=展示
{/php}
<article class="s-product-card" data-sub="product-plc-{$key_sub}">
<a class="s-product-card__link" href="{:hcUrl('detail/index',['id'=>$vo_content['id'],'cid'=>$vo_content['category_id']])}"> <a class="s-product-card__link" href="{:hcUrl('detail/index',['id'=>$vo_content['id'],'cid'=>$vo_content['category_id']])}">
<div class="s-product-card__media"> <div class="s-product-card__media">
<img src="{$vo_content['thumbnail']['url'] ?? ''}" alt="{$vo_content.title}" loading="lazy" /> <img src="{$vo_content['thumbnail']['url'] ?? ''}" alt="{$vo_content.title}" loading="lazy" />
@ -169,271 +175,11 @@ $current_cate_id = $current_cate['id'] ?? '';
{/hcTaglib:subcategory} {/hcTaglib:subcategory}
<div class="c-panel" data-category-panel="industrial-control">
<div class="c-grid" data-product-grid>
<article class="s-product-card" data-sub="motion-plc">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-1-CWOfzg1E.png" alt="X6 总线型PLC" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">X6 总线型PLC</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
<article class="s-product-card" data-sub="motion-plc">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-2-CDGbY_W2.png" alt="X5 运动控制型PLC" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">X5 运动控制型PLC</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
<article class="s-product-card" data-sub="motion-plc">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-3-D0tp8ubu.png" alt="X3 增强型PLC" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">X3 增强型PLC</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
<article class="s-product-card" data-sub="motion-plc">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-4-CgfkoJec.png" alt="X2 标准型PLC" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">X2 标准型PLC</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
<article class="s-product-card" data-sub="motion-plc">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-5-BvpmVkZa.png" alt="X1 经济型PLC" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">X1 经济型PLC</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
<article class="s-product-card" data-sub="motion-plc">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-6-AFYRF7-Q.png" alt="X 继电器型PLC" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">X 继电器型PLC</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
<article class="s-product-card" data-sub="motion-plc">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-7-DnwDSuZE.png" alt="XM系列PLC" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">XM系列PLC</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
<article class="s-product-card" data-sub="motion-plc">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-8-BXd7DVPO.png" alt="XM3L系列PLC" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">XM3L系列PLC</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
<article class="s-product-card" data-sub="iot">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-9-Cw6kFapE.png" alt="UA407W系列工业物联网触控一体机" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">UA407W系列工业物联网触控一体机</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
<article class="s-product-card" data-sub="iot">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-10-CYy1ZcEN.png" alt="UBOX系列物联网关" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">UBOX系列物联网关</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
<article class="s-product-card" data-sub="iot">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-11-DCoEQuos.png" alt="PROFINET 网关" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">PROFINET 网关</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
<article class="s-product-card" data-sub="hmi">
<a class="s-product-card__link" href="/product.html">
<div class="s-product-card__media">
<img src="/themes/dist_static/static/images/img-12-DDHiUsWT.png" alt="UH500A系列HMI" loading="lazy" />
</div>
<div class="s-product-card__foot">
<h3 class="s-product-card__name">UH500A系列HMI</h3>
<span class="s-product-card__arrow" aria-hidden="true">
<img
src="data:image/svg+xml,%3csvg%20viewBox='0%200%2012.2529%2011.314'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.252930'%20height='11.313965'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='合并'%20d='M5.18202%201.41422L6.59622%200L12.2531%205.65686L12.2529%205.65702L10.8389%207.07108L6.59608%2011.3139L5.18186%209.89966L8.4245%206.65702L-0%206.65702L0%204.657L8.42482%204.65702L5.18202%201.41422Z'%20fill='rgb(239,67,53)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e"
alt=""
width="12"
height="11"
/>
</span>
</div>
</a>
</article>
</div>
<div class="c-empty" data-product-empty hidden>
<p class="c-empty__text">暂无产品</p>
</div>
</div>
<div class="c-panel" data-category-panel="servo" hidden>
<div class="c-empty">
<p class="c-empty__text">暂无产品</p>
</div>
</div>
<div class="c-panel" data-category-panel="inverter" hidden>
<div class="c-empty">
<p class="c-empty__text">暂无产品</p>
</div>
</div>
<div class="c-panel" data-category-panel="soft-starter" hidden>
<div class="c-empty">
<p class="c-empty__text">暂无产品</p>
</div>
</div>
<div class="c-panel" data-category-panel="robot" hidden>
<div class="c-empty">
<p class="c-empty__text">暂无产品</p>
</div>
</div>
<div class="c-panel" data-category-panel="embodied" hidden>
<div class="c-empty">
<p class="c-empty__text">暂无产品</p>
</div>
</div>
<div class="c-panel" data-category-panel="textile" hidden>
<div class="c-empty">
<p class="c-empty__text">暂无产品</p>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</main> </main>
<div class="mask" id="mask"> <div class="mask" id="mask">
<header class="mask-header"> <header class="mask-header">
<a href="/" class="mask-header__logo" aria-label="睿能科技"> <a href="/" class="mask-header__logo" aria-label="睿能科技">

Loading…
Cancel
Save