Commit 6a523957 authored by agping's avatar agping

修改

parent cfe2b325
...@@ -14,15 +14,49 @@ ...@@ -14,15 +14,49 @@
<link rel="stylesheet" href="/app/css/details_tl.css"> <link rel="stylesheet" href="/app/css/details_tl.css">
<link> <link>
</head> </head>
<style type="text/css">
.shop-img-list{
margin-top: 2rem;
width: 7.5rem;
overflow-x: scroll;
white-space: nowrap;
box-sizing: border-box;
padding-left: .36rem;
}
.shop-img-list>div{
display: inline-block;
position: relative;
}
.img_video_bofang{
position: absolute;
width: 3.2rem;
height: 2.38rem;
background: url(/app/images/img_logo@2x.png) no-repeat center center/.68rem .68rem;
}
.shop-img-list img{
width: 3.2rem;
height: 2.38rem;
border-radius:.1rem;
margin-right: .18rem;
}
</style>
<body style="background: #FFFFFF"> <body style="background: #FFFFFF">
<input type="hidden" id="open_id" value='{$data}' /> <input type="hidden" id="open_id" value='{$data}' />
<header class="m_part1_w"> <header class="m_part1_w">
<div class="u_btn1b" onclick="window.history.go(-1)" style="margin-top:0.1rem"><span style=""><i class="icon-angle-left" style="font-size:0.65rem"></i></span></div> <div class="u_btn1b" onclick="window.history.go(-1)" style="margin-top:0.1rem"><span style=""><i class="icon-angle-left" style="font-size:0.65rem"></i></span></div>
<div class="lp-bunner"> <!--<div class="lp-bunner">
<ul class="swiper-wrapper" id="img_item_ul"> <ul class="swiper-wrapper" id="img_item_ul">
</ul> </ul>
<span class="lp-bunner-page"> <span class="lp-index"> 1 </span> / <span class="lp-sum"> 50 </span> </span> <span class="lp-bunner-page"> <span class="lp-index"> 1 </span> / <span class="lp-sum"> 50 </span> </span>
</div>-->
<div class="shop-img-list">
<!--<div><img src="https://images.tonglianjituan.com//resource/lib/Attachments/video/20190409/20190409121637883.jpg" alt="" /></div>
<div><img src="https://images.tonglianjituan.com//resource/lib/Attachments/video/20190409/20190409121637883.jpg" alt="" /></div>
<div><img src="https://images.tonglianjituan.com//resource/lib/Attachments/video/20190409/20190409121637883.jpg" alt="" /></div>
<div><img src="https://images.tonglianjituan.com//resource/lib/Attachments/video/20190409/20190409121637883.jpg" alt="" /></div>
<div><img src="https://images.tonglianjituan.com//resource/lib/Attachments/video/20190409/20190409121637883.jpg" alt="" /></div>-->
</div> </div>
</header> </header>
<!--line 1--> <!--line 1-->
...@@ -267,6 +301,13 @@ ...@@ -267,6 +301,13 @@
</div> </div>
<!--点击任意视频 全屏显示(轮播)-->
<div class="lp-bunner" style="display: none;">
<ul class="swiper-wrapper" id="img_item_ul">
</ul>
<span class="lp-bunner-page"> <span class="lp-index"> 1 </span> / <span class="lp-sum"> 50 </span> </span>
</div>
<!--<script src="/app/js/jquery.js"></script>--> <!--<script src="/app/js/jquery.js"></script>-->
<script src="/app/js/jquery-1122-min.js" charset="UTF-8"></script> <script src="/app/js/jquery-1122-min.js" charset="UTF-8"></script>
<script src="/app/js/swiper.js"></script> <script src="/app/js/swiper.js"></script>
......
...@@ -120,10 +120,16 @@ ...@@ -120,10 +120,16 @@
} }
.lp-bunner { .lp-bunner {
position: relative; /*position: relative;
height: 5.2rem; height: 5.2rem;
overflow: hidden; overflow: hidden;
background: #aaa background: #aaa*/
position: absolute;
height: 53.2rem;
overflow: hidden;
background: #aaa;
top: 0;
z-index: 6666;
} }
.lp-bunner ul, .lp-bunner li { .lp-bunner ul, .lp-bunner li {
...@@ -145,6 +151,10 @@ ...@@ -145,6 +151,10 @@
width: 100%; width: 100%;
height: 100% height: 100%
} }
.lp-bunner video {
/*width: 100%;
height: 100%*/
}
.lp-bunner-page { .lp-bunner-page {
font-size: 0.26rem; font-size: 0.26rem;
......
...@@ -30,7 +30,9 @@ ...@@ -30,7 +30,9 @@
$.ajax({ $.ajax({
// url: "/app.php/app/getShopDetails", // url: "/app.php/app/getShopDetails",
url: ServerHostTempC + '/api/getShopDetail', // url: ServerHostTempC + '/api/getShopDetail',
url: 'https://api.tonglianjituan.com' + '/api/getShopDetail',//正式
data: { data: {
'id': _shangpuId, 'id': _shangpuId,
// 'site_area': _isC=='1'?1:3 // 'site_area': _isC=='1'?1:3
...@@ -171,9 +173,37 @@ ...@@ -171,9 +173,37 @@
$('.business-scope-details').html(response.data.business_scope); $('.business-scope-details').html(response.data.business_scope);
$('.decoration-details').html(has_decoration); $('.decoration-details').html(has_decoration);
var lp_img = response.data.images; //轮播图 var lp_img = response.data.images; //轮播图(图片)
var lp_video = response.data.shop_videos; //轮播图(视频)
var lp_img1 = response.data.plan_images; //楼层平面图 var lp_img1 = response.data.plan_images; //楼层平面图
var img_item_ul = ""; var img_item_ul = "";
var vadio_item_ul = "";
//滚动区域
for(var n = 0; n < lp_video.length; n++) {
img_item_ul += '<div class="luobo-shop-detail"><div class="img_video_bofang"></div><img src="' + response.data.shop_videos[n].video_image + '" onerror="src=\'/app/images/pzz_.jpg\'"/></div>'
};
for(var n = 0; n < lp_img.length; n++) {
img_item_ul += '<div class=""><img src="' + response.data.api_path + response.data.images[n].img_name + '" onerror="src=\'/app/images/pzz_.jpg\'"/></div>'
$(".shop-img-list").html(img_item_ul);
};
//滚动区域
//平面图 去掉 //平面图 去掉
// if(lp_img1.length == "0") { // if(lp_img1.length == "0") {
// $("#planter").hide(); // $("#planter").hide();
...@@ -182,9 +212,13 @@ ...@@ -182,9 +212,13 @@
// slider3 += '<div class="slide"><img src="' + response.data.api_path + response.data.plan_images[n].img_name + '"></div>' // slider3 += '<div class="slide"><img src="' + response.data.api_path + response.data.plan_images[n].img_name + '"></div>'
// $(".slider3").html(slider3); // $(".slider3").html(slider3);
// } // }
for(var n = 0; n < lp_video.length; n++) {//视频详情
vadio_item_ul += '<li class="swiper-slide swiper-slide-active" data-index="1" data-totalindex="1" data-class="101" data-sum="6" style="width: 414px;"><a><video src="' + response.data.shop_videos[n].video_path + '" controls="controls"></video></a></li>'
};
for(var n = 0; n < lp_img.length; n++) { for(var n = 0; n < lp_img.length; n++) {
img_item_ul += '<li class="swiper-slide swiper-slide-active" data-index="1" data-totalindex="1" data-class="101" data-sum="6" style="width: 414px;"><a><img src="' + response.data.api_path + response.data.images[n].img_name + '" onerror="src=\'/app/images/pzz_.jpg\'"/></a></li>' vadio_item_ul += '<li class="swiper-slide swiper-slide-active" data-index="1" data-totalindex="1" data-class="101" data-sum="6" style="width: 414px;"><a><img src="' + response.data.api_path + response.data.images[n].img_name + '" onerror="src=\'/app/images/pzz_.jpg\'"/></a></li>'
$("#img_item_ul").html(img_item_ul); $("#img_item_ul").html(vadio_item_ul);
}; };
...@@ -198,28 +232,7 @@ ...@@ -198,28 +232,7 @@
// map.addControl(new BMap.MapTypeControl()); //添加地图类型控件 // map.addControl(new BMap.MapTypeControl()); //添加地图类型控件
// map.setCurrentCity("上海"); // 设置地图显示的城市 此项是必须设置的 // map.setCurrentCity("上海"); // 设置地图显示的城市 此项是必须设置的
// map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放 // map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放
var swiper = new Swiper('.lp-bunner', {
preloadImages: false,
lazyLoading: true,
lazyLoadingOnTransitionStart: true,
onTransitionEnd: function(swiper) {
$('.lp-index').text(swiper.activeIndex + 1);
},
onInit: function(swiper) {
$('.lp-index').text(swiper.activeIndex + 1);
$('.lp-sum').text(swiper.imagesToLoad.length || swiper.imagesLoaded || $('img', '.lp-bunner').size());
}
});
var liWidth = $('.showBigClass li').click(function() {
$(this).addClass('on').siblings().removeClass('on');
var albumType = $(this).attr('data-index');
var $li = $(".shopBigBox .swiper-wrapper").find("[data-class=" + albumType + "]:first");
bimgSwiper.slideTo(+$li.data("totalindex") - 1, 500, true);
}).width();
typeSwiper = new Swiper('.showBigClass', {
width: liWidth ? liWidth : 52.5
});
//隐藏时间 //隐藏时间
if(shang == "0") { if(shang == "0") {
//商场 //商场
...@@ -327,6 +340,34 @@ ...@@ -327,6 +340,34 @@
}); });
} }
}); });
//点击 视频区域
$(document).on('click', '.luobo-shop-detail', function(e) {
console.log(55)
$('.lp-bunner').show();
var swiper = new Swiper('.lp-bunner', {
preloadImages: false,
lazyLoading: true,
lazyLoadingOnTransitionStart: true,
onTransitionEnd: function(swiper) {
$('.lp-index').text(swiper.activeIndex + 1);
},
onInit: function(swiper) {
$('.lp-index').text(swiper.activeIndex + 1);
$('.lp-sum').text(swiper.imagesToLoad.length || swiper.imagesLoaded || $('img', '.lp-bunner').size());
}
});
var liWidth = $('.showBigClass li').click(function() {
$(this).addClass('on').siblings().removeClass('on');
var albumType = $(this).attr('data-index');
var $li = $(".shopBigBox .swiper-wrapper").find("[data-class=" + albumType + "]:first");
bimgSwiper.slideTo(+$li.data("totalindex") - 1, 500, true);
}).width();
typeSwiper = new Swiper('.showBigClass', {
width: liWidth ? liWidth : 52.5
});
});
$("#fix_tel").click(function() { $("#fix_tel").click(function() {
var _time = localStorage.getItem(_tel+"_"+_shangpuId); var _time = localStorage.getItem(_tel+"_"+_shangpuId);
var _nowTime = (new Date()).getTime(); var _nowTime = (new Date()).getTime();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment