为什么我要使用其他远程地址?在我的mount()
方法上,我有this.fetchFeaturedArtistsData()
,即:
fetchFeaturedArtistsData() {
this.featuredArtists.forEach(artist => {
this.getSongs(artist.name)
.then((r) => {
this.featuredArtists[this.featuredArtists.indexOf(artist)].songs = r.data.results
})
.catch((e) => {
console.log(e)
})
})
},
以及我的searchArtist方法上
searchArtist: debounce(function() {
this.loading = true
this.$axios.get('https://itunes.apple.com/search?term=' + this.$store.state.search)
.then((r) => {
this.searchResult = r.data
})
.catch((e) => {
return e
})
.finally(() => {
this.loading = false
})
}, 1000)
我希望这两种方法都具有相同的标题。请检查所附的照片。