123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626 |
- $(function(){
-
- $('.puleft_ico').on('click',function(){
- pintuan_a();
- })
- $('.pintuanBox_bg,.pintuanBox_gb a').on('click',function(){
- $('.pintuanBox').hide();
- $('.pintuanBox_bg').hide();
- $('.puleft_ico').show(10);
- })
-
- PublicAction.AjaxSend({CORID:'in_buttom_c'});
- $('.pintuanBox .submit_area .in_buttom_c').on('click',function(){
- setTimeout(function(){
- var _html = $('.alert-container .alert-content').html();
- if(_html == '提交成功'){
- $('.pintuanBox input[type="text"]').val('');
- $('.pintuanBox').hide();
- $('.pintuanBox_bg').hide();
- $('.puleft_ico').show(10);
- }
-
- },2000)
-
- })
- function pintuan_a(){
- $('.pintuanBox_main .lptitle').html($('.basic_box h1').text())
- $('.puleft_ico').hide();
- $('.pintuanBox').show(10);
- $('.pintuanBox_bg').show();
- }
- scrollFloor({
- floorClass : '.scroll-floor',
- navClass : '.scroll-nav',
- activeClass : 'active',
- delayTime:300,
- activeTop:200,
- scrollTop:0
- });
- })
- $(function(){
-
-
- function getParams(url) {
- var theRequest = new Object();
- if (!url)
- url = location.href;
- if (url.indexOf("?") !== -1)
- {
- var str = url.substr(url.indexOf("?") + 1) + "&";
- var strs = str.split("&");
- for (var i = 0; i < strs.length - 1; i++)
- {
- var key = strs[i].substring(0, strs[i].indexOf("="));
- var val = strs[i].substring(strs[i].indexOf("=") + 1);
- theRequest[key] = decodeURI(val) ;
- }
- }
- return theRequest;
- }
- var url = window.location.href;
- var params = getParams(url);
- if(params.hasOwnProperty('ty')){
-
- if(params.ty == 'hk'){
- $('.y_housetel span').html('800-960298');
- $('.y_telimg a').attr('href','tel:800960298');
- $('#feng_citytel').html('800960298');
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var swiper2 = new Swiper('#swiper22',{
- loop : true,
- spaceBetween: 20,
- centeredSlides: true,
- slidesPerView: 'auto',
- touchRatio: 0.5,
- slideToClickedSlide: true
- });
- $('.feng_album').on('click',function () {
- var _this = $(this);
- $('.feng_album').removeClass('on')
- _this.addClass('on');
-
-
-
-
-
-
-
-
-
-
- $.ajax({
- type: 'POST',
-
- data:{id:_this.attr('value'),hid:_this.attr('data-id'),csrf_token_m:csrfToken},
- dataType: 'json',
- success: function(data){
- var result = '';
- var result_pagination = '';
- if(data.code == 200){
- result += '<div class="swiper-container" id="swiper1">';
- result += '<div class="swiper-wrapper">';
- $.each(data.data,function (k,v) {
- result += '<div class="swiper-slide" data-swiper-autoplay="3000"><a href="/house/album/'+v.hid+'/"><img src="'+v.img+'" alt=""></a></div>';
- })
- result += '</div>';
- result_pagination += '<div class="swiper-pagination"></div>';
- result += '</div>';
-
- $('.swiper_container_box').html(result);
- $('.m_swiper-pagination_box').html(result_pagination);
- new Swiper('#swiper1',{
- autoplay:true,
- loop : true,
- pagination: '.swiper-pagination',
- paginationType : 'fraction',
-
-
-
-
-
- })
- }
- },
- error: function(xhr, type){
- }
- });
- })
-
- $('.result a.feng_album').eq(0).click();
- $('.lp_box').on('click','li',function(){
- album_click();
- })
- $('.lp_box ul li').eq(0).click();
-
- function album_click(){
- $("#lightgallery").lightGallery();
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
-
-
-
-
-
-
-
-
-
-
-
-
- var _lpid = $('.lp_gd').attr('lpid');
- var _Width = $('#lightgallery li').outerWidth();
- var _margin = parseInt( $('#lightgallery li').css('marginRight'));
- var ulWidth= $('#lightgallery').outerWidth();
- var liLength= $('#lightgallery li').length;
- var Total_length = _margin * (liLength -1)+(_Width * liLength) + 70 - ulWidth;
-
- if(liLength >= 3){
-
- var swiper3 = new Swiper('#swiper23',{
- slidesPerView : 'auto',
- slidesPerGroup : 2,
- onTouchEnd: function(swiper){
- TR=swiper.translate
-
- if(TR < -Total_length){
- swiper.setWrapperTranslate(TR);
- location.href ="http://m.qianwuwang.com/house/housetype/"+_lpid+"/";
- };
- },
- onTouchMove: function(swiper){
- TR=swiper.translate
-
- if(TR<-Total_length){
- $('.lp_gd').attr('id','lp_gd1');
- $('.lp_gd').show();
- }else{
- $('.lp_gd').attr('id','lp_gd');
- $('.lp_gd').hide();
- }
- }
- });
- }
- var _zxWidth = $('#swiper_feng ul li').outerWidth();
- var _zxmargin = parseInt( $('#swiper_feng ul li').css('marginRight'));
- var zxulWidth= $('#swiper_feng ul').outerWidth();
- var _zxlength = $('#swiper_feng ul li').length;
- var feng_length = _zxmargin * (_zxlength -1)+(_zxWidth * _zxlength) + 70 - zxulWidth;
-
- if(_zxlength > 1){
- var aaaa = new Swiper('#swiper_feng',{
- slidesPerView : 'auto',
- slidesPerGroup : 1,
- onTouchEnd: function(swiper){
- TR=swiper.translate
-
- if(TR < -feng_length){
- swiper.setWrapperTranslate(TR);
- location.href ="http://m.qianwuwang.com/house/summary/"+_lpid+"/";
- };
- },
- onTouchMove: function(swiper){
- TR=swiper.translate
- console.log(TR);
- if(TR<-feng_length){
- $('.classify_gd').attr('id','classify_gd');
- $('.classify_gd').show();
- }else{
- $('.classify_gd').attr('id','classify_gd');
- $('.classify_gd').hide();
- }
- }
- });
- }
-
-
- $('.m_conversion').on('click',function(){
- $('.exchange_rate_box').fadeIn(100);
- })
- $('.exchange_gb').on('click',function(){
- $('.exchange_rate_box').fadeOut(100);
- })
- })
- var ster = 0;
- $(window).scroll(function (){
- ster = $(this).scrollTop();
- navign4(ster);
- });
- var dir4 = $(document).scrollTop();
- navign4(dir4);
- function navign4(st){
- if(st >180){
- $('.y_v3homeNav').show();
- $('.m_top').attr('id','');
- }else{
- $('.y_v3homeNav').hide();
- $('.m_top').attr('id','m_top');
- }
- }
- $('.m_lpfx .m_lpAnalysis .m_lpAnalysis_li').eq(0).attr('id','on')
- var _qhid ='';
- $('.m_lpfx .m_lpAnalysis .m_lpAnalysis_li').on('click',function(){
- _qhid = $(this).attr('m_qhid');
- _type = $(this).attr('type');
- $(this).attr('id','on').siblings().attr('id','');
- ajax_lp();
-
-
- })
- function ajax_lp(){
- var html = '';
- $.ajax({
- url: "/info/getinfo",
- data:{hid:_qhid,type:_type,csrf_token_m:csrfToken},
- type: "GET",
- dataType: "json",
- success: function(data) {
- html+='<div class="m_lpfx_textw">';
- if(data.code == 200){
- if(data.data.analysis){
- html+='<div class="m_lpfx_text">'+data.data.analysis+'</div>';
-
- }else if(data.data.terms){
- html+='<div class="m_lpfx_text">'+data.data.terms+'</div>';
- }else{
- html+='<div class="m_lpfx_text">';
- html+='<div class="m_lpfx_text_img">';
- html+='<img src="/image/lptj01.png" alt="">';
- html+='<div class="m_lpfx_text_zwsj">暂无数据</div>';
- html+='</div>';
- html+='</div>';
- }
- }else{
-
- html+='<div class="m_lpfx_text">';
- html+='<div class="m_lpfx_text_img">';
- html+='<img src="/image/lptj01.png" alt="">';
- html+='<div class="m_lpfx_text_zwsj">暂无数据</div>';
- html+='</div>';
- html+='</div>';
- }
- html+='</div>';
- $('.m_lpfx_text_box').html(html);
- imgauto();
- }
- });
- }
- function imgauto(){
- $('.m_lpfx_text img').each(function(){
- $('.m_lpfx_text img').css({'height':'auto'});
- })
- }
- var _top = '';
- $('.m_commentary').on('click',function(){
- $('.m_lpfx_box').fadeIn(80);
- $('.m_lpfx').animate({bottom:'0%'},400);
- _top = $(window).scrollTop();
- $('body').css("top",-ster+"px");
- $('body').addClass('add');
- $('.m_top').hide();
- $('.m_commentary').hide();
- $('.m_lpAnalysis_li[type="analysis"]').click();
- })
- $('.m_lpfx_zhez').on('click',function(){
- $('.m_top').show();
- setTimeout(function(){
- $('.m_commentary').show();
- },400)
- $('.m_lpfx').animate({bottom:'-88%'},400);
- setTimeout(function(){
- $('.m_lpfx_box').fadeOut(80);
- },400)
- $('body').removeClass('add');
- $(window).scrollTop(_top);
- })
- $('.m_lpfx_gb').on('click',function(){
- $('.m_top').show();
- setTimeout(function(){
- $('.m_commentary').show();
- },400)
- $('.m_lpfx').animate({bottom:'-88%'},400);
- setTimeout(function(){
- $('.m_lpfx_box').fadeOut(80);
- },400)
- $('body').removeClass('add');
- $(window).scrollTop(_top);
- })
- $('.m_lpfx_text').find('img').each(function(){
- var $that = $(this);
- $that.removeAttr('width');
- $that.removeAttr('height');
- $that.css({'display':'block','width':'100%','height':'auto'});
- })
- jQuery(window).bind('scrollstart', function(){
- $('.m_commentary').animate({left:'-43px'},400);
- });
-
- jQuery(window).bind('scrollstop', function(e){
- $('.m_commentary').animate({left:'0px'},400);
- });
-
- $('.m_lpvideo_img').on('click',function(){
- var _video = document.getElementById("myVideo");
- myVideo.play();
- $('.m_video_sp').attr('controls','controls');
- $(this).hide();
- })
-
-
- var m_swiperv2 = new Swiper('#m_swiperv2',{
-
- autoplay:5500,
- loop : true,
- pagination: '.swiper-pagination',
- paginationType : 'fraction',
- paginationFractionRender: function (swiper, currentClassName, totalClassName) {
- return '<span class="' + currentClassName + '"></span>' +
- ' / ' +
- '<span class="' + totalClassName + '"></span>';
- }
- });
- $(function(){
- $('.timew').html('有效期:'+timew)
- })
- $(function(){
- var _lTude= '';
- _lTude =$('#y_lpmap').attr('data-jwd');
- if (_lTude != undefined && _lTude != '') {
- var pintx = parseFloat(_lTude.split(',')[0]);
- var pinty = parseFloat(_lTude.split(',')[1]);
- masw(pintx,pinty);
- };
- })
- function masw(len,lng){
- mapboxgl.accessToken = 'pk.eyJ1IjoicWlhbnd1MTQzNiIsImEiOiJjazZxZ2NyaGYwM3V6M2tueGZpb3FsYTYyIn0.lSEEDlQog3bc59KiDdx61g';
- var map = new mapboxgl.Map({
- container: 'map',
- style: 'mapbox://styles/mapbox/streets-v11',
- center: [len,lng],
- zoom: 13
- });
- map.on('load', function() {
- map.loadImage('/image/home_ico38.png', function(error, image) {
- if (error) throw error;
- map.addImage('cat', image);
- map.addLayer({
- "id": "points",
- "type": "symbol",
- "source": {
- "type": "geojson",
- "data": {
- "type": "FeatureCollection",
- "features": [{
- "type": "Feature",
- "geometry": {
- "type": "Point",
- "coordinates": [len,lng],
- }
- }]
- }
- },
- "layout": {
- "icon-image": "cat",
- "icon-size": 0.5
- }
- });
- });
- });
- }
- 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;
- };
- })
|