This commit is contained in:
2022-11-03 06:41:22 -07:00
parent 93581983e8
commit 419f1a9a88
4 changed files with 36 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ useHead({
<template>
<header class="bg-white shadow">
<div class="mx-auto max-w-7xl py-6 px-4 sm:px-6 lg:px-8">
<h1 class="text-3xl font-bold leading-tight text-gray-900">Not Found</h1>
<h1 class="text-3xl font-bold leading-tight text-gray-900">404 Not Found</h1>
</div>
</header>
</template>

33
src/pages/[id].vue Normal file
View File

@@ -0,0 +1,33 @@
<template>
<div class="container-fluid bg-white mx-auto mt-3 p-0">
<div v-if="isLoading">
<h2>Loading ...</h2>
</div>
<div v-else>
<div v-html="page[0].content" class="container">
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
page: null,
isLoading: true
}
},
mounted: function () {
fetch('https://api8.siliconpin.com/items/scc22?filter[slug][_eq]=' + this.$route.params.id)
// fetch('https://api8.siliconpin.com/items/scc22?slug=about-us')
.then(response => response.json())
.then(data => {
this.page = data.data
console.log(data)
this.isLoading = false
})
}
}
</script>