thainv-dev: page chi tiết

This commit is contained in:
nguyen van thai
2024-05-31 12:39:53 +07:00
parent 86bebfd66e
commit 6ff759f22a
15 changed files with 348 additions and 14 deletions
+3 -2
View File
@@ -3,9 +3,10 @@ export const useArticleStore = defineStore("article", () => {
const getArticleById = async (id: string | number) => {
try {
const { data } = await useFetch(`/api/articles/get-by-id/${id}`)
const { data} = await useFetch(`/api/articles/get-by-id/${id}`)
currentArticle.value = {}
currentArticle.value = data.value
currentArticle.value = data.value.item
} catch (error: any) {}
}