init
This commit is contained in:
167
app/index/view/include/top-header.phtml
Executable file
167
app/index/view/include/top-header.phtml
Executable file
@@ -0,0 +1,167 @@
|
||||
<div class="nav">
|
||||
<div class="swt-Container overflow-f">
|
||||
<div class="all-logo">
|
||||
<div class="logo logo-black"><a href="__ORICOROOT__"><img src="/uploads/default/logo-black.png" alt="图片描述"></a></div>
|
||||
<div class="logo logo-white"><a href="__ORICOROOT__"><img src="/uploads/default/logo-white.png" alt="图片描述"></a></div>
|
||||
</div>
|
||||
<div class="all-logo-black" style="display: none">
|
||||
<div class="logo"><a href="__ORICOROOT__"><img src="/uploads/default/logo-black.png" alt="图片描述"></a></div>
|
||||
</div>
|
||||
<div class="navfl">
|
||||
<ul class="navul">
|
||||
<li id="index" class="products main_nav"><a href="__ORICOROOT__">首页</a></li>
|
||||
<li id="nav1" class="products main_nav">
|
||||
<a href="<?php echo url_rewrite('product'); ?>" class="aons">产品与服务<span class="icon-arrow arrow"></span></a>
|
||||
<dl class="navlist navlist_c" style="display: none">
|
||||
<div class="swt-Container ca_list text-left">
|
||||
<?php if (!empty($productCategory)): ?>
|
||||
<?php foreach ($productCategory as $key => $value):
|
||||
if (isset($category['id']) && $category['id'] == $value['id'])
|
||||
$oneLevelCategory = isset($value['child']) ? $value['child'] : [];
|
||||
$have_3_child = 0;
|
||||
if (!empty($value['child']))
|
||||
{
|
||||
foreach ($value['child'] as $k => $v)
|
||||
{
|
||||
if (!empty($v['child']))
|
||||
{
|
||||
$have_3_child = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="ca_lists">
|
||||
<a href="__ORICOROOT__/product/category/<?php echo $value['id']?>.html" class="nav_title one_category"><img src="<?php echo $value['m_icon']?>"><?php echo $value['name']; ?><i class="icon-r-arrow arrow_title"></i></a>
|
||||
<?php if ($have_3_child == 0): ?>
|
||||
<div class="two_nav two_nav_other" style="display: none;">
|
||||
<?php if (!empty($value['child'])): ?>
|
||||
|
||||
<?php foreach ($value['child'] as $k => $v): ?>
|
||||
<div class=""><a href="__ORICOROOT__/product/subcategory/<?php echo $v['id']?>.html"><img src="<?php echo $v['m_icon']; ?>"><?php echo $v['name']; ?></a></div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
<div style="<?php if ($key != 0): ?> display: none <?php endif; ?>">
|
||||
<?php if (!empty($value['child'])): ?>
|
||||
<div class="two_nav_<?php echo $value['id']; ?> two_nav">
|
||||
<?php foreach ($value['child'] as $k => $v): ?>
|
||||
<dl>
|
||||
<dt class="nav_list_title"><a href="__ORICOROOT__/product/subcategory/<?php echo $v['id']?>.html"><img src="<?php echo $v['m_icon']; ?>"><?php echo $v['name']; ?></a></dt>
|
||||
<?php if (!empty($v['child'])): ?>
|
||||
<?php foreach ($v['child'] as $index => $item): ?>
|
||||
<dd><a href="__ORICOROOT__/product/subcategory/<?php echo $item['id']?>.html"><img src="<?php echo $item['picture']; ?>"><?php echo $item['shortname']; ?><?php echo $item['name']; ?></a></dd>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
</li>
|
||||
<li id="nav2" class="products main_nav">
|
||||
<a href="#">价值与使命<span class="icon-arrow arrow"></span></a>
|
||||
<dl class="navlist navlist2">
|
||||
<dd class="navdd">
|
||||
<div class="ddfl">
|
||||
<a href="__ORICOROOT__/index/Group/weare">我们是</a>
|
||||
<a href="__ORICOROOT__/index/Group/wewill">我们会</a>
|
||||
<a href="__ORICOROOT__/index/Group/culture">文化与价值观</a>
|
||||
<a href="__ORICOROOT__/index/Group/vision">愿景与使命</a>
|
||||
<a href="__ORICOROOT__/index/Group/responsibility">企业社会责任报告书</a>
|
||||
</div>
|
||||
<div class="ddrh"><img src="__PUBLIC__/web/uploadfiles/image/dd1.jpg">
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li id="nav3" class="main_nav">
|
||||
<a href="#">历史与创新<span class="icon-arrow arrow"></span></a>
|
||||
<dl class="navlist navlist1">
|
||||
<dd class="navdd">
|
||||
<div class="ddfl">
|
||||
<a href="__ORICOROOT__<?php echo url_rewrite('article'); ?>">最新动态</a>
|
||||
<a href="__ORICOROOT__/index/Group/brand">品牌发展</a>
|
||||
<a href="__ORICOROOT__/index/Group/honor">荣誉与证书</a>
|
||||
</div>
|
||||
<div class="ddrh"><img src="__PUBLIC__/web/uploadfiles/image/dd3.jpg">
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<!--<li id="nav2" class="products"><a href="/index/Group/culture">价值与使命</a>
|
||||
</li>
|
||||
<li id="nav3" class="products"><a href="#">历史与创新</a>
|
||||
</li>-->
|
||||
<li id="nav4" class="products main_nav"><a href="__ORICOROOT__/index/Group/job">加入我们</a>
|
||||
</li>
|
||||
<li id="nav5" class="products main_nav"><a href="__ORICOROOT__/index/Group/Contact">联系我们</a>
|
||||
</li>
|
||||
<li id="nav6" class="products main_nav">
|
||||
<a href="#">技术支持<span class="icon-arrow arrow"></span></a>
|
||||
<dl class="navlist navlist3">
|
||||
<dd class="navdd">
|
||||
<div class="ddfl">
|
||||
<div class="swt-Container">
|
||||
<p class="text-r"><a href="__ORICOROOT__<?php echo url_rewrite('download'); ?>">软件及驱动</a></p>
|
||||
<p><a href="__ORICOROOT__<?php echo url_rewrite('video'); ?>">视频专区</a></p>
|
||||
<p><a href="__ORICOROOT__/index/antifake/">SSD防伪查询</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navfl">
|
||||
<ul class="navul">
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
/*固定头部*/
|
||||
// window.onload=function()
|
||||
// {
|
||||
// if(document.readyState=="complete")
|
||||
// {
|
||||
// document.getElementById("wap-search-in").focus();
|
||||
// }
|
||||
// }
|
||||
|
||||
var theme_color= $("#header").attr("class");
|
||||
var header_class = $("header").attr("class");
|
||||
/*滚动条大于100固定头部*/
|
||||
$(window).scroll(function() {
|
||||
// 当滚动到最底部以上100像素时, 固定头部
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$("header").removeClass("header-Index").addClass("header-Product");
|
||||
$("#header").removeClass(theme_color).addClass("theme-black");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("header").removeClass("header-Product").addClass(header_class);
|
||||
$("#header").removeClass("theme-black").addClass(theme_color);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user