123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- 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 += '<p class="y_jg"><span>' + data.data.price + '</span><em>元/m²</em></p>';
- html += '<p class="y_text">' + data.data.city_name + data.data.price_at + '房价均价</p>';
- if (data.data.trend == 1) {
- _html += '<img src="/overseas/img/fall1.png" alt=""><span class="red">上升' + data.data.contrast + '</span>';
- } else if (data.data.trend == 2) {
- _html += '<img src="/overseas/img/fall.png" alt=""><span class="lr">下跌-' + data.data.contrast + '</span>'; //上升下跌
- }
- }
- $('.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 += '<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.live){
- 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">有效期至:'+htmltime+'</p>';
- html += '<p class="style">';
- html += '<i>在售</i>';
- if( data.label){
- for (k in data.label) {
- if(k< 2){
- html += '<span>' + data.label[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>';
- });
- $(".sell_conter ul").html(html);
- }
- }
- });
- }
- // var hyh = $('.m_hotlp_hyh').attr('DataId');
- m_hotlp_hyh(1);
- $(function () {
- var y_input = $('.y_input').width();
- var y_city = $('.y_city').width();
- $('.y_input .ipt_area').css({'width': (y_input - y_city - 35) + 'px'});
- })
- $('.y_hotnews_bk li').on('click', function () {
- var dataid = $(this).attr('data-id');
- })
- // 切换区域
- $('.js_y_city a').on('click', function () {
-
- $('body #serachBox2').before('<div id="ifr"></div>')
- $("#ifr").load('/public/filtrate?name=' + $("#feng_cityname").html());
- $('#serachBox2').hide();
- $('.footer_copy').hide();
- });
- $('body').on('click', '.m_Return', function () {
- $('#serachBox2').show();
- $('.footer_copy').show();
- $('#ifr').remove();
- });
- // 处理资讯详情页面的底部一个月的有效日期
- 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 + '.' + mGetDate(yue);
- $('.js_puicTime').html('有效期至:'+htmltime)
- // VR全景看房
- var mySwiper3= new Swiper(".js_yv2_panoramaVr_list",{
- loop : false,
- loopedSlides:4,
- autoplayDisableOnInteraction : false,
- slidesPerView :2.3,
- spaceBetween : 12,
- });
- // 航拍实景
- var mySwiper3= new Swiper(".js_yv2_hangpai_list",{
- loop : false,
- loopedSlides:4,
- autoplayDisableOnInteraction : false,
- slidesPerView :2.3,
- spaceBetween : 12,
- });
|