代码如下
get_songList(){
this.$reqs.get('https://easy-mock.com/mock/5d2d335b9a62296ff406ecdf/example/getsong').then(function(res){
console.log(res);
this.songList = res.data.data.projects;
}).catch(function (error) {
console.log(error);
});
}
运行到浏览器chrome时报错:
xhr.js?b50d:172 GET https://easy-mock.com/mock/5d2d335b9a62296ff406ecdf/example/getsong net::ERR_CONNECTION_TIMED_OUT
解决办法:在浏览器地址栏访问一下这个地址,加入到安全例外就可以了