thainv-dev: Fix

This commit is contained in:
nguyen van thai
2024-07-03 15:33:51 +07:00
parent ee5c6f40f1
commit 554ceab3c6
36 changed files with 1033 additions and 231 deletions
+4
View File
@@ -7,7 +7,10 @@ import { useDynamicPageStore } from '~/stores/dynamic-page';
const route = useRoute();
const store = reactive({
dynamicPage: useDynamicPageStore(),
category: useCategoryStore()
});
//lấy danh sách categoryTree
await store.category.fetchBySiteId()
const { data } = await useAsyncData('index', () => store.dynamicPage.fetchPageByCode(route.path === '/' ? 'trang-chu' : route.path.replace('/', '')))
const asycnCurrentPage = data.value.currentPage;
@@ -28,6 +31,7 @@ useHead({
<main class="h-screen" v-if="asycnCurrentPage">
<DynamicTemplate :settings="asycnCurrentPage.settings">
<DynamicSection
class="mb-10"
v-for="(section, index) in asycnSectionPublished"
:key="index"
:settings="section.settings"