Why doesn't this api generate cross-domain?

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>
Jul.08,2021

because in XHR2, as long as the called station allows cross-site access, it will not be blocked. It is not enabled by default.

Menu