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