200 lines
6.8 KiB
PHTML
Executable File
200 lines
6.8 KiB
PHTML
Executable File
<div class="m_nav ">
|
|
<div class="m_Container clearfix">
|
|
<div class="left">
|
|
<span class="icon-logo cursor_p"><a href="__ORICOROOT__/index"><img src="__PUBLIC__/m_weben/images/logo.png"></a></span>
|
|
</div>
|
|
<div class="right img-responsive cursor_p">
|
|
<span class="icon-category cursor_p"> <i class="icon-menu-svg"></i></span>
|
|
<span class="icon-keyword cursor_p del-button del-btn"><i class="icon-search-svg"></i></span>
|
|
<span class="cursor_p mask-up"><i class="icon-lag-svg"></i></span>
|
|
</div>
|
|
</div>
|
|
<div class="menu" style="display: none;">
|
|
<a href="__ORICOROOT__">
|
|
<dl>
|
|
<dt><a href="__ORICOROOT__">HOME</a></dt>
|
|
</dl>
|
|
</a>
|
|
<dl>
|
|
<dt class="cursor_p">Products <i class="rotate icon-arrow"></i></dt>
|
|
<?php
|
|
$oneLevelCategory = [];
|
|
foreach ($productCategory as $key => $value):
|
|
if ($key > 7) {
|
|
break;
|
|
}
|
|
if (isset($category['id']) && $category['id'] == $value['id']) {
|
|
$oneLevelCategory = isset($value['child']) ? $value['child'] : [];
|
|
}
|
|
?>
|
|
<dd>
|
|
<a href="__ORICOROOT__/product/catelists/id/<?php echo $value['id']; ?>" class=" cursor_p">
|
|
<p><?php echo $value['name']; ?></p>
|
|
</a>
|
|
</dd>
|
|
<?php endforeach; ?>
|
|
|
|
</dl>
|
|
<?php if ($nav_header): ?>
|
|
<?php
|
|
foreach ($nav_header as $kn => $nav):
|
|
if(strpos($nav['url'], 'http://') !== false || strpos($nav['url'], 'https://') !== false) {
|
|
$links = $nav['url'];
|
|
}
|
|
else{
|
|
if($nav['url']){
|
|
$links = '__ORICOROOT__/'.$nav['url'];
|
|
}
|
|
else{
|
|
$links = '#';
|
|
}
|
|
}
|
|
if($kn<7):
|
|
?>
|
|
<dl>
|
|
<dt class="cursor_p">
|
|
<a href="<?php echo $links; ?>" title="<?php echo $nav['name']; ?>"><?php echo $nav['name']; ?></a>
|
|
<?php if (!empty($nav['items'])): ?>
|
|
<i class="rotate icon-arrow"></i>
|
|
<?php endif; ?>
|
|
</dt>
|
|
<?php if (!empty($nav['items'])): ?>
|
|
<?php
|
|
foreach ($nav['items'] as $kt => $child):
|
|
if(strpos($child['url'], 'http://') !== false || strpos($child['url'], 'https://') !== false) {
|
|
$link = $child['url'];
|
|
}
|
|
else{
|
|
$link = '__ORICOROOT__/'.$child['url'];
|
|
}
|
|
?>
|
|
<dd><a href="<?php echo $link; ?>" title="<?php echo $child['name']; ?>"><?php echo $child['name']; ?></a></dd>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
|
|
</dl>
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<!--搜索弹框-->
|
|
<div class="marsk-container"style="display: none;">
|
|
<div class="popup-quick" >
|
|
<div class="ac-close float_r "><img src="__PUBLIC__/m_weben/images/close.png"></div>
|
|
<div class="search-in">
|
|
<input type="text" placeholder="Product USB 2.0..." >
|
|
<button id="search-btnput" class="search-button">Search</button>
|
|
<div class="title-text">
|
|
<p><a href="#">Search History</a></p>
|
|
<?php
|
|
$historyList = getBannerList(90, 5);
|
|
if ($historyList):
|
|
?>
|
|
<?php foreach ($historyList as $kh => $history): ?>
|
|
<p><a href="<?php echo $history['url']; ?>"><?php echo $history['name']; ?></a></p>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--弹出框-->
|
|
<script type="text/javascript" src="__PUBLIC__/m_weben/js/jquery-1.8.3.min.js"></script>
|
|
<script type="text/javascript" src="__PUBLIC__/m_weben/js/bxslider/jquery.bxslider.min.js"></script>
|
|
<script src="__PUBLIC__/m_weben/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="__PUBLIC__/m_weben/js/modernizr.js"></script>
|
|
<script src="__PUBLIC__/m_weben/js/jquery.mobile.custom.min.js"></script>
|
|
<script src="__PUBLIC__/m_weben/js/main.js"></script>
|
|
<script src="__PUBLIC__/m_weben/js/resize.js"></script>
|
|
<script>
|
|
//网页加载时运行
|
|
$(function(){
|
|
navHeader();
|
|
$(window).scroll(function () {
|
|
navHeader();
|
|
})
|
|
function navHeader() {
|
|
if ($(window).scrollTop() > 0) {
|
|
$(".header").addClass("m_nav");
|
|
} else {
|
|
$(".header").removeClass("m_nav");
|
|
}
|
|
}
|
|
})
|
|
/*menu菜单*/
|
|
$(function(){
|
|
$(".icon-category").click(function(){
|
|
$(this).toggleClass("icon-close");
|
|
$(".menu").slideToggle(800);
|
|
$(".m-Country").hide();
|
|
})
|
|
})
|
|
/*字体大小变化*/
|
|
/* 长宽占位 rem算法, 根据root的rem来计算各元素相对rem, 默认html 320/20 = 16px */
|
|
/* 长宽占位 rem算法, 根据root的rem来计算各元素相对rem, 默认html 320/20 = 16px */
|
|
function placeholderPic(){
|
|
var w = document.documentElement.offsetWidth;
|
|
if(w>750){
|
|
document.documentElement.style.fontSize=750/20+'px';
|
|
}else{
|
|
document.documentElement.style.fontSize=w/20+'px';
|
|
}
|
|
}
|
|
placeholderPic();
|
|
window.onresize=function(){
|
|
placeholderPic();
|
|
}
|
|
|
|
/*底部文件*/
|
|
$(function(){
|
|
$(".faq dl dt").click(function(){
|
|
$(this).nextAll().slideToggle(500);
|
|
$(this).children("i").toggleClass("icon-jian-svg");
|
|
})
|
|
})
|
|
|
|
/*头部*/
|
|
$(function(){
|
|
$(".menu dl dt").click(function(){
|
|
$(this).nextAll().slideToggle(500);
|
|
$(this).children("i").toggleClass("rotate");
|
|
})
|
|
})
|
|
/*搜索弹框*/
|
|
$(function() {
|
|
$('.del-button').click(function() {
|
|
$(".marsk-container").show();
|
|
});
|
|
});
|
|
/*弹出框关闭*/
|
|
$(function() {
|
|
$('.ac-close').click(function() {
|
|
$(".marsk-container").hide();
|
|
});
|
|
|
|
$(".search-in input").keyup(function(event) {
|
|
if (event && event.keyCode === 13) {
|
|
$("#search-btnput").trigger("click");
|
|
}
|
|
});
|
|
|
|
|
|
//$("#search-btnput").click(function() {
|
|
$("#search-btnput").bind("click", function(event) {
|
|
|
|
var skeyword = $(".search-in input").val();
|
|
if(skeyword){
|
|
var href = "__ORICOROOT__/search/index?skeyword=" + encodeURIComponent(skeyword);
|
|
location.href = href;
|
|
}
|
|
else{
|
|
var href = "__ORICOROOT__/search/index";
|
|
location.href = href;
|
|
}
|
|
|
|
});
|
|
});
|
|
</script>
|