Ошибка сети при запуске nuxt-ссылки после обновления той же самой страницы.
Вот шаблон
<div class="col-lg-3" v-for="(video, index) in videos" :key="index">
<nuxt-link :to="/video/ + video.id">
<img :src="video.image" width="100%">
<div class="card">
<div class="card-body">
<h1 class="title">{{ video.title }}</h1>
</div>
</div>
</nuxt-link>
</div>
сценарии
export default {
layout: 'default',
asyncData({ req, params }) {
// We can return a Promise instead of calling the callback
return axios.get('http://localhost:8000/getVideos')
.then((res) => {
return { videos: res.data.data }
})
}
}
Ссылка на следующую страницу
<script>
import axios from 'axios'
export default{
layout: 'default',
asyncData({ req, params }) {
// We can return a Promise instead of calling the callback
return axios.get(`http://localhost:8000/video/${params.id}`)
.then((res) => {
return { video: res.data.video , relatedVideos: res.data.relatedVideos }
})
},
}
</script>
и это ошибка, с чем и сталкивается
после обновления страницы она работает нормально