vue music 歌单组件

在data里面定义
discList: []
methods: {
            _getRecommend() {
                getRecommend().then((res) => {
                    if(res.code === ERR_OK){
                        // 轮播图数据
                        this.recommends = res.data.slider
                    }
                })
            },
            _getDiscList() {
                getDiscList().then((res) => {
                    if(res.code === ERR_OK){
                        // 歌单数据
                        this.discList = res.data.list
                    }
                })
            },
        },
原文地址:https://www.cnblogs.com/jassin-du/p/9444183.html