phongdt:header footer

This commit is contained in:
Duong Truong Phong
2024-05-30 22:57:45 +07:00
parent dd09434deb
commit 3b435e22ea
18 changed files with 787 additions and 467 deletions
+44
View File
@@ -0,0 +1,44 @@
import Base from "./base";
import {H3Event} from "h3";
export type Category = {
id: number;
siteId: number;
parentId?: number;
title: string;
code: string;
description?: string;
thumbnail?: string;
keyword?: string;
taxonomy?: string;
type: number;
layout?: number;
template?: string;
feature?: string;
settings?: string;
order?: number;
isPublished?: boolean;
publishType?: number;
publishedBy?: string;
publishedOn?: string;
status: number;
} & Base;
export const list = async () => {
try {
const { site, apiUrl } = useRuntimeConfig().public;
const {items}:any = await $fetch(`${apiUrl}/cms/category/site`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
site: site,
},
});
return items;
} catch (error) {
handleError(error);
}
};