34 lines
647 B
Vue
34 lines
647 B
Vue
<template>
|
|
<div class="info--page">
|
|
<div class="container">
|
|
<h2 class="title">{{ listData.title }}</h2>
|
|
|
|
<img :src="listData.cover" :alt="listData.title" v-if="$route.params.page === 'manager'">
|
|
|
|
<div class="ck-content" v-html="listData.pageContent"></div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
listData: []
|
|
}
|
|
},
|
|
async asyncData({$axios, error, params}) {
|
|
try {
|
|
const data = await $axios.get(`/api/public/viewContent/${params.page}`)
|
|
return {
|
|
listData: data.data
|
|
}
|
|
} catch (e) {
|
|
error({status: 404})
|
|
}
|
|
}
|
|
}
|
|
|
|
</script>
|