123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721 |
- $(function (){
- var mySwiper1= new Swiper(".swiper-container1",{
-
- loopedSlides:4,
- autoplay:5500,
- autoplayDisableOnInteraction : false,
-
- pagination : '.swiper-pagination',
- paginationType : 'custom',
- paginationCustomRender: function (swiper, current, total) {
- return current + ' / ' + total;
- },
- });
- var mySwiper1= new Swiper("#swiper1",{
- loop : true,
- loopedSlides:4,
- autoplay:5500,
- autoplayDisableOnInteraction : false,
-
-
- slidesPerView :"auto"
- });
- var mySwiper = new Swiper ('.y_lphomepc_cent_list .swiper-container2', {
- loop : true,
- loopedSlides:4,
- autoplay:5500,
-
- pagination: '.swiper-pagination',
-
- prevButton:'.swiper-button-prev',
- nextButton:'.swiper-button-next',
- slidesPerView :"auto"
- })
- })
- var mySwiper = new Swiper('#wcon',{
-
-
-
- slidesPerView: 'auto',
- touchRatio: 0.5,
- slideToClickedSlide: true
- })
-
- $(function(){
-
- $('.y_lpdt_list ul li a').on('click',function(){
- $('.y_lpdt_list ul li a').removeClass('on');
- $(this).addClass('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 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.padding = "5px 10px";
-
- div.style.whiteSpace = "nowrap";
-
- 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(../../image/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);
- 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'});
- }
- })
- $('.y_lphomejg p.y_yxq span').text(yxqtime);
- })
- $(function(){
- var lic_id;
- $('.y_ckysz').on('click',function(){
- var $that = $(this);
- var height = $('.y_licence').outerHeight();
- var width = $('.y_licence').outerWidth();
- CreatePopLayerDiv2(width,width,'/public/licence');
- $('#offDiv1').css({'top':height+'px'}).animate({top:'20%'})
-
- parent.lic_id = $that.attr('data-id');
- })
-
- var random = Math.floor(Math.random()*150+101);
-
- $('.y_lpkfdz_dzrs span em').html(random)
-
- $('.info_xllist li').each(function(){
- var acreage = $(this).attr("size");
-
-
- if(acreage.indexOf('m') != -1){
- var akx = acreage.split("m");
- $(this).attr("size",parseInt(akx[0]));
- if(akx[0].indexOf('-') != -1){
- var ak = acreage.split("-");
- $(this).attr("size",parseInt(ak[0]));
- }
- }
- if(acreage.indexOf('-') != -1){
- var ak = acreage.split("-");
- $(this).attr("size",parseInt(ak[0]));
- }
- })
-
- var _listhtml = $('.info_xllist li').eq(0).html();
- $('.info_xl span').html(_listhtml);
- var doughnutData;
- var _jiage = $('.jiage').html();
- var unit = $('.unit').html()
- var _Size = $('.info_xllist li').eq(0).attr('Size');
-
- _Size = (_Size.indexOf('约') != -1) ? _Size.slice(_Size.indexOf('约')+1) : _Size;
- var price = (unit.indexOf('万') != -1) ? _jiage : Math.ceil((_jiage * _Size) /10000);
- if(!(unit.indexOf('万') != -1)){
- $('body').on('click','.info_xl',function(){
- $('.info_xllist').toggle();
- })
- }else{
- $('.info_xl').css({"background":"#fff"});
- $('.info_xl').html('主力户型');
- }
- Calculation();
-
- $('.info_xllist li').on('click',function(){
- _Size = $(this).attr('Size');
- _Size = (_Size.indexOf('约') != -1) ? _Size.slice(_Size.indexOf('约')+1) : _Size;
- _listhtml = $(this).html();
- $('.info_xl span').html(_listhtml);
- price = Math.ceil((_jiage * _Size) /10000)
-
- $('.info_xllist').hide();
- Calculation();
- })
- function Calculation(){
- var cal = new Calculator();
- var firstPay=Math.round(price * 0.3 * 100) / 100;
- var biz=Math.round((price - firstPay) * 100) / 100;
- var data1 = cal.loanResult({
- type: 2,
- total:price,firstPay: firstPay,acc:0,biz:biz,rate:0,year: 20,calType:2
- }, 2);
- $(".perMonth").text(Math.round(data1.perMonthPay*10000*100)/100);
- $("#totalPay").text(price);
- $("#firstPay").text(firstPay);
- $("#loanPrice").text(biz);
- $("#interset").text(data1.interestPay);
-
- doughnutData = [{
- value: firstPay,
- color: "#007AF5"
- },{
- value: biz,
- color: "#FFA245"
- },{
- value: Math.round(data1.interestPay * 100) / 100,
- color: "#62BE4B"
- }];
-
-
- }
- var myDoughnut = new Chart(document.getElementById("canvas_fdck").getContext("2d")).Doughnut(doughnutData, {
- animation: true,
- animationEasing : "easeOutQuart",
- height:145,
- width:145,
- });
- })
- function CreatePopLayerDiv2(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="InDiv1" 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="offDiv1" style=" width:100%; height:100%; left:0px; top:30%; position:fixed;z-index:100003;">';
- div+='<div id="Content1"></div>';
- div+='</div>';
- div+='</div>';
- $(document.body).append(div);
- if(url != ""){
- $("#Content1").load(url);
- }
- }
- function RemoveDiv1(){
- $("#InDiv1").remove();
- $("#offDiv1").remove();
- }
- function btnCloses1(){
- RemoveDiv1();
- }
- function getNextMonth(date) {
- var arr = date.split('/');
- var year = arr[0];
- var month = arr[1];
- var day = arr[2];
- var days = new Date(year, month, 0);
- days = days.getDate();
- var year2 = year;
- var month2 = parseInt(month) + 2;
- if (month2 > 13) {
- year2 = parseInt(year2) + 1;
- if (parseInt(month)==11) {
- month2 = 1;
- }else if (parseInt(month)==12) {
- month2 = 2;
- };
- }
- var day2 = day;
- var days2 = new Date(year2, month2, 0);
- days2 = days2.getDate();
- if (day2 > days2) {
- day2 = days2;
- }
- if (month2 < 10) {
- month2 = '0' + month2;
- }
- var t2 = year2 + '/' + month2 + '/' + day2;
- return t2;
- }
- var myDate = new Date;
- var year = myDate.getFullYear();
- var yue = myDate.getMonth()+1;
- if (yue<10) {
- yue= '0' + yue;
- };
- var time = year+'/'+yue+'/01';
- var time_yxq= year+'/'+yue+'/01-'+getNextMonth(time);
- var yxqtime=time+'-'+getNextMonth(time);
- $(function(){
-
- var obj = new Object();
-
- $('.remark-btn').on('click',function(){
- var _this = $(this);
- var txt = _this.siblings('textarea[name="content"]').val();
- if(txt != ''){
- obj.content = txt;
- $('.w_up_ap').fadeIn();
- $('.w_up_ap').animate({top:"50%"});
- $('.cover').fadeIn();
- }else{
- var M = {};
- if(M.dialog1){
- return M.dialog1.show();
- }
- M.dialog1 = jqueryAlert({
- 'content' : '点评内容不能为空!',
- 'closeTime' : 2000,
- })
- }
- })
-
- $('.w_sbtn').on('click',function(){
- var hid = $('.w_up_info').find('input[name="hid"]').val();
- var tel = $('.w_up_info').find('input[name="mobile"]').val();
- tel = FilterHTMLTag(tel);
- if(PhoneVerification(tel)){
- obj.mobile = tel;
- obj.hid = hid;
- DataAjax(obj);
- }else{
- var M = {};
- if(M.dialog1){
- return M.dialog1.show();
- }
- M.dialog1 = jqueryAlert({
- 'content' : '请输入正确的电话码!',
- 'closeTime' : 2000,
- })
- }
-
- })
-
- function FilterHTMLTag(htmlStr){
- var msg = htmlStr.replace(/<\/?[^>]*>/g, '');
- return msg;
- }
-
- function PhoneVerification(tel) {
- var pattern = /(13\d|14[57]|15[^4,\D]|17[678]|18\d)\d{8}$|170[059]\d{7}$/;
- return pattern.test(tel);
- }
-
- $('.cover').on('click',function(){
- $('.w_up_ap').fadeOut();
- $('.w_up_ap').animate({top:"-100%"});
- $(this).fadeOut();
- })
- $('.ws_up_cls').on('click',function(){
- $('.w_up_ap').fadeOut();
- $('.w_up_ap').animate({top:"-100%"});
- $('.cover').fadeOut();
- })
-
- function DataAjax(data){
- $.ajax({
- url:'/house/remarkfrom',
- type:'post',
- data:data,
- dataType:"json",
- success:function(data){
- if(data.code == 200){
- var M = {};
- if(M.dialog1){
- return M.dialog1.show();
- }
- M.dialog1 = jqueryAlert({
- 'content' : '提交成功!',
- 'closeTime' : 2000,
- })
- $('.w_up_ap').fadeOut();
- $('.w_up_ap').animate({top:"-100%"});
- $('.cover').fadeOut();
- }
- }
- });
- }
- })
-
- $(window).scroll(function (){
- var st = $(this).scrollTop();
- if(st >250){
- $('.y_lpindexnav').show();
-
- }else{
- $('.y_lpindexnav').hide();
-
- }
- });
- var Homeurl=window.location.href
- $(function(){
- var telurl=$('.y_modtel .y_modtel_text p.y_call span').html();
- if(Homeurl.indexOf("?source=pc")!=-1){
- return window.location.href = 'tel:'+telurl;
- };
- })
- var ster = 0;
- $(window).scroll(function (){
- ster = $(this).scrollTop();
- });
- var _top = '';
- $('.m_Article_click a').on('click',function(){
- $('.Developers_tc').fadeIn(80);
- $('.Developers_tx').animate({bottom:'0%'},400);
- _top = $(window).scrollTop();
- $('body').css("top",-ster+"px");
- $('body').addClass('add');
-
- $('.m_lpdescribe_text').scrollTop(0);
- })
- $('.Developers_zhez').on('click',function(){
- $('.Developers_tx').animate({bottom:'-88%'},400);
- setTimeout(function(){
- $('.Developers_tc').fadeOut(80);
- },400)
- $('body').removeClass('add');
- $('body').attr('style','');
- $(window).scrollTop(_top);
- })
- $('.Developers_gb').on('click',function(){
- $('.Developers_tx').animate({bottom:'-88%'},400);
- setTimeout(function(){
- $('.Developers_tc').fadeOut(80);
- },400)
- $('body').removeClass('add');
- $('body').attr('style','');
- $(window).scrollTop(_top);
- })
- var _imgid ="";
- $('.m_lunbo_box ul li').on('click',function(){
- $('#LXB_CONTAINER_SHOW').hide();
- $('#LRdiv3').attr('class','none');
- _imgid = $(this).attr('data-hid')-1;
- console.log(_imgid);
- $('.m_swiper_xc').show();
- StitchingData(_imgid);
- })
- function StitchingData(imgid){
- lpxc=new Array();
- $('.m_lunbo_box ul li').each(function(){
- var _src = $(this).find('img').attr('src');
- lpxc.push(_src);
- })
- lpindex_xc(lpxc , imgid);
- }
- function lpindex_xc(data , imgid){
- var html = '';
- console.log(imgid);
- html+= '<div class="m_tcswiper_box">';
- html+='<div class="m_swiper_head">';
- html+='<div class="m_swiper_fh"><img src="/image/v2/lpindex3.png" alt=""></div>';
- html+='<div class="swiper-pagination" id="swiperzs"></div>';
- html+='<div class="m_swiper_qb"><a href="/house/album/1662">全部图片</a></div>';
- html+='</div>';
-
- html+= '<div class="m_swiper">';
- html+= '<div class="m_swiper_ul swiper-wrapper">';
- $.each(data, function (i, data) {
- html+= '<div class="m_swiper_li swiper-slide">';
- html+= '<div class="swiper-zoom-container">';
- html+= '<img src="'+data+'">';
- html+= '</div>';
- html+= '</div>';
- });
- html+= '</div>';
- html+= '<div class="swiper-button-prev"></div>';
- html+= '<div class="swiper-button-next"></div>';
- html+= '</div>';
- html+= '</div>';
- $('.m_swiper_ajax').html(html);
-
- var swipercx = new Swiper('.m_swiper', {
-
- zoom: true,
-
- initialSlide :imgid,
- nextButton: '.swiper-button-next',
- prevButton: '.swiper-button-prev',
- pagination : '.swiper-pagination',
- paginationType : 'custom',
- paginationCustomRender: function (swiper, current, total) {
- return current + ' / ' + total;
- },
-
-
-
- observer:true,
-
-
-
- });
-
-
- $('.m_swiper_fh').on('click',function(){
- $('#LXB_CONTAINER_SHOW').show();
- $('.m_swiper_xc').hide();
- })
- }
- if($('.m_pm').attr('data-text') != '暂无资料'){
- jQuery(".m_pm").slide({mainCell:".bd ul",autoPlay:true,effect:"leftMarquee",interTime:50,trigger:"click"});
- }
- $('.remark-list ul li').each(function(){
- var _tel = $(this).find('p em span').attr('tel-data').replace(/(\d{3})(\d{4})(\d{4})/,"$1****$3");
- $(this).find('p em span').html(_tel);
- })
- $('#demo05').navbarscroll({
- defaultSelect:0,
- scrollerWidth:6,
- fingerClick:1,
- endClickScroll:function(obj){
-
- }
- });
|