Files
2024-10-29 14:04:59 +08:00

210 lines
7.0 KiB
PHTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head" /}
<script type="text/javascript">
var navID = "1";
</script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/m_web/js/bxslider/goods.bxslider.css">
<script type="text/javascript" src="__PUBLIC__/m_web/js/bxslider/jquery.bxslider.min.js"></script></head>
<body>
<!--top-->
<div id="content">
<!--头部-->
{include file="include/top" /}
<!--产品地址-->
<div class="m_Container">
<div class="goods_address">
<a href="/mobile" class="href_01">首页</a>
<?php if ($pid): ?>
<span class="icon-arrow arrow_address"></span>
<a href="/mobile/product/catelists/id/<?php echo $pid['id']; ?>" class="href_02"><?php echo $pid['name']; ?></a>
<?php endif; ?>
<?php if ($cid): ?>
<span class="icon-arrow arrow_address"></span>
<a href="/mobile/product/subcatelists/id/<?php echo $cid['id']; ?>" class="href_02"><?php echo $cid['name']; ?></a>
<?php endif; ?>
</div>
</div>
<!--产品主图-->
<?php if (!empty($product_images)): ?>
<div class="m_Container">
<ul class="goods_list">
<?php foreach ($product_images as $key => $value): ?>
<li><img src="<?php echo getImage($value['image_url']); ?>"></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<!--规格参数-->
<div class="m_Container">
<div class="goods_all_title">
<div class="title"><?php echo $detail['name']; ?></div>
<div class="subtitle"><?php echo $detail['shortname']; ?></div>
</div>
<div class="proTfg">
<ul class="msul swt-Table">
<li class="Table-Row">
<div class="ms1 Table-Cell">型号</div>
<div class="ms2 Table-Cell"></div>
<div class="ms3 Table-Cell"><?php echo $detail['brand_id']; ?></div>
</li>
<?php if ($detail['product_view']): ?>
<?php $detail_views = unserialize($detail['product_view']); ?>
<?php foreach ($detail_views as $key => $value): ?>
<li class="Table-Row">
<div class="ms1 Table-Cell"><?php echo $value['desc_title']; ?></div>
<div class="ms2 Table-Cell"></div>
<div class="ms3 Table-Cell"><?php echo $value['desc_desc']; ?></div>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
<div class="platform_buy">
<a>天猫购买</a>
<a>京东购买</a>
</div>
</div>
<!--详情-->
<div class="goods_details">
<ul class="cpa">
<li><a href="#link1">产品描述</a></li>
<li><a href="#link2">关联产品</a></li>
<li><a href="#link4">评论</a></li>
<div class="clear"></div>
</ul>
</div>
<div class="goods_des img-responsives">
<?php echo $detail['ld_md_content']; ?>
<!-- <img src="__PUBLIC__/m_web/images/products/des-01.jpg">
<img src="__PUBLIC__/m_web/images/products/des-02.jpg">
<img src="__PUBLIC__/m_web/images/products/des-03.jpg">
<img src="__PUBLIC__/m_web/images/products/des-04.jpg">
<img src="__PUBLIC__/m_web/images/products/des-05.jpg">
<img src="__PUBLIC__/m_web/images/products/des-06.jpg">
<img src="__PUBLIC__/m_web/images/products/des-07.jpg">
<img src="__PUBLIC__/m_web/images/products/des-08.jpg"> -->
</div>
<div class="m_Container goods_Related">
<div class="text_center title goods_Related_title">关联产品</div>
<?php if ($product_relateds): ?>
<ul class="goods_Related_list">
<?php foreach ($product_relateds as $key => $value): ?>
<li class="text_center">
<div class=""><img src="<?php echo getImage($value['list_bk_img']); ?>"></div>
<span class="title"><?php echo $value['name']; ?></span>
<span class="subtitle"><?php echo $value['brand_id']; ?></span>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
<!--评论-->
<div class="m_Container goods_Related">
<div class="text_center title">评论</div>
<?php if ($list): $list = $list->items(); ?>
<?php foreach ($list as $key => $value): ?>
<div class="goods_comment">
<span class="title"><?php echo $value['auctionSku']; ?></span>
<span class="subtitle"><?php echo $value['displayUserNick'], $value['rateDate']; ?></span>
<span class="subtitle"><?php echo $value['rateContent']; ?></span>
<?php if ($value['pics']): ?>
<div class="goods_comment_img">
<ul>
<?php foreach ($value['pics'] as $k => $v): ?>
<li><img src="<?php echo getImage($v); ?>" class=""></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
<!--大图-->
<div class="big_img">
<div class="swiper-container2">
<div class="swiper-wrapper"> </div>
</div>
</div>
<!--底部文件-->
{include file="include/bottom" /}
</div>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/m_web/js/Click_enlarge/swiper.min.css"/>
<script type="text/javascript" src="__PUBLIC__/m_web/js/Click_enlarge/swiper.min.js"></script>
<script type="text/javascript">
/*banner*/
$(function(){
$('.goods_list').bxSlider({
});
});
/*关联产品*/
var htmlfontSize=$("html").css('font-size'); // 获取字体大小
var reg = /\d+/;
var bxSliderWidth = (htmlfontSize.match(reg)[0] * 5.04);
var slideMarginWidth = (htmlfontSize.match(reg)[0] * 0.58);
//alert(slideMarginWidth);
$(function(){
$('.goods_Related_list').bxSlider({
autoControls: true,
pager:false,
minSlides: 3,
maxSlides: 3,
slideWidth: bxSliderWidth,
slideMargin: slideMarginWidth,
infiniteLoop:false,
});
});
/*评论点击放大功能*/
$(document).ready(function(){
/*调起大图 S*/
var mySwiper = new Swiper('.swiper-container2', {
loop: false,
pagination: '.swiper-pagination2',
})
$(".goods_Related").on("click", ".goods_comment_img img",
function() {
var imgBox = $(this).parents(".goods_comment_img").find("img");
var i = $(imgBox).index(this);
$(".big_img .swiper-wrapper").html("")
for(var j = 0 ,c = imgBox.length; j < c ;j++){
$(".big_img .swiper-wrapper").append('<div class="swiper-slide"><div class="cell"><img src="' + imgBox.eq(j).attr("src") + '" / ></div></div>');
}
mySwiper.updateSlidesSize();
mySwiper.updatePagination();
$(".big_img").css({
"z-index": 1001,
"opacity": "1"
});
mySwiper.slideTo(i, 0, false);
return false;
});
$(".big_img").on("click",
function() {
$(this).css({
"z-index": "-1",
"opacity": "0"
});
});
});
/*调起大图 E*/
</script>
</body>
</html>