this test project does not do cross-domain processing. Why does the first api get the data while the second api generates cross-domain? prompt No "Access-Control-Allow-Origin" header is present on the requested resource.
Why?
<template>
<div class="txt">
</div>
</template>
<script>
export default {
name: "Test2",
mounted () {
this.$http.get("http://api.komavideo.com/news/list").then(res => {
console.log(res)
})
}
}
</script>
<style scoped>
</style>
<template>
<div class="txt">
</div>
</template>
<script>
export default {
name: "Test2",
mounted () {
this.$http.get("http://api.douban.com/v2/movie/in_theaters").then(res => {
console.log(res)
})
}
}
</script>
<style scoped>
</style>