var mySwiper1 = new Swiper(".swiper-container1", { loop: true, loopedSlides: 4, autoplay: 5500, autoplayDisableOnInteraction: false, // 如果需要分页器 pagination: '.swiper-pagination', slidesPerView: "auto" }); // v2 幻灯 var regIon = new Swiper(".yv2_slideBox", { loop: true, loopedSlides: 4, pagination: '.js_swiper-pagination', autoplayDisableOnInteraction: false, slidesPerView: "auto" }); // 品房头条 function autoScroll(obj) { $(obj).find("ul").animate({ marginTop: "-30px" }, 500, function () { $(this).css({marginTop: "0px"}).find("li:first").appendTo(this); }) } $(function () { setInterval('autoScroll(".headle_right .content")', 5000); }) $(window).scroll(function () { var st = $(this).scrollTop(); if (st > 196) { $('.suspension').fadeIn().addClass('xungua'); $('.header').fadeOut(); } else { $('.suspension').fadeOut(); $('.header').fadeIn(); } }); $('.suspension').on('click', function () { $('body,html').animate({scrollTop: 0}, 1000); return false; }) var trend = $('.y_quyou_list ul.list_m li').eq(0).find('a').attr('CityData'); function index_trend() { var html = ''; var _html = ''; $.ajax({ url: "/index/cityprice", data: {id: trend}, type: "POST", dataType: "json", success: function (data) {//请求成功完成后要执行的方法 if (data.code == 200) { html += '
' + data.data.price + '元/m²
'; html += '' + data.data.city_name + data.data.price_at + '房价均价
'; if (data.data.trend == 1) { _html += '上升' + data.data.contrast + ''; } else if (data.data.trend == 2) { _html += '下跌-' + data.data.contrast + ''; //上升下跌 } } $('.y_houspic_text').html(html); $('.fall').html(_html); } }); } function m_hotlp_hyh(rand = null) { var cityId = $('#feng_city_id').html(); var html = ''; $.ajax({ // url: "/index/hothouses", url: "/json/gethousem", data: {rand: rand, csrf_token_m: csrfToken, city: cityId}, type: "POST", dataType: "json", success: function (data) { if (data.code == 200) { $.each(data.data, function (i, data) { var randomX = 300; var randomY = 800; var randvalue = parseInt(Math.random() * (randomX - randomY + 1) + randomY); // console.log(data) html += ''+data.city_name+'
'; html += '航拍实景
'; } html += '' + data.sale_price + '' + data.price_unit + '
'; }else{ html += '待定
'; } html += '有效期至:'+htmltime+'
'; html += ''; html += '在售'; if( data.label){ for (k in data.label) { if(k< 2){ html += '' + data.label[k] + ''; } } } html += '
'; html += '