This commit is contained in:
2024-10-29 14:04:59 +08:00
commit 48bf3e6f33
2839 changed files with 762707 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
$r = mt_rand(10000, 100000);
foreach ($list as $k => $product):
?>
<dd class="aej<?php echo $r + $k + 1; ?>">
<div class="ejimg bd c<?php echo $k + 1; ?>">
<ul>
<li><a href="<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><img src="<?php echo getImage($product['picture']); ?>"></a></li>
<li><a href="<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><img src="<?php echo getImage($product['picture_back']); ?>"></a></li>
</ul>
</div>
<div class="ejtext">
<div class="text1">
<p><a href="<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['name']; ?></a></p>
<p><a href="<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['shortname']; ?></a></p>
</div>
<div class="hd">
<ul>
<li></li><li></li>
</ul>
</div>
<script type="text/javascript">
jQuery(".aej<?php echo $r + $k + 1; ?>").slide({mainCell: ".bd ul", trigger: "click"});
</script>
<div class="clear"></div>
</div>
<div class="mask"><?php echo $product['categoryname']; ?></div>
</dd>
<?php
endforeach;
?>
<div class="clear"></div>

View File

@@ -0,0 +1,236 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head-seo" /}
{include file="include/head" /}
<script type="text/javascript" src="__PUBLIC__/webth/scripts/jquery.nicescroll.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/webth/scripts/bxslider/jquery.bxslider-list.css">
<script type="text/javascript" src="__PUBLIC__/webth/scripts/bxslider/jquery.bxslider.min.js"></script>
<script type="text/javascript">
var navID = "1";
</script>
</head>
<body>
<!--top-->
<header class="header-PC header-Index">
<div id="header">
{include file="include/top" /}
{include file="include/top-header" /}
</div>
</header>
{include file="include/top-header-mobile" /}
<!--top End-->
{include file="include/catbanner" /}
<!--if($hotproducts[0]['product_img']=='')-->
<?php if (!empty($oneLevelCategory[7])): ?>
<div class="lj_index_img_02">
<div class="lj_its_img">
<ul>
<?php foreach ($oneLevelCategory as $k1 => $pc1): ?>
<li>
<div class="lj-port-1 effect-1">
<div class="image-box"> <a href="__ORICOROOT__<?php echo url_rewrite('productsub', ['id' => $pc1['id']]); ?>"><img src="<?php echo $pc1['image']; ?>" >
<div class="groups_a"><?php echo $pc1['name']; ?></div>
</a></div>
<div class="text-desc"> <a href="__ORICOROOT__<?php echo url_rewrite('productsub', ['id' => $pc1['id']]); ?>"> <img src="<?php echo getImage($pc1['picture']); ?>" alt=""/> </a></div>
</div>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<script type="text/javascript">
var pl_length = $(".lj_its_img li").length
var pl_slier_width = $(".lj_its_img").width();
//var pl_li_width = pl_slier_width * 0.1429;
if(pl_slier_width>960){
var pl_li_width = pl_slier_width * 0.125;
}else if(pl_slier_width<640){
var pl_li_width = pl_slier_width * 0.25;
}else{
var pl_li_width = pl_slier_width * 0.2;
}
if((pl_li_width * pl_length)>pl_slier_width){
$(document).ready(function(){
$('.lj_index_img_02 ul').bxSlider({
slideWidth: pl_li_width,
minSlides: 1,
maxSlides: 7,
moveSlides: 1,
slideMargin: 0,
auto:true,
controls:true,
pager:false,
infiniteLoop:false
});
});
}
</script>
<?php else: ?>
<div class="lj_index_img">
<div class="lj_its_img">
<ul>
<?php foreach ($oneLevelCategory as $k1 => $pc1): ?>
<li class="">
<div class="lj-port-1 effect-1">
<div class="image-box"> <a href="__ORICOROOT__<?php echo url_rewrite('productsub', ['id' => $pc1['id']]); ?>"><img src="<?php echo $pc1['image']; ?>" >
<div class="groups_a"><?php echo $pc1['name']; ?></div>
</a></div>
<div class="text-desc"> <a href="__ORICOROOT__<?php echo url_rewrite('productsub', ['id' => $pc1['id']]); ?>"> <img src="<?php echo getImage($pc1['picture']); ?>" alt=""/> </a></div>
</div>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<script type="text/javascript">
var pl_length = $(".lj_its_img li").length
var pl_slier_width = $(".lj_its_img").width();
//var pl_li_width = pl_slier_width * 0.1429;
if(pl_slier_width>960){
var pl_li_width = pl_slier_width * 0.125;
}else if(pl_slier_width<640){
var pl_li_width = pl_slier_width * 0.25;
}else{
var pl_li_width = pl_slier_width * 0.2;
}
if((pl_li_width * pl_length)>pl_slier_width){
$(document).ready(function(){
$('.lj_index_img ul').bxSlider({
slideWidth: pl_li_width,
minSlides: 1,
maxSlides: 7,
moveSlides: 1,
slideMargin: 0,
auto:true,
controls:true,
pager:false,
infiniteLoop:false
});
});
}
</script>
<?php endif; ?>
<!-- top 内容 s -->
<div class="indexbox-list-white">
<div class="swt-Container">
<!-- 电源产品 s -->
<?php if (empty($oneLevelCategory)){}else{?>
<?php if (!empty($oneLevelCategory)): ?>
<!-- 产品列表 s -->
<ul class="dcp">
<script src="__ORICOROOT__<?php echo url('/ad/tagsli', ['tags' => 'top_category_id_' . ($category['id']), 'num' => 4]); ?>" type="text/javascript"></script>
<div class="clear"></div>
</ul>
<!-- 产品列表 e -->
<?php endif; ?>
<?php
$products = getCateProduct($category['id'], 6, ['p.ishot' => 1], true);
// tiaoshi($products);die;
if ($products):
?>
<!-- 热门产品 s -->
<div class="rmBox">
<div class="rmtit rmtit1">Hot products</div>
<ul>
<script src="<?php echo url('th/ad/tagsli', ['tags' => 'hot_category_id_' . ($category['id']), 'num' => 4]); ?>" type="text/javascript"></script>
<div class="clear"></div>
</ul>
</div>
<!-- 热门产品 e -->
<?php endif; ?>
</div>
<?php }?>
</div>
<!-- top 内容 e -->
<!-- 背景灰色 内容区 s -->
<div class="indexbox-list cdbox">
<div class="swt-Container">
<?php if (!empty($oneLevelCategory)): ?>
<?php foreach ($oneLevelCategory as $k1 => $pc1): ?>
<div class="daily">
<div class="datit">
<p class="da1"><?php echo $pc1['name']; ?></p>
<p class="da2"><a href="__ORICOROOT__<?php echo url_rewrite('productsub', ['id' => $pc1['id']]); ?>" target="_blank">View all<i></i></a></p>
<div class="clear"></div>
</div>
<div class="dafl">
<script src="<?php echo url('th/ad/tags', ['tags' => 'category_left_' . ($pc1['id'])]); ?>" type="text/javascript"></script>
</div>
<?php
$products = getCateoneProduct($pc1['id'], 4, [], true);
//print_r($products);die;
if ($products):
?>
<ul class="darh">
<?php foreach ($products as $product): ?>
<li>
<a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>" target="_blank">
<div class="daimg"><img src="<?php echo getImage($product['list_bk_img']); ?>"></div>
<div class="datext">
<p class="dat1"><?php echo $product['name']; ?></p>
<p class="dat2"><?php echo $product['brand_id']; ?></p>
</div>
<?php if ($product['isnew']): ?><div class="newcp">New</div><?php endif; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<div class="clear"></div>
<!--底部广告图<div class="hwban">
<script src="<?php echo url('th/ad/tags', ['tags' => 'category_bottom_' . ($pc1['id'])]); ?>" type="text/javascript"></script>
</div>-->
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
<!-- 背景灰色 内容区 e -->
<script type="text/javascript">
$(function() {
$(".hd ul li").hover(
function() {
$(this).children(".bds").stop(true, true).show();
},
function() {
$(this).children(".bds").stop(true, true).hide();
}
);
});
/*轮播滚动条*/
$('.hd').niceScroll({
cursorcolor: "transparent",//#CC0071 光标颜色
cursoropacitymax: 1, //改变不透明度非常光标处于活动状态scrollabar“可见”状态范围从1到0
touchbehavior: false, //使光标拖动滚动像在台式电脑触摸设备
cursorwidth: "5px", //像素光标的宽度
cursorborder: "0", // 游标边框css定义
cursorborderradius: "5px",//以像素为光标边界半径
autohidemode: false //是否隐藏滚动条
});
</script>
<!-- bottom s -->
{include file="include/bottom" /}
<!-- bottom e -->
</body>
</html>

589
app/th/view/product/detai1l.phtml Executable file
View File

@@ -0,0 +1,589 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head-product" /}
<script type="text/javascript">
var navID = "1";
</script>
</head>
<body>
<!--top-->
{include file="include/top-product" /}
<!--top End-->
<script type="text/javascript" src="__PUBLIC__/webth/scripts/large.js"></script>
<div class="indexbox4 cpmbox">
<div class="swt-Container-1200">
<div class="product_address"><a href="/us/index">Home</a>
<span class="icon-arrow arrow_address"></span>
<?php if($pid==''){?>
<a href="<?php echo url_rewrite('us/product', ['id' => $cid['id']]); ?>"><?php echo $cid['name'];?></a>
<?php }else{?>
<a href="<?php echo url_rewrite('us/product', ['id' => $pid['id']]); ?>"><?php echo $pid['name'];?></a>
<?php }?>
<span class="icon-arrow arrow_address"></span>
<a href="<?php echo url_rewrite('us/productsub', ['id' => $detail['cid']]); ?>"><?php echo $category['name'];?></a>
</div>
<!-- 产品 s -->
<div class="cp outBox">
<div class="cpfl">
<?php
$color = '/uploads/product/'.$color.'.jpg';
$proimages = [];
$images = [];
if ($product_images):
foreach ($product_images as $imgrow) {
$proimages[$imgrow['image_color']][] = $imgrow['image_url'];
}
if (isset($proimages[$color])) {
$images = $proimages[$color];
} else {
$images = $proimages[$product_images[0]['image_color']];
}
?>
<!--preview start-->
<div class="preview">
<div class="smallImg">
<div class="scrollbutton smallImgUp disabled"></div>
<div id="imageMenu">
<ul>
<?php
$firstimage = '';
foreach ($images as $k => $img):
?>
<li<?php if ($k == 0):$firstimage = $images[0]; ?> id="onlickImg"<?php endif; ?>><img src="<?php echo getImage($img); ?>"></li>
<?php endforeach; ?>
</ul>
</div>
<div class="scrollbutton smallImgDown"></div>
</div><!--smallImg end-->
<div id="vertical" class="bigImg">
<img src="<?php echo getImage($firstimage); ?>" id="midimg" />
</div><!--bigImg end-->
</div>
<!--preview end-->
<!-- phone s-->
<div class="swiper-container banners">
<div class="swiper-wrapper">
<?php foreach ($images as $img): ?>
<div class="swiper-slide"><a href="javascript:void(0);"><img src="<?php echo getImage($img); ?>"></a></div>
<?php endforeach; ?>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination bandot"></div>
</div>
<script type="text/javascript">
var swiper = new Swiper('.banners', {
loop: true,
autoplay: true,
pagination: {el: '.bandot', },
});
$(function() {
$(".plbtn").click(function() {
$(".play").show();
var video = document.getElementById("pvideo");
video.play();
});
$(".pcha").click(function() {
var video = document.getElementById("pvideo");
video.pause();
$(".play").hide();
});
});
</script>
<!-- phone e -->
<?php endif; ?>
<!-- 视频播放 s -->
<?php if($detail['videopath']==""){ ?><?php } else{ ?>
<div class="play play1">
<a href="javascript:;" class="pcha"><img src="__PUBLIC__/web/images/images/cha1.png"></a>
<div class="moimg"><video id="pvideo" width="100%" height="auto" controls poster="<?php echo getImage($detail['picture']); ?>">
<source src="<?php echo $detail['videopath']; ?>">
您的浏览器不支持 video 标签。
Your browser does not support HTML5 video.
</video></div>
</div>
<div class="plbtn" ><a href="javascript:;"><img src="__PUBLIC__/web/images/images/play.png"></a></div>
<?php }?>
<!-- 视频播放 e -->
</div>
<div class="cprh">
<div class="cpcon">
<p class="ctit1"><?php echo $detail['name']; ?></p>
<p class="ctit2"><?php echo $detail['shortname']; ?></p>
</div>
<ul class="cpul">
<?php
$desc = str_replace("\r\n", "\n", $detail['description']);
$descarr = explode("\n", $desc);
foreach ($descarr as $l):
?>
<li><i></i><?php echo $l; ?></li>
<?php endforeach; ?>
</ul>
<?php if ($proimages): ?>
<div class="hd">
<ul>
<?php foreach ($proimages as $c => $imgclrs): $b=trim(strrchr($c, '/'),'/');$b=substr($b,0,strpos($b, '.'));?>
<li class="img-responsive" <?php if ($c == $color): ?> class="on"<?php endif; ?>>
<?php if($c==''){ ?>
<?php } else{?>
<a <?php echo 'style="background: url(__PUBLIC__/web/images/' . $c . '.png);" href="' . url_rewrite('us/productdetail', ['id' => $detail['id'], 'color' => $b]) . '"'; ?>><img src="<?php echo $c;?>" alt="" style="width:18px; height: 18px; border-radius: 9px; margin:3px;"></a>
<?php }?>
</li>
<?php endforeach; ?>
</ul>
<?php if($c==''){ ?>
<?php } else{?>
<span>颜色</span>
<?php }?>
</div>
<?php endif; ?>
<div class="buy">
<a href="<?php echo $detail['url_tm']; ?>" target="_blank">购买天猫</a>
<a href="<?php echo $detail['url_jd']; ?>" target="_blank">购买京东</a>
</div>
</div>
<div class="clear"></div>
</div>
<!-- 产品 e -->
</div>
</div>
<div class="warp">
<div class="warpa">
<!-- 锚链接 s
<ul class="w1440 cpa">
<li><a href="#link1">亮点</a></li>
<li><a href="#link2">相关</a></li>
<li><a href="#link3">评论</a></li>
<li><a href="#link4">规格</a></li>
<li><a href="#link5">下载</a></li>
<li><a href="#link6">常见问题</a></li>
<div class="clear"></div>
</ul>
<!-- 锚链接 e -->
</div>
<!-- 亮点 s-->
<div class="warp1 proTfg">
<div class="swt-Container-1200">
<div class="light">
<!--<div class="lgtit" id="link1">亮点</div>
<div class="lgimg"><img src="<?php /*echo getImage($detail['ld_picture']); */?>"></div>
<div class="lgfl"><img src="<?php /*echo getImage($detail['ld_md_picture']); */?>"></div>
<div class="lgrh">
<p class="lgtext"><?php /*echo $detail['ld_md_title']; */?></p>
<p><?php /*echo $detail['ld_md_description']; */?></p>
<?php
/* if ($detail['ld_md_content']) {
$ld_md_contents = unserialize($detail['ld_md_content']);
if ($ld_md_contents) {
*/?>
<ul class="lgul">
<?php /*foreach ($ld_md_contents as $ld_md_content): */?>
<li><i></i><?php /*echo $ld_md_content; */?></li>
<?php /*endforeach; */?>
</ul>
<?php
/* }
}
*/?>
</div>
<div class="clear"></div>
<ul class="cplist">
<li>
<img src="<?php /*echo getImage($detail['ld_left_picture']); */?>">
<p class="lg1"><?php /*echo $detail['ld_left_title']; */?></p>
<p class="lg2"><?php /*echo $detail['ld_left_description']; */?></p>
</li>
<li>
<img src="<?php /*echo getImage($detail['ld_right_picture']); */?>">
<p class="lg1"><?php /*echo $detail['ld_right_title']; */?></p>
<p class="lg2"><?php /*echo $detail['ld_right_description']; */?></p>
</li>
<div class="clear"></div>
</ul>-->
<?php
if ($detail['product_desc']) {
$detail_descs = unserialize($detail['product_desc']);
if ($detail_descs) {
?>
<ul class="msul">
<div class="mstit">产品描述</div>
<?php foreach ($detail_descs as $detail_desc): ?>
<li>
<p class="ms1"><?php echo $detail_desc['desc_title']; ?></p>
<p class="ms2"><?php echo $detail_desc['desc_desc']; ?></p>
</li>
<?php endforeach; ?>
</ul>
<?php
}
}
?>
</div>
<!-- 亮点 e-->
</div>
</div>
<!-- 亮点 e-->
<!-- 关联产品 s <?php //if ($product_relateds)print_r($product_relateds); ?>-->
<div class="warp2 proTfg">
<div class="swt-Container-1200">
<div class="gltit" id="link2">关联产品</div>
<?php if ($product_relateds): ?>
<div class="cpBox">
<div class="owl-carousel">
<?php foreach ($product_relateds as $product): ?>
<div class="item wow">
<?php $img =getProductReated($product['id']);?>
<a href="<?php echo url_rewrite('us/productdetail', ['id' => $product['id']]); ?>">
<div class="glimg img-responsive"><img src="<?php if (isset($img[0]['image_url'])) {echo $img[0]['image_url'];} ; ?>"></div>
<div class="gltext">
<p class="gl1"><?php echo $product['name']; ?></p>
<!-- <p class="gl2">--><?php //echo $product['shortname']; ?><!--</p>-->
</div>
<div class="clear"></div>
</a>
</div>
<?php endforeach; ?>
</div>
<script>
var owl = $(".cpBox .owl-carousel");
owl.owlCarousel({
autoplay: true,
navigationText: ["", ""],
responsive: {
0: {
items: 1,
margin: 0
},
420: {
items: 2,
margin: 0,
smartSpeed: 80,
dots: false
},
640: {
items: 3,
margin: 0,
smartSpeed: 80,
dots: false
},
998: {
items: 4,
margin: 0,
smartSpeed: 80,
dots: false
},
},
})
</script>
</div>
<?php endif; ?>
</div>
</div>
<!-- 关联产品 e -->
<!-- 评论 s
<div class="nybox proTfg">
<div class="w1440">
<div class="pltitle">
<p class="pltit" id="link3">评论</p>
<p class="plimg">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x2.png">
</p>
<p class="pltit1">128条评论</p>
</div>
<div class="plcon">
<p class="py1">标题ORICO L12000 Scharge聚合物移动电源</p>
<p class="plimg">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x2.png">
<span>4</span>
</p>
<p class="py2">2018-08-28</p>
<p class="py3">评价内容12000mAh移动电源 LCD屏高精度显示电量 A+级聚合物安全电芯 智能快充</p>
</div>
<div class="plcon">
<p class="py1">标题ORICO L12000 Scharge聚合物移动电源</p>
<p class="plimg">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x2.png">
<span>4</span>
</p>
<p class="py2">2018-08-28</p>
<p class="py3">评价内容12000mAh移动电源 LCD屏高精度显示电量 A+级聚合物安全电芯 智能快充</p>
</div>
<div class="plcon">
<p class="py1">标题ORICO L12000 Scharge聚合物移动电源</p>
<p class="plimg">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x2.png">
<span>4</span>
</p>
<p class="py2">2018-08-28</p>
<p class="py3">评价内容12000mAh移动电源 LCD屏高精度显示电量 A+级聚合物安全电芯 智能快充</p>
</div>
<div class="plcon">
<p class="py1">标题ORICO L12000 Scharge聚合物移动电源</p>
<p class="plimg">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x2.png">
<span>4</span>
</p>
<p class="py2">2018-08-28</p>
<p class="py3">评价内容12000mAh移动电源 LCD屏高精度显示电量 A+级聚合物安全电芯 智能快充</p>
</div>
<div class="plcon">
<p class="py1">标题ORICO L12000 Scharge聚合物移动电源</p>
<p class="plimg">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x2.png">
<span>4</span>
</p>
<p class="py2">2018-08-28</p>
<p class="py3">评价内容12000mAh移动电源 LCD屏高精度显示电量 A+级聚合物安全电芯 智能快充</p>
</div>
<div class="plcon">
<p class="py1">标题ORICO L12000 Scharge聚合物移动电源</p>
<p class="plimg">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x1.png">
<img src="__PUBLIC__/web/images/x2.png">
<span>4</span>
</p>
<p class="py2">2018-08-28</p>
<p class="py3">评价内容12000mAh移动电源 LCD屏高精度显示电量 A+级聚合物安全电芯 智能快充</p>
</div>
<!-- 分页 s
<div class="Pages" style="margin-top:20px;">
<span class="p_page">
<a href="javascript:void(0);" class="a_prev"></a>
<em class="num">
<a href="#" class="a_cur">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<span>...</span>
<a href="#">126</a>
</em>
<a href="javascript:void(0);" class="a_next"></a>
</span>
</div>
<!-- 分页 e
</div>
</div>
<!-- 评论 e -->
<!-- 规格参数 s -->
<div class="nybox proTfg">
<div class="swt-Container-1200">
<?php
if ($detail['product_view']) {
$detail_views = unserialize($detail['product_view']);
if ($detail_views) {
?>
<ul class="msul">
<p class="gltit" id="link4"> 规格参数</p>
<?php foreach ($detail_views as $detail_view): ?>
<li>
<div class="ms3"><?php echo $detail_view['desc_title']; ?></div>
<div class="ms4"><?php echo $detail_view['desc_desc']; ?></div>
</li>
<?php endforeach; ?>
</ul>
<?php
}
}
?>
</div>
</div>
<!-- 规格参数 e -->
<!-- 相关下载 s -->
<?php if(!$product_dls){?>
<?php }else{ ?>
<div class="nybox proTfg">
<div class="swt-Container-1200">
<div class="sptit" id="link5">相关下载</div>
<?php
if ($product_dls):
$selectTypeArr = config("product_dltype");
$prodls = [];
foreach ($product_dls as $dlrow) {
$prodls[$dlrow['dl_type']][] = $dlrow;
}
?>
<?php foreach ($prodls as $type => $dlclrs): ?>
<div class="xz">
<p class="xztit"><?php echo isset($selectTypeArr[$type]) ? $selectTypeArr[$type] : ''; ?></p>
<?php foreach ($dlclrs as $dl): ?>
<p class="xz1"><a href="<?php echo url('us/download/prodownload', ['id' => $dl['id']]); ?>"><i></i><?php echo $dl['dl_name']; ?></a></p>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
<?php }?>
<!-- 相关下载 e -->
<?php if ($product_questions): ?>
<!-- 常见问题 s -->
<div class="nybox proTfg">
<div class="swt-Container-1200">
<div class="sptit" id="link6">常见问题</div>
<?php foreach ($product_questions as $k => $question): ?>
<div class="ans" <?php if (!$k): ?>style="display:block;"<?php endif; ?>>
<div class="antit">
<i></i><?php echo $question['name']; ?>
</div>
<div class="anbox">
<p><?php echo $question['description']; ?></p>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<!-- 常见问题 e -->
<?php endif; ?>
<script type="text/javascript">
$(function() {
var $category = $(".ans .anbox");
$category.hide();
$(".ans .antit").click(function() {
if ($(this).next(".anbox").is(":visible")) {
$(this).removeClass('on').next().slideUp(800);
$(this).parent('.ans').removeClass('on');
$(this).children("i").removeClass("ons")
} else {
$category.hide();
$(".ans .antit").removeClass('on');
$(this).children("i").addClass("ons")
$(this).addClass('on').next().slideDown(800);
$(this).parent('.ans').addClass('on');
}
});
});
$(function() {
$('a[href*=#],area[href*=#]').click(function() {
console.log(this.pathname)
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var $target = $(this.hash);
$target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']');
if ($target.length) {
var targetOffset = $target.offset().top - 50;
$('html,body').animate({
scrollTop: targetOffset
}, 800);
return false; //页面锚点跳转动画 后面的800是锚点跳转的时间 800ms
}
}
});
})
$(document).ready(function() {
//获取div-one距离顶部的距离
var navtop = $(".warpa").offset().top;
$(document).scroll(function() {
//获取滚动条滚动的高度
var scroltop = $(document).scrollTop();
if (scroltop > navtop) {
$(".warpa").css({
"position": "fixed",
"top": "0px",
"left": "0px",
"right": "0px",
"z-index": "999"
})
} else {
$(".warpa").css({
"position": "",
"top": "",
"left": "",
"right": "",
"z-index": ""
})
}
})
})
$("input").click(function() {
$(this).siblings("div").children("span").addClass("active");
$(this).parents("div").siblings("div").find("span").removeClass("active");
});
$(function() {
$(window).scroll(function() {
var arr = []
$.each($(".proTfg"), function(k, v) {
arr[k] = $(this).offset().top + $(this).height();
})
$.each(arr, function(k, v) {
if (($(window).scrollTop() + $(".cpa li").eq(k - 1).height() + 10) < v) {
if (!$(".cpa li").eq(k).hasClass("current")) {
$(".cpa li").eq(k).attr("class", "current").siblings().removeClass();
}
return false;
}
})
})
})
</script>
</div>
<div class="enlarge-img" style="display: none;">
<div class="scrollbutton_01 smallImgUp disabled"></div>
<img src="<?php echo getImage($firstimage); ?>">
<div class="scrollbutton_01 smallImgDown"></div>
<div class="close"><span class="icon-close"></div>
</div>
<script>
/*图片放大效果*/
$(".bigImg").click(function(){
$(".enlarge-img").show();
});
$(".enlarge-img .close").click(function(){
$(".enlarge-img").hide();
});
</script>
<!-- bottom s -->
{include file="include/bottom" /}
<!-- bottom e -->
</body>
</html>

539
app/th/view/product/detail.phtml Executable file
View File

@@ -0,0 +1,539 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head-seo" /}
{include file="include/head-product" /}
<script type="text/javascript" src="__PUBLIC__/webth/scripts/comment.js"></script>
<script type="text/javascript">
var navID = "1";
</script>
</head>
<body>
<!--top-->
<header class="header-PC header-Product">
<div id="header" class="theme-black">
{include file="include/top" /}
{include file="include/top-header" /}
</div>
</header>
{include file="include/top-header-mobile" /}
<!--top End-->
<script type="text/javascript" src="__PUBLIC__/web/scripts/large.js"></script>
<div class="indexbox-product cpmbox">
<div class="swt-Container">
<div class="product_address">
<a href="/index" class="href_01">Home</a>
<span class="icon-arrow arrow_address"></span><?php if($pid==''){?>
<a href="__ORICOROOT__<?php echo url_rewrite('product', ['id' => $cid['id']]); ?>" class="href_02"><?php echo $cid['name'];?></a>
<?php }else{?>
<a href="__ORICOROOT__<?php echo url_rewrite('product', ['id' => $pid['id']]); ?>" class="href_02"><?php echo $pid['name'];?></a>
<?php }?>
<span class="icon-arrow arrow_address"></span> <a href="__ORICOROOT__<?php echo url_rewrite('productsub', ['id' => $detail['cid']]); ?>" class="href_02"><?php echo $category['name'];?></a>
</div>
<!-- 产品 s -->
<div class="cp outBox">
<div class="cpfl">
<?php
$color = '/uploads/product/' . $color . '.jpg';
$proimages = [];
$images = [];
if ($product_images):
foreach ($product_images as $imgrow) {
$proimages[$imgrow['image_color']][] = $imgrow['image_url'];
}
if (isset($proimages[$color])) {
$images = $proimages[$color];
} else {
$images = $proimages[$product_images[0]['image_color']];
}
?>
<!--preview start-->
<div class="preview">
<div class="smallImg">
<div class="scrollbutton smallImgUp disabled"></div>
<div id="imageMenu">
<ul>
<?php
$firstimage = '';
foreach ($images as $k => $img):
?>
<li<?php if ($k == 0):$firstimage = $images[0]; ?> id="onlickImg"<?php endif; ?>>
<img src="<?php echo getImage($img); ?>"></li>
<?php endforeach; ?>
</ul>
</div>
<div class="scrollbutton smallImgDown"></div>
</div><!--smallImg end-->
<div id="vertical" class="bigImg">
<img src="<?php echo getImage($firstimage); ?>" id="midimg"/>
</div><!--bigImg end-->
</div>
<!--preview end-->
<!-- phone s-->
<div class="swiper-container banners">
<div class="swiper-wrapper">
<?php foreach ($images as $img): ?>
<div class="swiper-slide"><a href="javascript:void(0);"><img
src="<?php echo getImage($img); ?>"></a></div>
<?php endforeach; ?>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination bandot"></div>
</div>
<script type="text/javascript">
var swiper = new Swiper('.banners', {
loop: true,
autoplay: true,
pagination: {el: '.bandot',},
});
$(function () {
$(".plbtn").click(function () {
$(".play").show();
var video = document.getElementById("pvideo");
video.play();
});
$(".pcha").click(function () {
var video = document.getElementById("pvideo");
video.pause();
$(".play").hide();
});
});
</script>
<!-- phone e -->
<?php endif; ?>
<!-- 视频播放 s -->
<?php if ($detail['videopath'] == "") { ?><?php } else { ?>
<div class="play play1">
<a href="javascript:;" class="pcha"><img src="__PUBLIC__/web/images/images/cha1.png"></a>
<div class="moimg">
<video id="pvideo" width="100%" height="auto" controls
poster="<?php echo getImage($detail['picture']); ?>">
<source src="<?php echo $detail['videopath']; ?>">
您的浏览器不支持 video 标签。
Your browser does not support HTML5 video.
</video>
</div>
</div>
<div class="plbtn"><a href="javascript:;"><img src="__PUBLIC__/web/images/images/play.png"></a>
</div>
<?php } ?>
<!-- 视频播放 e -->
</div>
<div class="cprh">
<div class="cpcon">
<p class="ctit1"><?php echo $detail['name']; ?></p>
<p class="ctit2"><?php echo $detail['shortname']; ?></p>
</div>
<!-- 规格参数 s -->
<div class="proTfg">
<?php
if ($detail['product_view']) {
$detail_views = unserialize($detail['product_view']);
if ($detail_views) {
?>
<ul class="msul swt-Table">
<li class="Table-Row">
<div class="ms3 Table-Cell">Product Code</div>
<div class="ms2 Table-Cell"></div>
<div class="ms4 Table-Cell"><?php echo $detail['brand_id']; ?></div>
</li>
<?php foreach ($detail_views as $detail_view): ?>
<li class="Table-Row">
<div class="ms3 Table-Cell"><?php echo $detail_view['desc_title']; ?></div>
<div class="ms2 Table-Cell "></div>
<div class="ms4 Table-Cell"><?php echo $detail_view['desc_desc']; ?></div>
</li>
<?php endforeach; ?>
</ul>
<?php
}
}
?>
</div>
<!-- 规格参数 e -->
<?php if ($proimages): ?>
<div class="hd">
<ul>
<?php foreach ($proimages as $c => $imgclrs): $b = trim(strrchr($c, '/'), '/');
$b = substr($b, 0, strpos($b, '.')); ?>
<?php if ($c == '') { ?>
<?php } else { ?>
<li class="img-responsive<?php if ($c == $color): ?> on<?php endif; ?>">
<a <?php echo 'style="background: url(__PUBLIC__/web/images/' . $c . '.png);" href="__ORICOROOT__' . url_rewrite('productdetail', ['id' => $detail['id'], 'color' => $b]) . '"'; ?>><img
src="<?php echo $c; ?>" alt=""
style="width:10px; height: 10px; border-radius: 5px; margin:3px;"></a>
<?php } ?>
</li>
<?php endforeach; ?>
<?php if ($c == '') { ?>
<?php } else { ?>
<span>Color</span>
<?php } ?>
</ul>
</div>
<?php endif; ?>
<!--<div class="buy">
<?php if ($detail['url_tm']): ?>
<a href="<?php echo $detail['url_tm']; ?>" target="_blank" onclick="add_click(<?php echo $detail['id']; ?>, 3, '<?php echo $detail['url_tm']; ?>')">Buy Amazon</a>
<?php endif; ?>
<?php if ($detail['url_jd']): ?>
<a href="<?php echo $detail['url_jd']; ?>" target="_blank" onclick="add_click(<?php echo $detail['id']; ?>, 4, '<?php echo $detail['url_tm']; ?>')">Buy Newegg</a>
<?php endif; ?>
</div>-->
</div>
<div class="clear"></div>
</div>
<!-- 产品 e -->
</div>
</div>
<div class="warp">
<div class="warpa">
<!-- 锚链接 s -->
<ul class="cpa">
<li><a href="#link1">Product Description</a></li>
<li><a href="#link2">Related Products</a></li>
<li><a href="#link3">Related Download</a></li>
<!--<li><a href="#link4">评论</a></li>-->
<div class="clear"></div>
</ul>
<!-- 锚链接 e-->
</div>
<div class="swt-Container">
<!--产品详情-->
<div class="products_des"><?php echo $detail['ld_md_content']; ?></div>
</div>
<!-- 关联产品 s <?php //if ($product_relateds)print_r($product_relateds); ?>-->
<div class="warp2 proTfg">
<div class="swt-Container">
<div class="gltit" id="link2">Related Products</div>
<?php if ($product_relateds): ?>
<div class="cpBox">
<div class="owl-carousel">
<?php foreach ($product_relateds as $product):; ?>
<div class="item wow">
<?php $img = getProductReated($product['id']); ?>
<a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>">
<div class="glimg img-responsive"><img src="<?php echo $product['list_bk_img']; ?>">
<!--换成一级列表图--></div>
<div class="gltext">
<p class="gl1"><?php echo $product['name']; ?></p>
<p class="gl2"> <?php echo $product['brand_id']; ?></p>
<!-- <p class="gl2">-->
<?php //echo $product['shortname']; ?><!--</p>-->
</div>
<div class="clear"></div>
</a>
</div>
<?php endforeach; ?>
</div>
<script>
var owl = $(".cpBox .owl-carousel");
owl.owlCarousel({
autoplay: true,
navigationText: ["", ""],
responsive: {
0: {
items: 1,
margin: 0
},
420: {
items: 1,
margin: 0,
smartSpeed: 80,
dots: false
},
640: {
items: 2,
margin: 0,
smartSpeed: 80,
dots: false
},
998: {
items: 3,
margin: 0,
smartSpeed: 80,
dots: false
},
},
})
</script>
</div>
<?php endif; ?>
</div>
</div>
<!-- 相关下载 s -->
<?php if (!$product_dls) { ?>
<?php } else { ?>
<div class="nybox proTfg">
<div class="swt-Container">
<div class="sptit" id="link3">Related Download</div>
<?php
if ($product_dls):
$selectTypeArr = config("product_dltype");
$prodls = [];
foreach ($product_dls as $dlrow) {
$prodls[$dlrow['dl_type']][] = $dlrow;
}
?>
<?php foreach ($prodls as $type => $dlclrs): ?>
<div class="xz">
<p class="xztit"><?php echo isset($selectTypeArr[$type]) ? $selectTypeArr[$type] : ''; ?></p>
<?php foreach ($dlclrs as $dl): ?>
<p class="xz1"><a
href="__ORICOROOT__<?php echo url('/download/prodownload', ['id' => $dl['id']]); ?>"><i></i><?php echo $dl['dl_name']; ?>
</a></p>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
<?php } ?>
<!-- 相关下载 e -->
<script type="text/javascript">
$(function () {
var $category = $(".ans .anbox");
$category.hide();
$(".ans .antit").click(function () {
if ($(this).next(".anbox").is(":visible")) {
$(this).removeClass('on').next().slideUp(800);
$(this).parent('.ans').removeClass('on');
$(this).children("i").removeClass("ons")
} else {
$category.hide();
$(".ans .antit").removeClass('on');
$(this).children("i").addClass("ons")
$(this).addClass('on').next().slideDown(800);
$(this).parent('.ans').addClass('on');
}
});
});
$(function () {
$('a[href*=#],area[href*=#]').click(function () {
console.log(this.pathname)
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var $target = $(this.hash);
$target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']');
if ($target.length) {
var targetOffset = $target.offset().top - 50;
$('html,body').animate({
scrollTop: targetOffset
}, 800);
return false; //页面锚点跳转动画 后面的800是锚点跳转的时间 800ms
}
}
});
})
$(document).ready(function () {
//获取div-one距离顶部的距离
var navtop = $(".warpa").offset().top;
$(document).scroll(function () {
//获取滚动条滚动的高度
var scroltop = $(document).scrollTop();
if (scroltop > navtop) {
$(".warpa").css({
"position": "fixed",
"top": "0px",
"left": "0px",
"right": "0px",
"z-index": "999"
})
} else {
$(".warpa").css({
"position": "",
"top": "",
"left": "",
"right": "",
"z-index": ""
})
}
})
})
$("input").click(function () {
$(this).siblings("div").children("span").addClass("active");
$(this).parents("div").siblings("div").find("span").removeClass("active");
});
$(function () {
$(window).scroll(function () {
var arr = []
$.each($(".proTfg"), function (k, v) {
arr[k] = $(this).offset().top + $(this).height();
})
$.each(arr, function (k, v) {
if (($(window).scrollTop() + $(".cpa li").eq(k - 1).height() + 10) < v) {
if (!$(".cpa li").eq(k).hasClass("current")) {
$(".cpa li").eq(k).attr("class", "current").siblings().removeClass();
}
return false;
}
})
})
})
</script>
</div>
<div class="enlarge-img" style="display: none;">
<div class="scrollbutton_01 smallImgUp disabled"></div>
<img src="<?php echo getImage($firstimage); ?>">
<div class="scrollbutton_01 smallImgDown"></div>
<div class="close"><span class="icon-close"></div>
</div>
<!--详情新增样式-->
<script>
$(function () {
var obj = new commentMove('.tm-m-photos', '.tm-m-photo-viewer');
obj.init()
})
</script>
<script type="text/javascript">
window.onload = function () {
var oStar = document.getElementById("star");
var aLi = oStar.getElementsByTagName("li");
var oUl = oStar.getElementsByTagName("ul")[0];
var oSpan = oStar.getElementsByTagName("span")[1];
var oP = oStar.getElementsByTagName("p")[0];
var i = iScore = iStar = 0;
for (i = 1; i <= aLi.length; i++) {
aLi[i - 1].index = i;
//鼠标移过显示分数
aLi[i - 1].onmouseover = function () {
fnPoint(this.index);
//浮动层显示
oP.style.display = "block";
//计算浮动层位置
oP.style.left = oUl.offsetLeft + this.index * this.offsetWidth - 104 + "px";
//匹配浮动层文字内容
oP.innerHTML = "<em><b>" + this.index + "</b> 分 " + aMsg[this.index - 1].match(/(.+)\|/)[1] + "</em>" + aMsg[this.index - 1].match(/\|(.+)/)[1]
};
//鼠标离开后恢复上次评分
aLi[i - 1].onmouseout = function () {
fnPoint();
//关闭浮动层
oP.style.display = "none"
};
//点击后进行评分处理
aLi[i - 1].onclick = function () {
iStar = this.index;
oP.style.display = "none";
oSpan.innerHTML = "<strong>" + (this.index) + " 分</strong> (" + aMsg[this.index - 1].match(/\|(.+)/)[1] + ")"
}
}
//评分处理
function fnPoint(iArg) {
//分数赋值
iScore = iArg || iStar;
for (i = 0; i < aLi.length; i++) aLi[i].className = i < iScore ? "on" : "";
}
};
</script>
<script>
/*图片放大效果*/
$(".bigImg").click(function () {
$(".enlarge-img").show();
});
$(".enlarge-img .close").click(function () {
$(".enlarge-img").hide();
});
</script>
<script>
/*图片放大效果*/
$(".bigImg").click(function () {
$(".enlarge-img").show();
});
$(".enlarge-img .close").click(function () {
$(".enlarge-img").hide();
});
</script>
<!-- bottom s -->
{include file="include/bottom" /}
<!-- bottom e -->
</body>
</html>
<script type="text/javascript">
$(function() {
})
function add_click(content_id, type, url) {
$.ajax({
url: '/id/clicksum/add_click',
data: {
content_id: content_id,
type: type,
customer_id: 0,
country_code: 'TH',
url:url
},
type: 'post',
dataType: 'json',
success: function(res) {
}
})
}
</script>

View File

@@ -0,0 +1,212 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head-seo" /}
{include file="include/head" /}
<script type="text/javascript">
var navID = "1";
</script>
</head>
<body>
<!--top-->
<header class="header-PC header-Index">
<div id="header">
{include file="include/top" /}
{include file="include/top-header" /}
</div>
</header>
{include file="include/top-header-mobile" /}
<!--top End-->
{include file="include/catbanner" /}
<div class="ejbox">
<?php
$num = 1;
if(empty($subproductCategory)){
$hotproducts = getCategoryProduct($pid, 5);//dump($hotproducts);die;
?>
<div class="swt-Container day">
<div class="daytit"><?php echo $category['name']; ?></div>
<?php
$products = getCateColor($category['id'], 4, [], true,'sort');
if ($products):
?>
<dl class="ejul">
<?php foreach ($products as $product): ?>
<dd class="ej<?php echo $num; ?>">
<div class="ejimg bd">
<ul>
<?php foreach ($product['product_two_img'] as $v){ ?>
<li>
<a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $v['product_id']]); ?>" target="_blank">
<img src="<?php echo getImage($v['image_url']); ?>">
</a>
</li>
<?php }?>
</ul>
</div>
<div class="ejtext">
<div class="text1">
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['name']; ?></a></p>
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['brand_id']; ?></a></p>
</div>
<div class="hd">
<ul>
<?php foreach ($product['product_two_img'] as $imglist){?>
<?php if($imglist['image_color']==''){ }else{?>
<li class="img-responsive S-small-img">
<div class="cricle">
<img src="<?php echo $imglist['image_color']; ?>" alt="" class="S-Cricle-Bg">
</div>
</li>
<?php }};?>
</ul>
</div>
<script type="text/javascript">
jQuery(".ej<?php echo $num; ?>").slide({mainCell: ".bd ul", trigger: "click"});
</script>
<div class="clear"></div>
</div>
</dd>
<?php
$num++;
endforeach;
?>
<div class="clear"></div>
</dl>
<dl class="ejul ejul-show">
<?php $products = getCateColor($category['id'], ('4,100'), [], true);?>
<?php foreach ($products as $product): ?>
<dd class="ej<?php echo $num; ?>">
<div class="ejimg bd">
<ul>
<?php foreach ($product['product_two_img'] as $v){ ?>
<li>
<a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $v['product_id']]); ?>" target="_blank">
<img src="<?php echo getImage($v['image_url']); ?>">
</a>
</li>
<?php }?>
</ul>
</div>
<div class="ejtext">
<div class="text1">
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['name']; ?></a></p>
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['brand_id']; ?></a></p>
</div>
<div class="hd">
<ul>
<?php foreach ($product['product_two_img'] as $imglist){?>
<?php if($imglist['image_color']==''){ }else{?>
<li class="img-responsive S-small-img">
<div class="cricle">
<img src="<?php echo $imglist['image_color']; ?>" alt="" class="S-Cricle-Bg">
</div>
</li>
<?php }};?>
</ul>
</div>
<script type="text/javascript">
jQuery(".ej<?php echo $num; ?>").slide({mainCell: ".bd ul", trigger: "click"});
</script>
<div class="clear"></div>
</div>
</dd>
<?php
$num++;
endforeach;
?>
<div class="clear"></div>
</dl>
<?php $products = getCateColor($category['id'], null, [], true); if(count($products)<=4){?>
<?php }else{?>
<div class="ejmore">Click to expand</div>
<?php }?>
<?php endif; ?>
</div>
<?php
}else{
$hotproducts = getSonCategoryProduct($subproductCategory[0]['pid'], 5);
?>
<?php foreach ($subproductCategory as $spc) { ?>
<div class="swt-Container day">
<div class="daytit"><?php echo $spc['name']; ?></div>
<?php
$products = getCateColor($spc['id'], 100, [], true);//dump($products);die;
if ($products):
?>
<dl class="ejul">
<?php foreach ($products as $product): ?>
<dd class="ej<?php echo $num; ?>">
<div class="ejimg bd">
<ul>
<?php foreach ($product['product_two_img'] as $v){ ?>
<li>
<a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $v['product_id']]); ?>" target="_blank">
<img src="<?php echo getImage($v['image_url']); ?>">
</a>
</li>
<?php }?>
</ul>
</div>
<div class="ejtext">
<div class="text1">
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['name']; ?></a></p>
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['brand_id']; ?></a></p>
</div>
<div class="hd">
<ul>
<?php foreach ($product['product_two_img'] as $imglist){?>
<?php if($imglist['image_color']==''){ }else{?>
<li class="img-responsive S-small-img">
<div class="cricle">
<img src="<?php echo $imglist['image_color']; ?>" alt="" class="S-Cricle-Bg">
</div>
</li>
<?php }};?>
</ul>
</div>
<script type="text/javascript">
jQuery(".ej<?php echo $num; ?>").slide({mainCell: ".bd ul", trigger: "click"});
</script>
<div class="clear"></div>
</div>
</dd>
<?php
$num++;
endforeach;
?>
<div class="clear"></div>
</dl>
<?php endif; ?>
</div>
<?php } ?>
</div>
<?php } ?>
<!-- bottom s -->
{include file="include/bottom" /}
<!-- bottom e -->
</body>
</html>

View File

@@ -0,0 +1,271 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head-seo" /}
{include file="include/head" /}
<script type="text/javascript">
var navID = "1";
</script>
</head>
<body>
<!--top-->
<header class="header-PC header-Index">
<div id="header">
{include file="include/top" /}
{include file="include/top-header" /}
</div>
</header>
{include file="include/top-header-mobile" /}
<!--top End-->
{include file="include/catbanner" /}
<div class="ejbox">
<?php
$num = 1;
if(empty($subproductCategory)){
$hotproducts = getCategoryProduct($pid, 5);//dump($hotproducts);die;
?>
<div class="swt-Container day">
<div class="daytit"><?php echo $category['name']; ?></div>
<?php
$products = getCateColor($category['id'], 4, [], true,'sort');
if ($products):
?>
<dl class="ejul">
<?php foreach ($products as $product): ?>
<dd class="ej<?php echo $num; ?>">
<div class="ejimg bd">
<ul>
<?php foreach ($product['product_two_img'] as $v){ ?>
<li>
<a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $v['product_id']]); ?>" target="_blank">
<img src="<?php echo getImage($v['image_url']); ?>">
</a>
</li>
<?php }?>
</ul>
</div>
<div class="ejtext">
<div class="text1">
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['name']; ?></a></p>
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['brand_id']; ?></a></p>
</div>
<div class="hd">
<ul>
<?php foreach ($product['product_two_img'] as $imglist){?>
<?php if($imglist['image_color']==''){ }else{?>
<li class="img-responsive S-small-img">
<div class="cricle">
<img src="<?php echo $imglist['image_color']; ?>" alt="" class="S-Cricle-Bg">
</div>
</li>
<?php }};?>
</ul>
</div>
<script type="text/javascript">
jQuery(".ej<?php echo $num; ?>").slide({mainCell: ".bd ul", trigger: "click"});
</script>
<div class="clear"></div>
</div>
</dd>
<?php
$num++;
endforeach;
?>
<div class="clear"></div>
</dl>
<dl class="ejul ejul-show">
<?php $products = getCateColor($category['id'], ('4,100'), [], true);?>
<?php foreach ($products as $product): ?>
<dd class="ej<?php echo $num; ?>">
<div class="ejimg bd">
<ul>
<?php foreach ($product['product_two_img'] as $v){ ?>
<li>
<a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $v['product_id']]); ?>" target="_blank">
<img src="<?php echo getImage($v['image_url']); ?>">
</a>
</li>
<?php }?>
</ul>
</div>
<div class="ejtext">
<div class="text1">
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['name']; ?></a></p>
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['brand_id']; ?></a></p>
</div>
<div class="hd">
<ul>
<?php foreach ($product['product_two_img'] as $imglist){?>
<?php if($imglist['image_color']==''){ }else{?>
<li class="img-responsive S-small-img">
<div class="cricle">
<img src="<?php echo $imglist['image_color']; ?>" alt="" class="S-Cricle-Bg">
</div>
</li>
<?php }};?>
</ul>
</div>
<script type="text/javascript">
jQuery(".ej<?php echo $num; ?>").slide({mainCell: ".bd ul", trigger: "click"});
</script>
<div class="clear"></div>
</div>
</dd>
<?php
$num++;
endforeach;
?>
<div class="clear"></div>
</dl>
<?php $products = getCateColor($category['id'], null, [], true); if(count($products)<=4){?>
<?php }else{?>
<div class="ejmore">Click to expand</div>
<?php }?>
<?php endif; ?>
</div>
<?php
}else{
$hotproducts = getSonCategoryProduct($subproductCategory[0]['pid'], 5);
?>
<?php foreach ($subproductCategory as $spc) { ?>
<div class="swt-Container day">
<div class="daytit"><?php echo $spc['name']; ?></div>
<?php
$products = getCateColor($spc['id'], 4, [], true);//dump($products);die;
if ($products):
?>
<dl class="ejul">
<?php foreach ($products as $product): ?>
<dd class="ej<?php echo $num; ?>">
<div class="ejimg bd">
<ul>
<?php foreach ($product['product_two_img'] as $v){ ?>
<li>
<a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $v['product_id']]); ?>" target="_blank">
<img src="<?php echo getImage($v['image_url']); ?>">
</a>
</li>
<?php }?>
</ul>
</div>
<div class="ejtext">
<div class="text1">
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['name']; ?></a></p>
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['brand_id']; ?></a></p>
</div>
<div class="hd">
<ul>
<?php foreach ($product['product_two_img'] as $imglist){?>
<?php if($imglist['image_color']==''){ }else{?>
<li class="img-responsive S-small-img">
<div class="cricle">
<img src="<?php echo $imglist['image_color']; ?>" alt="" class="S-Cricle-Bg">
</div>
</li>
<?php }};?>
</ul>
</div>
<script type="text/javascript">
jQuery(".ej<?php echo $num; ?>").slide({mainCell: ".bd ul", trigger: "click"});
</script>
<div class="clear"></div>
</div>
</dd>
<?php
$num++;
endforeach;
?>
<div class="clear"></div>
</dl>
<dl class="ejul ejul-show">
<?php $products = getCateColor($spc['id'], ('4,100'), [], true);?>
<?php foreach ($products as $product): ?>
<dd class="ej<?php echo $num; ?>">
<div class="ejimg bd">
<ul>
<?php foreach ($product['product_two_img'] as $v){ ?>
<li>
<a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $v['product_id']]); ?>" target="_blank">
<img src="<?php echo getImage($v['image_url']); ?>">
</a>
</li>
<?php }?>
</ul>
</div>
<div class="ejtext">
<div class="text1">
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['name']; ?></a></p>
<p><a href="__ORICOROOT__<?php echo url_rewrite('productdetail', ['id' => $product['id']]); ?>"><?php echo $product['brand_id']; ?></a></p>
</div>
<div class="hd">
<ul>
<?php foreach ($product['product_two_img'] as $imglist){?>
<?php if($imglist['image_color']==''){ }else{?>
<li class="img-responsive S-small-img">
<div class="cricle">
<img src="<?php echo $imglist['image_color']; ?>" alt="" class="S-Cricle-Bg">
</div>
</li>
<?php }};?>
</ul>
</div>
<script type="text/javascript">
jQuery(".ej<?php echo $num; ?>").slide({mainCell: ".bd ul", trigger: "click"});
</script>
<div class="clear"></div>
</div>
</dd>
<?php
$num++;
endforeach;
?>
<div class="clear"></div>
</dl>
<?php $products = getCateColor($spc['id'], null, [], true); if(count($products)<=4){?>
<?php }else{?>
<div class="ejmore">Click to expand</div>
<?php }?>
<?php endif; ?>
</div>
<?php } ?>
</div>
<?php } ?>
<script>
$(function () {
$(".ejmore").click(function(){
$(this).siblings(".ejul-show").show();
$(this).hide();
})
});
</script>
<!-- bottom s -->
{include file="include/bottom" /}
<!-- bottom e -->
</body>
</html>