se_min=0; var lease_max=0; if(a == 0){ lease_min=1; lease_max=24; }else if(a == 1){ lease_min=1; lease_max=3; }else if(a == 2){ lease_min=3; lease_max=6; }else if(a == 3){ lease_min=6; lease_max=12; }else if(a == 4){ lease_min=12; lease_max=24; } location.href="https://www.yirent.com/property/villas/qingpu-jing_an-huangpu-yangpu/f23-s13-"+"z"+lease_min+lease_max+"/"; } function change_sort_type_zxl(a){ location.href="https://www.yirent.com/property/villas/qingpu-jing_an-huangpu-yangpu/f23-s13-"+"o"+a+"/"; } $('#datetimepicker').datepicker({ autoclose:true, clearBtn:true, startDate:new Date() }).on('changeDate', function(ev){ var zxl_available_date = $('#available_date').val(); if(zxl_available_date){ zxl_available_date = zxl_available_date.replace(/\//gm,'_'); location.href="https://www.yirent.com/property/villas/qingpu-jing_an-huangpu-yangpu/f23-s13-"+"r"+zxl_available_date+"/"; }else{ location.href="https://www.yirent.com/property/villas/qingpu-jing_an-huangpu-yangpu/f23-s13/"; } //get_map_list(); var stateObject = {}; /* var title = "Search Shanghai apartments, serviced apartments, villas and old houses for rent - List View | Yirent"; var newUrl = "https://www.yirent.com/list_view/"+url_str; history.pushState(stateObject,title,newUrl); */ }); function chang_page_url(a){ location.href="https://www.yirent.com/property/villas/qingpu-jing_an-huangpu-yangpu/f23-s13-"+"p"+a+"/"; } swiper[0] = new Swiper('.swiper-container_0', { prevButton: '.fangyuan_huandeng_left_8270', nextButton: '.fangyuan_huandeng_right_8270', lazyLoading:true, onSlideChangeEnd: function(swiper) { $('.zxl_ceshi_0').html(swiper.activeIndex+1); } }); function change_collection(a){ var html = $.ajax({ type: "POST", url:'/ajax_change_collection.php', data: "fangyuan_id="+a, async: false }).responseText; if(html=='3'){ location.href='https://www.yirent.com/login.php'; }else if(html=='1'){ $('#fangyuan_id_'+a).addClass('list_cart_xz'); }else if(html=='2'){ $('#fangyuan_id_'+a).removeClass('list_cart_xz'); }else{ location.reload(); } //alert(html); } var page = 1; var fangyuan_id = 0; var last_m_id = 0; var t; function message_fangyuan_id(id){ $('.message-display').html(''); get_user_message_box(id); } function get_user_message_box(id){ var html = $.ajax({ type: "POST", url:'/ajax_get_user_message_list.php', data: "fangyuan_id="+id, async: false }).responseText; json_zxl = jQuery.parseJSON(html); get_error(json_zxl.error); if(json_zxl.html){ $('.message-display').html(json_zxl.html); get_div_footer(); } if(json_zxl.user_info){ $('.modal-title').html(json_zxl.user_info.nick); } add_message_fangyuan(id); fangyuan_id = id; get_user_message(); } function add_message_fangyuan(id){ var html = $.ajax({ type: "POST", url:'/add_user_message_fangyuan.php', data: "fangyuan_id="+id, async: false }).responseText; json_zxl = jQuery.parseJSON(html); get_error(json_zxl.error); if(json_zxl.html){ $('.message-display').append(json_zxl.html); } get_div_footer(); } function get_div_footer(){ $('.message-display').scrollTop( $(".message-display").scrollTop() + $('.message-display').offset().top - $(".message-display").offset().top+100000); } function get_user_message(){ if(fangyuan_id){ var html = $.ajax({ type: "POST", url:'/ajax_get_user_message_list_last.php', data: "fangyuan_id="+fangyuan_id, async: false }).responseText; json_zxl = jQuery.parseJSON(html); get_error(json_zxl.error); if(json_zxl.html){ $('.message-display').append(json_zxl.html); get_div_footer(); } } t=setTimeout("get_user_message()",3000); } $('.btn-paiple_zxl').click(function (){ $('.error-msg').hide(); if($('.zxl_message').val() == ''){ $('.error-msg').show(); }else{ var html = $.ajax({ type: "POST", url:'/add_user_message_list.php', data: "fangyuan_id="+fangyuan_id+"&message="+$('.zxl_message').val(), async: false }).responseText; json_zxl = jQuery.parseJSON(html); get_error(json_zxl.error); if(json_zxl.html){ $('.zxl_message').val(''); $('.message-display').append(json_zxl.html); } } get_div_footer(); }); function get_error(error){ if(error == '1'){ location.href='https://www.yirent.com/login.php'; }else if(error == '2'){ location.reload(); } } function check_text(event){ if(event.keyCode == 13){ event.preventDefault(); $('.error-msg').hide(); if($('.zxl_message').val() == ''){ $('.error-msg').show(); }else{ var html = $.ajax({ type: "POST", url:'/add_user_message_list.php', data: "fangyuan_id="+fangyuan_id+"&message="+$('.zxl_message').val(), async: false }).responseText; json_zxl = jQuery.parseJSON(html); get_error(json_zxl.error); if(json_zxl.html){ $('.zxl_message').val(''); $('.message-display').append(json_zxl.html); } } get_div_footer(); } }