123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516 |
- 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 += '<li class="clearfix">';
- // html += '<a href="">';
- // html += '<div class="left_img"><img src="" alt=""></div>';
- // html += '<div class="right_text">';
- // html += '<p>A户型</p>';
- // html += '<p>三房两厅</p>';
- // html += '<p>建筑面积:105㎡</p>';
- // html += '</div>';
- // html += '</a>';
- // html += '</li>';
- // });
- // $('.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 += '<li>';
- html += '<div class="sell_conterBox">';
- html += '<a href="/house/' + data.id + '">';
- html += '<div class="sell_conterBox_l">';
- html += '<p class="img"><img src="'+data.thumb+'" alt=""></p>';
- html += '<p class="city">'+data.city_name+'</p>';
- html += '<div class="sdin">';
- if(data.vr_path){
- html += '<div class="vvid_pic_ico vr-animation-forever"></div>';
- }
- if(data.video_url){
- html += '<p class="vid_ico"><img src="/overseas/img/v2image/v2_ico5.png" alt=""></p>';
- }
- html += '</div>';
- if(data.panorama){
- html += '<p class="hangpai">航拍实景</p>';
- }
- html += '</div>';
- html += '<div class="sell_conterBox_r">';
- html += '<h2 class="title">' + data.name + '</h2>';
- if(data.sale_price != 0 || data.sale_price != '' || data.sale_price != null){
- html += '<p class="pric"><span>' + data.sale_price + '</span>' + data.price_unit + '</p>';
- }else{
- html += '<p class="pric"><span>待定</span></p>';
- }
- html += '<p class="time">有效期至:'+htmltime1+'</p>';
- html += '<p class="style">';
- html += '<i>'+data.state+'</i>';
- if( data.characteristic){
- for (k in data.characteristic) {
- if(k< 2){
- html += '<span>' + data.characteristic[k] + '</span>';
- }
- }
- }
- html += '</p>';
- html += '</div>';
- html += '</a>';
- if(data.preferential){
- html += '<div class="lp_zk">';
- html += '<span>';
- html += '<img src="/overseas/img/v2image/v2_ico6.png" alt="">';
- html += '<b>优惠活动</b>';
- html += '<i>|</i>';
- var zhTxt= data.preferential;
- var maxwidth=21;
- if(zhTxt.length>maxwidth){
- html += '<em>'+zhTxt.substring(0,maxwidth)+'...</em>';
- }else{
- html += '<em>'+zhTxt+'</em>';
- }
- html += '</span>';
- html += '</div>';
- }
- html += '</div>';
- html += '<div class="lp_tell">';
- html += '<a href="tel:' + data.tel + '"><img src="/overseas/img/pulic_ico3.png" alt="">免费电话</a>';
- html += '</div>';
- html += '</li>';
- });
- $('.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 id="InDivlp" style="width:'+Iwidth+'px;height:'+Iheight+'px;background:rgba(0,0,0,0.6);position:fixed;z-index:10000;top:0;left:0;">';
- div+='<div id="offDivlp" style=" width:100%; height:100%; left:0px; top:30%; position:fixed;z-index:100003;">';
- div+='<div id="Contentlp"></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);
- })
|