vue 请求完接口后执行方法


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); })

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM