var mySwiper3= new Swiper(".y_lphomepc_cent_list .swiper-container2",{ loop : true, loopedSlides:4, autoplay:0, autoplayDisableOnInteraction : false, // 濡傛灉闇€瑕佸垎椤靛櫒 pagination: '.swiper-pagination', // 如果需要前进后退按钮 prevButton:'.swiper-button-prev', nextButton:'.swiper-button-next', slidesPerView :"auto" }); var mySwiper1= new Swiper(".swiper-container1",{ loop : false, autoplay:0, autoplayDisableOnInteraction : false, // 如果需要分页器 pagination: '.swiper-pagination', slidesPerView :"auto" }); // 图片 视频 切换 $(".liveBtn").on("click", function() { $(".liveBtn").addClass("SWactive"); $(".videoBtn").removeClass("SWactive"); $(".vrBtn").removeClass("SWactive"); $(".imgBtn").removeClass("SWactive"); swiper1.slideTo($(this).index(), 1000, false); $(".weizhi").show(); return false; }) $(".videoBtn").on("click", function() { $(".videoBtn").addClass("SWactive"); $(".liveBtn").removeClass("SWactive"); $(".imgBtn").removeClass("SWactive"); $(".vrBtn").removeClass("SWactive"); swiper1.slideTo($(this).index(), 1000, false); $(".weizhi").hide(); return false; }) $(".vrBtn").on("click", function() { $(".vrBtn").addClass("SWactive"); $(".liveBtn").removeClass("SWactive"); $(".imgBtn").removeClass("SWactive"); $(".videoBtn").removeClass("SWactive"); swiper1.slideTo($(this).index(), 1000, false); $(".weizhi").hide(); return false; }) $(".imgBtn").on("click", function() { $(".imgBtn").addClass("SWactive"); $(".liveBtn").removeClass("SWactive"); $(".videoBtn").removeClass("SWactive"); $(".vrBtn").removeClass("SWactive"); swiper1.slideTo($(this).index(), 1000, false); $(".weizhi").show(); return false; }) if ($('.carousel .swiper-slideVideo').length <= 0) { $('.carousel .swiper-pagination2').show(); }else{ $('.carousel .swiper-pagination2').hide(); } if ($('.vAndiCont div').length > 0) { $('.vAndiCont div').eq(0).addClass('SWactive'); }; var swiper1 = new Swiper('.case', { pagination: '.swiper-pagination2', paginationClickable: true, updateOnImagesReady: true, lazyLoading: true, lazyLoadingInPrevNext: true, lazyLoadingInPrevNextAmount: 2, onSlideChangeStart: function(swiper) { var sliderIndex = swiper.activeIndex; $("#slideVideo").trigger('pause'); $(".video_btn").show(); $('.js_vAndiCont div').eq(sliderIndex).addClass('SWactive').siblings().removeClass('SWactive'); } }); // 户型 // function lptype_hx(){ // var html = ''; // $.ajax({ // url: "/house/tall", // data:{city:hid}, // type: "POST", // dataType: "json", // success: function(data) {//请求成功完成后要执行的方法 // if (data.code == 200) { // $.each(data.data, function (i, data) { // html += '
  • '; // html += ''; // html += '
    '; // html += '
    '; // html += '

    A户型

    '; // html += '

    三房两厅

    '; // html += '

    建筑面积:105㎡

    '; // html += '
    '; // html += '
    '; // html += '
  • '; // }); // $('.lphomeV2type_ul ul').html(html); // } // } // }); // } // var hid = $('.lphomeV2type_nva a').eq(0).attr('data-id'); // $('.lphomeV2type_nva a').eq(0).attr('class','on'); // $('.lphomeV2type_nva a').on('click',function(){ // hid = $(this).attr('data-id'); // $(this).attr('class','on').siblings().attr('class',''); // lptype_hx (); // }) // lptype_hx (); // 热销楼盘 选项卡 function lpindex_lp (){ var html = ''; $.ajax({ url: "/json/tall", data:{city:hid,price:price}, type: "POST", dataType: "json", success: function(data) {//请求成功完成后要执行的方法 if (data.code == 200) { $.each(data.data, function (i, data) { html += '
  • '; html += '
    '; html += ''; html += '
    '; html += '

    '; html += '

    '+data.city_name+'

    '; html += '
    '; if(data.vr_path){ html += '
    '; } if(data.video_url){ html += '

    '; } html += '
    '; if(data.panorama){ html += '

    航拍实景

    '; } html += '
    '; html += '
    '; html += '

    ' + data.name + '

    '; if(data.sale_price != 0 || data.sale_price != '' || data.sale_price != null){ html += '

    ' + data.sale_price + '' + data.price_unit + '

    '; }else{ html += '

    待定

    '; } html += '

    有效期至:'+htmltime1+'

    '; html += '

    '; html += ''+data.state+''; if( data.characteristic){ for (k in data.characteristic) { if(k< 2){ html += '' + data.characteristic[k] + ''; } } } html += '

    '; html += '
    '; html += '
    '; if(data.preferential){ html += '
    '; html += ''; html += ''; html += '优惠活动'; html += '|'; var zhTxt= data.preferential; var maxwidth=21; if(zhTxt.length>maxwidth){ html += ''+zhTxt.substring(0,maxwidth)+'...'; }else{ html += ''+zhTxt+''; } html += ''; html += '
    '; } html += '
    '; html += '
    '; html += '免费电话'; html += '
    '; html += '
  • '; }); $('.y_lphometj_cent_list').html(html); } } }); } var hid = $('.y_lphometj_h li').eq(0).attr('data-id'); var price = null; $('.y_lphometj_h li').eq(0).attr('class','on'); $('.y_lphometj_h li').on('click',function(){ if($(this).attr('name') == 'price'){ price = $(this).attr('data-id'); //hid = null hid = $(this).siblings().attr('data-id'); }else if($(this).attr('name') == 'city'){ hid = $(this).attr('data-id'); price = null; } $(this).attr('class','on').siblings().attr('class',''); lpindex_lp (); }) lpindex_lp (); // $('.d_hide').hide(); $(".d_show").click(function(){ $(".anone").removeClass("anone"); $('.d_hide').show(); $(this).hide(); }) $(".d_hide").click(function(){ $(".d_toggle").addClass("anone"); $(".d_show").show(); $(this).hide(); }) // 楼盘首页地图 $(function(){ //获取周边配套 $('.y_lpdt_list ul li a').on('click',function(){ // $(this).addClass('on').siblings().removeClass('on'); var _data = $(this).find('p.y_text').text(); //选择中的内容 var _longitude =$('#y_lpmap').attr('data-jwd'); //获取经纬度 var pintx = _longitude.split(',')[0]; var pinty = _longitude.split(',')[1]; _longitude = new BMap.Point(pintx,pinty); doSearch(_data,_longitude);//调用地图弹窗 }) // var time_n=''; // var time_y=''; // var deta_time=$('.lphomeV2news_ul .left_deta').attr('data-time'); // if (deta_time) { // if(deta_time.indexOf("-")!=-1){ // var hutime_arr = deta_time.split('-'); // for(var j = 0; j < hutime_arr.length; j++){ // huxing1=hutime_arr[0]; // huxing2=hutime_arr[1]+'/'+hutime_arr[2]; // }; // } // $('.lphomeV2news_ul .left_deta p.deta_yue').html(huxing2); // $('.lphomeV2news_ul .left_deta p.deta_nian span').html(huxing1); // }; }); // console.log($('#y_lpmap').length >0) if($('#y_lpmap').length >0){ //判断页面是否存在 标签, // 百度地图API功能 var map = new BMap.Map("y_lpmap"); var _lTude =$('#y_lpmap').attr('data-jwd'); //获取经纬度 var _lJg =$('#y_lpmap').attr('data-jg'); //获取楼盘价格 var _lTitle =$('#y_lpmap').attr('data-title'); //获取楼盘标题 var pintx = _lTude.split(',')[0]; var pinty = _lTude.split(',')[1]; _lTude = new BMap.Point(pintx,pinty); map.centerAndZoom(_lTude, 15); map.enableScrollWheelZoom(); //启用滚轮放大缩小,默认禁用 // 复杂的自定义覆盖物 function ComplexCustomOverlay(_lTude, text, mouseoverText){ this._point = _lTude; this._text = text; this._overText = mouseoverText; } ComplexCustomOverlay.prototype = new BMap.Overlay(); ComplexCustomOverlay.prototype.initialize = function(map){ this._map = map; var div = this._div = document.createElement("div"); div.style.position = "absolute"; div.style.zIndex = BMap.Overlay.getZIndex(this._point.lat); div.style.backgroundColor = "#fff"; div.style.border = "1px solid #e1e1e1"; div.style.color = "666"; // div.style.height = "18px"; div.style.padding = "5px 10px"; // div.style.lineHeight = "10px"; div.style.whiteSpace = "nowrap"; // div.style.MozUserSelect = "none"; div.style.fontSize = "14px" var span = this._span = document.createElement("span"); div.appendChild(span); span.appendChild(document.createTextNode(this._text)); var that = this; var arrow = this._arrow = document.createElement("div"); arrow.style.background = "url(/overseas/img/ico_map1.png) no-repeat center"; arrow.style.backgroundSize = "100%"; arrow.style.position = "absolute"; arrow.style.width = "20px"; arrow.style.height = "28px"; arrow.style.top = "30px"; arrow.style.left = "25px"; arrow.style.overflow = "hidden"; div.appendChild(arrow); div.onmouseover = function(){ this.style.backgroundColor = "#6BADCA"; this.style.borderColor = "#3487ab"; this.getElementsByTagName("span")[0].innerHTML = that._overText; arrow.style.backgroundPosition = "0px -20px"; } div.onmouseout = function(){ this.style.backgroundColor = "#EE5D5B"; this.style.borderColor = "#BC3B3A"; this.getElementsByTagName("span")[0].innerHTML = that._text; arrow.style.backgroundPosition = "0px 0px"; } map.getPanes().labelPane.appendChild(div); return div; } ComplexCustomOverlay.prototype.draw = function(){ var map = this._map; var pixel = map.pointToOverlayPixel(this._point); this._div.style.left = pixel.x - parseInt(this._arrow.style.left) -13 + "px"; this._div.style.top = pixel.y - 45 + "px"; } var txt = _lTitle, mouseoverTxt = txt + " " + _lJg ; var myCompOverlay = new ComplexCustomOverlay(_lTude, _lTitle ,mouseoverTxt); map.addOverlay(myCompOverlay); //map展现结果的地图实例 //autoViewport检索结束后是否自动调整地图视野,false 不调整地图视野 var local = new BMap.LocalSearch(map,{renderOptions:{map:map,autoViewport:true}}); //地址检索 function doSearch(Odata,Opoint){ var address = Odata; local.searchNearby(address,Opoint); } } $(function(){ $('.y_centerpc').find('img').each(function(){ var $that = $(this); var _alt = $that.attr('alt'); if(_alt != 'code'){ $that.removeAttr('width'); $that.removeAttr('height'); $that.css({'display':'block','width':'100%','height':'auto'}); } }) $('.js_y_yxq').text('有效期至:'+htmltime1); var randomX = 0; var randomY = 14; var randvalue = parseInt(Math.random() * (randomX - randomY + 1) + randomY); $('.yv2Home_zx_r img').attr('src','/overseas/img/v2image/tx_ico'+randvalue+'.png'); }) // 处理资讯详情页面的底部一个月的有效日期 var myDate = new Date; var year = myDate.getFullYear(); //获取当前时间年份 var yue = myDate.getMonth()+1;//获取当前时间月份 if (yue<10) { yue= '0' + yue; }else if(yue == 13){ yue = '01'; }; // 返回下个月有多少天数 function mGetDate(yue){      var date = new Date();      var year = date.getFullYear();      var d = new Date(year,parseInt(yue), 0); return d.getDate(); } var htmltime = year + '/'+ yue + '/' +'01'+'-'+ year + '/'+ yue + '/' + mGetDate(yue); var htmltime1 = year + '.'+ yue + '.' + mGetDate(yue); /* * 楼盘预售许可证弹窗 * */ $(function(){ var lic_id; //为了这些变量在其它地方用; $('.y_ckysz').on('click',function(){ var $that = $(this); var height = $('.y_licence').outerHeight(); var width = $('.y_licence').outerWidth(); CreatePopLayerDivlp(width,width,'/public/licence'); $('#offDivlp').css({'top':height+'px'}).animate({top:'20%'}) // 向弹窗传数据 parent.lic_id = $that.attr('data-id'); //把楼盘名称传向父级 }) // 看房定制数量修改 var random = Math.floor(Math.random()*150+101); // console.log(random) $('.y_lpkfdz_dzrs span em').html(random) }) //创建一个弹出层,width 宽度,height 高度,url function CreatePopLayerDivlp(width,height,url){ var Iheight=$(window).outerHeight(); var Iwidth =$(window).outerWidth(); var heights = height || 300; var widths = width || 500; var Oheight= (Iheight -heights) / 2; var Owidth = (Iwidth - widths) /2; var div ='
    '; div+='
    '; div+='
    '; div+='
    '; div+='
    '; $(document.body).append(div); if(url != ""){ $("#Contentlp").load(url); } } //移除弹出层 function RemoveDiv1(){ $("#InDivlp").remove(); $("#offDivlp").remove(); } function btnCloses1(){ RemoveDiv1(); } //项目分析 $(function () { $(window).scroll(function () { var top = $(window).scrollTop(); if (top > 240) { $('.home_analyze').fadeIn(800); } else { $('.home_analyze').fadeOut(800); } }); }) $(function(){ $('#wdemo06').navbarscroll({ defaultSelect:0, scrollerWidth:3, fingerClick:0, endClickScroll:function(obj){ // console.log(obj.text()) } }); //报名验证提交的调用 var fun = { "error" : function(){ PublicAction.hint("提交末成功!"); //编写需要操作的方法 }, "success" : function(){ PublicAction.hint("提交成功!"); //编写需要操作的方法 $('body input[type="text"]').val('') RemoveDiv(); //数据提交成功后关闭弹出层 } } PublicAction.AjaxSend({CORID:'apply_submit'},fun); })