-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Description
在网上看了一下Vue.axios教程,为什么this.axios.get('/api/hot')就可以获得返回,不用设置baseURL吗?
this.axios.defaults.baseURL = 'http://music.qq.com/musicbox/shop/v3/data/hit';
this.axios.get('/hit_newsong.js')
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
没看懂axios,写了一下,可以获得返回但是提示存在跨域问题。不懂axios在这个项目怎么访问接口
Metadata
Metadata
Assignees
Labels
No labels