E
{"id":1,"name":"Турбокомпрессоры","slug":"turbokompressory","image":"http://127.0.0.1:8000/media/media/category/8973628390.jpg"}
Size: a a a
E
{"id":1,"name":"Турбокомпрессоры","slug":"turbokompressory","image":"http://127.0.0.1:8000/media/media/category/8973628390.jpg"}
IB
IB
IB
E
DT
AE
ИБ
MD
IB
AE
E
E
<template>
<div>
<h1>{{ theme.name }}</h1>
<div v-for="article in theme.articles">
<nuxt-link :to="`/article/${article.slug}`">
{{ article.name }}
</nuxt-link>
</div>
</div>
</template>
<script>
import axios from 'axios'
export default{
async asyncData ({params}) {
let {data} = await axios.get(`http://api.chemnotes.loc/theme/${params.slug}`)
return {theme: data}
}
}
</script>
DT
ИБ
E
XMLHttpRequest cannot load http://api.chemnotes.loc/theme/biohimia-selocnyh. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:3000' is therefore not allowed access.
nuxt-error.vue:48 Error: Network Error
at createError (createError.js:16)
at XMLHttpRequest.handleError (xhr.js:87)