notice
parent
f7f833cf6d
commit
3552a1174e
|
@ -4,13 +4,13 @@
|
|||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite, Vue3, Tailwind CSS</title>
|
||||
<link
|
||||
<!-- <link
|
||||
rel="preload"
|
||||
href="/font/Inter-roman.var.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
/> -->
|
||||
<!-- <link rel="preload" href="/font/Inter-italic.var.woff2" as="font" type="font/woff2" crossorigin="anonymous"> -->
|
||||
<link rel="stylesheet" href="/font/inter.css" />
|
||||
</head>
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<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 mx-auto">
|
||||
|
||||
|
||||
</div>
|
||||
<div v-if="page[0].attachments">
|
||||
<div v-html="page[0].attachments[0]"> </div>
|
||||
|
||||
</div>
|
||||
<div>{{page[0].attachments[0]}}</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>
|
|
@ -0,0 +1,40 @@
|
|||
<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-for="(item, index) in page" >
|
||||
<router-link :to="'/notice/'+item.slug"> <h3> {{item.title}}</h3> </router-link>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- <div v-html="page[0].content" class="container mx-auto">
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
page: null,
|
||||
isLoading: true
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
fetch('https://api8.siliconpin.com/items/scc22?filter[type][_eq]=notice')
|
||||
// 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>
|
|
@ -41,6 +41,8 @@ declare module 'vue-router/auto/routes' {
|
|||
'/about': RouteRecordInfo<'/about', '/about', Record<never, never>, Record<never, never>>,
|
||||
'/gallery': RouteRecordInfo<'/gallery', '/gallery', Record<never, never>, Record<never, never>>,
|
||||
'/index2': RouteRecordInfo<'/index2', '/index2', Record<never, never>, Record<never, never>>,
|
||||
'/notice/': RouteRecordInfo<'/notice/', '/notice', Record<never, never>, Record<never, never>>,
|
||||
'/notice/[id]': RouteRecordInfo<'/notice/[id]', '/notice/:id', { id: ParamValue<true> }, { id: ParamValue<false> }>,
|
||||
'/temp/google': RouteRecordInfo<'/temp/google', '/temp/google', Record<never, never>, Record<never, never>>,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue