Merge branch 'main' of http://work.gct.com.vn/minhnt/NSG_PORTAL_V2 into thainv-dev

This commit is contained in:
nguyen van thai
2024-06-03 12:30:08 +07:00
36 changed files with 893 additions and 604 deletions
+10 -9
View File
@@ -16,6 +16,7 @@ import { useDynamicPageStore } from '~/stores/dynamic-page';
import { useArticleStore } from '~/stores/articles';
const { currentPage, sectionPublished, componentPublished } = storeToRefs(useDynamicPageStore());
const { currentArticle } = storeToRefs(useArticleStore());
const store = reactive({
dynamicPage: useDynamicPageStore(),
article: useArticleStore(),
@@ -37,7 +38,6 @@ const loadPage = async (contentType: string | number) => {
watch(currentArticle, async () => {
let isContentType : string = '';
console.log(currentArticle.value, 'type')
switch (currentArticle.value?.contentType) {
case 1:
isContentType = 'trang-doi-song'
@@ -47,11 +47,11 @@ watch(currentArticle, async () => {
break;
case 3:
isContentType = 'ArticleLayoutPodcast'
isContentType = 'trang-chi-tiet-podcast'
break;
case 4:
isContentType = 'ArticleLayoutVideo'
isContentType = 'trang-chi-tiet-video-clip'
break;
case 5:
@@ -71,15 +71,16 @@ watch(currentArticle, async () => {
isContentType = 'trang-chi-tiet-emagazine'
break;
}
await loadPage(isContentType)
await loadPage(isContentType);
}, { deep: true })
useSeoMeta({
title: currentArticle.value?.title?.replace(/<[^>]+>/g, ''),
ogTitle: currentArticle.value?.title,
description: currentArticle.value?.intro,
ogDescription: currentArticle.value?.intro,
ogImage: currentArticle.value?.thumbnail,
title: () => currentArticle.value?.title?.replace(/<[^>]+>/g, ''),
description: () => currentArticle.value?.intro,
ogTitle: () => currentArticle.value?.title,
ogImage: () => currentArticle.value?.thumbnail,
ogDescription: () => currentArticle.value?.intro,
twitterCard: 'summary_large_image',
})
</script>