$(function(){
	
	function FnAjax(oid){
		$.ajax({
    	    url:"./index",
    	    type:"post",
    	    data:{id:oid},
    	    dataType:"json",
    	    success:function(data){
    	    	if(data.code == 200){
    	    		FnTraverse(data.data); 
    	    	}
    	    },
    	    error:function(request){
    	        console.log('加载失败!');
    	    }
    	})
	}

	// 数据遍历
	function FnTraverse(data){
		var _html = '';
		$.each(data,function(k,v){
			_html += '<li>';
			_html += '<a href="javascript:void(0);">';
			_html += '<div class="ban_img"><img src="./image/icon_img.png" alt=""></div>';
			_html += '<div class="ban_font">';
			_html += '<p class="ban_title">Huaikwang丽晶公府<span>¥125万</span></p>';
			_html += '<p class="house_type">户型:29㎡1居、34㎡2居</p>';
			_html += '<p class="explain"><img src="./image/icon_map.png" alt="">曼谷西部舒适生活区,东靠湄南河,紧连沙吞涉外金融CBD</p>';
			_html += '</div>';
			_html += '</a>';
			_html += '</li>';
		})
		$('.ban_conter ul').html("");
		$('.ban_conter ul').append(_html);

		// 精选房源
		var swiper4 = new Swiper('#swiper4',{
			autoplay:true,	//自动切换
			// loop : true,	//循环
			slidesPerView :'auto',
	  		slidesPerGroup : 1,
	  		nextButton: '.next',
    		prevButton: '.prev',
    		pagination : '.ld',
			paginationType : 'fraction',
		});

	}
	// 精选房源
	var swiper4 = new Swiper('#swiper4',{
		autoplay:true,	//自动切换
		// loop : true,	//循环
		slidesPerView :'auto',
	  	slidesPerGroup : 1,
	  	nextButton: '.next',
    	prevButton: '.prev',
    	pagination : '.ld',
		paginationType : 'fraction',

	});

})