getLunbo: function() {
var that = this;
that.lunbo = [];
// api.showProgress({
// title: '加载中'
// });
return flyPost('api/login/shouyelunbo', {
_ajax: 1,
}).then(function(res) {
console.log(JSON.stringify(res))
if (res.code == 1) {
that.lunbo = res.data;
//在获取完数据后启动轮播插件
that.$nextTick(function() {
var swiper = new Swiper('.swiper-container', {
loop: true,
autoplay: 3000,
pagination: {
el: '.swiper-pagination'
},
});
})
// api.hideProgress();
} else {
// api.hideProgress();
showAlert({
message:6666666
// message: res.msg
});
}
}).catch(function(err) {
// api.hideProgress();
console.log(err);
})