alert("出错了")
});
// 获取专辑信息
this.$http.get(`https://autumnfish.cn/album?id=${albumId}`).then(res=>{
this.picUrl=res.body.album.blurPicUrl;
}),err=>{}
//获取评论内容接口
this.$http.get(`https://autumnfish.cn/comment/music?id=${id}&limit=1`).then(res=>{
console.log(res);
this.comments=res.body.hotComments;
}),err=>{
alert('信息错误')
}
},
//钩子函数:动画执行完后去除了style属性,不去掉会卡顿
afterEnter(el){
el.style='';
},
// 专辑图片旋转事件
play(){
console.log('播放');
this.isPause=false;
},
pause(){
console.log('暂停');
this.isPause=true;
}
},
})
</script>
</html>
如果接口不能使用:请登录https://github.com/huanggengzhong/NeteaseCloudMusicApi,重新下载开启服务器即可
希望本文所述对大家vue.js程序设计有所帮助。










