Fix
This commit is contained in:
+3
-3
@@ -20,7 +20,7 @@ const setGlobalState = (id: any) => {
|
|||||||
<template v-if="record && record.childs && record.childs.length > 0 && record.typeChild === enumPageComponentStaticChild.DEFAULT">
|
<template v-if="record && record.childs && record.childs.length > 0 && record.typeChild === enumPageComponentStaticChild.DEFAULT">
|
||||||
<div class="navigation-submenu">
|
<div class="navigation-submenu">
|
||||||
<div class="navigation_title">
|
<div class="navigation_title">
|
||||||
<nuxt-link :to="record?.slug" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
|
<nuxt-link :to="`/${record?.slug}`" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="navigation-item submenu-container dropdown-container">
|
<div class="navigation-item submenu-container dropdown-container">
|
||||||
<RecusiveNavItem :records="record.childs" />
|
<RecusiveNavItem :records="record.childs" />
|
||||||
@@ -31,7 +31,7 @@ const setGlobalState = (id: any) => {
|
|||||||
<div class="navigation-submenu">
|
<div class="navigation-submenu">
|
||||||
<div class="position-relative ps-3">
|
<div class="position-relative ps-3">
|
||||||
<div class="navigation_title ">
|
<div class="navigation_title ">
|
||||||
<nuxt-link :to="record?.slug" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
|
<nuxt-link :to="`/${record?.slug}`" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="full-layout dropdown-container">
|
<div class="full-layout dropdown-container">
|
||||||
@@ -45,7 +45,7 @@ const setGlobalState = (id: any) => {
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="navigation_title navigation-item" >
|
<div class="navigation_title navigation-item" >
|
||||||
<nuxt-link :to="record?.slug" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
|
<nuxt-link :to="`/${record?.slug}`" class="!font-arial !font-400">{{ record?.title }}</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ function findElementPathById(categories: any[], targetId: number, path: any[] =
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tags" v-if="currentArticle.tags">
|
<div class="tags" v-if="currentArticle && currentArticle?.tags">
|
||||||
<span>
|
<span>
|
||||||
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path
|
<path
|
||||||
@@ -200,8 +200,8 @@ function findElementPathById(categories: any[], targetId: number, path: any[] =
|
|||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<ul>
|
<ul >
|
||||||
<li v-for="(tag, index) in currentArticle.tags">
|
<li v-for="(tag, index) in currentArticle?.tags">
|
||||||
<nuxt-link class="font-raleway font-500" :to="`/tag/${tag.code}`">{{ tag.title }}</nuxt-link>
|
<nuxt-link class="font-raleway font-500" :to="`/tag/${tag.code}`">{{ tag.title }}</nuxt-link>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -221,38 +221,38 @@ function findElementPathById(categories: any[], targetId: number, path: any[] =
|
|||||||
<div class="content detail-default">
|
<div class="content detail-default">
|
||||||
<div class="content__top">
|
<div class="content__top">
|
||||||
<div class="flex justify-between flex-wrap items-center mb-10px">
|
<div class="flex justify-between flex-wrap items-center mb-10px">
|
||||||
<ul class="flex gap-32px" v-if="currentCategoryTree.length">
|
<ul class="flex gap-32px" v-if="currentCategoryTree?.length">
|
||||||
<li v-for="( category, index ) in currentCategoryTree" :key="index" class="first:text-#000 text-#929292 last:after:content-[''] relative after:absolute after:content-['/'] after:text-20px after:right--20px" >
|
<li v-for="( category, index ) in currentCategoryTree" :key="index" class="first:text-#000 text-#929292 last:after:content-[''] relative after:absolute after:content-['/'] after:text-20px after:right--20px" >
|
||||||
<nuxt-link class=" font-raleway text-18px font-500 leading-180% uppercase" :to="`/${category.code}`">{{ category.title }}</nuxt-link>
|
<nuxt-link class=" font-raleway text-18px font-500 leading-180% uppercase" :to="`/${category.code}`">{{ category.title }}</nuxt-link>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div v-if="currentArticle.topics" class="pl-20px relative bg-primary inline-block">
|
<div v-if="currentArticle?.topics" class="pl-20px relative bg-primary inline-block">
|
||||||
<nuxt-link class="h-30px block py-4px px-16px border-1 border-#000 bg-white text-12px leading-180% font-raleway font-400" :to="`/topic/${currentArticle.topics[0].slug}`">{{ currentArticle.topics[0].title }}</nuxt-link>
|
<nuxt-link class="h-30px block py-4px px-16px border-1 border-#000 bg-white text-12px leading-180% font-raleway font-400" :to="`/topic/${currentArticle?.topics[0].slug}`">{{ currentArticle?.topics[0].title }}</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="font-gelasio text-44px font-bold leading-130%" v-if="currentArticle.title" v-html="currentArticle.title"></h2>
|
<h2 class="font-gelasio text-44px font-bold leading-130%" v-if="currentArticle?.title" v-html="currentArticle?.title"></h2>
|
||||||
|
|
||||||
<div class="author flex gap-12px my-20px" v-if="currentArticle.authors">
|
<div class="author flex gap-12px my-20px" v-if="currentArticle?.authors">
|
||||||
<ul class="flex">
|
<ul class="flex">
|
||||||
<li :style="{'z-index': index + 1}" class="relative ml--12px first:ml-0" v-for="(author, index) in currentArticle.authors" :key="index">
|
<li :style="{'z-index': index + 1}" class="relative ml--12px first:ml-0" v-for="(author, index) in currentArticle?.authors" :key="index">
|
||||||
<nuxt-link :to="`/tac-gia/${author.code}`">
|
<nuxt-link :to="`/tac-gia/${author.code}`">
|
||||||
<img :src="author.thumbnail || `http://picsum.photos/1024/600?random=1`" alt="" class="w-64px p-1px border-1px border-white h-64px object-cover rounded-full">
|
<img :src="author?.thumbnail || `http://picsum.photos/1024/600?random=1`" alt="" class="w-64px p-1px border-1px border-white h-64px object-cover rounded-full">
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div>
|
<div>
|
||||||
<div class="mt-10px">
|
<div class="mt-10px">
|
||||||
<nuxt-link class="font-raleway text-#000" v-for="(author, index) in currentArticle.authors" :key="index" :to="`/tac-gia/${author.code}`">{{ author.title + (index < currentArticle.authors.length - 1 ? ', ' : '') }}</nuxt-link>
|
<nuxt-link class="font-raleway text-#000" v-for="(author, index) in currentArticle?.authors" :key="index" :to="`/tac-gia/${author.code}`">{{ author.title + (index < currentArticle.authors.length - 1 ? ', ' : '') }}</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-12px">
|
<div class="text-12px">
|
||||||
Xuất bản vào {{ formatDate(currentArticle.publishedOn, 'DD/MM/YYYY | hh:mm') }}
|
Xuất bản vào {{ formatDate(currentArticle?.publishedOn, 'DD/MM/YYYY | hh:mm') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<figure v-if="currentArticle.thumbnail">
|
<figure v-if="currentArticle?.thumbnail">
|
||||||
<img :src="currentArticle.thumbnail" class="w-full " alt="">
|
<img :src="currentArticle?.thumbnail" class="w-full " alt="">
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
<div class="content__bottom" >
|
<div class="content__bottom" >
|
||||||
@@ -303,11 +303,11 @@ function findElementPathById(categories: any[], targetId: number, path: any[] =
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p class="my-10px" v-if="currentArticle.intro" v-html="currentArticle.intro">
|
<p class="my-10px" v-if="currentArticle?.intro" v-html="currentArticle.intro">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- <div v-html="currentArticle.detail" class="[&_p_>_span]:!font-raleway [&_p]:mb-10px"></div> -->
|
<!-- <div v-html="currentArticle.detail" class="[&_p_>_span]:!font-raleway [&_p]:mb-10px"></div> -->
|
||||||
<component :is="{ template: currentArticle.detail, components: { Poll, Quiz, Survey, Document, Attachment, Tag } }" />
|
<component :is="{ template: currentArticle?.detail, components: { Poll, Quiz, Survey, Document, Attachment, Tag } }" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content__bottom__right">
|
<div class="content__bottom__right">
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ export default defineNuxtConfig({
|
|||||||
|
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
public: {
|
public: {
|
||||||
apiUrl: "http://api-portal.vpress.vn/api-v1",
|
apiUrl: "http://uat-api-portal.vpress.vn/api-v1",
|
||||||
site: process.env.NUXT_PUBLIC_SITE_DEFAULT || "1",
|
site: process.env.NUXT_PUBLIC_SITE_DEFAULT || "1",
|
||||||
},
|
},
|
||||||
authSecret: process.env.AUTH_SECRET||"vpress"
|
authSecret: process.env.AUTH_SECRET||"vpress"
|
||||||
|
|||||||
Reference in New Issue
Block a user