两种解决方法
1、数据加载后进行swiper初始化
rush:xhtml;">
success:function(result){
var resultdata =eval("("+result+")");
if(resultdata.status == 1){
var dataList = resultdata.data;
currentPage = resultdata.currentPage;
pageCount = resultdata.pageCount;
var html = "";
if(pageCount == 0){
html ='
';
}
';
}else{
for(var i in dataList){
var data = dataList[i];
html += ''
+ '
'+''
+ '
'
+ '
'
+ ''
+ '
}
$("#list").append(html);
//swiper初始化
var swiper = new Swiper('.swiper-container',{
pagination: '.swiper-pagination',slidesPerView: 'auto',paginationClickable: true,spaceBetween: 0
});
}