phongdt: paging component

This commit is contained in:
Duong Truong Phong
2024-07-05 14:51:25 +07:00
parent 5889e9af0e
commit 46b808cf9c
3 changed files with 137 additions and 127 deletions
+19
View File
@@ -60,6 +60,24 @@ export const useDynamicPageStore = defineStore("dynamicPageStore", () => {
} catch (error: any) {}
}
async function getOverviewPageComponentById(componentId, dataQuery) {
try {
const { apiUrl } = useRuntimeConfig().public
const res = await $fetch(`${apiUrl}/cms/page-component/overview-page-component/${componentId}`, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: dataQuery,
});
console.log("res",res)
return res
} catch (err) {
throw err;
}
}
return {
currentPage,
sectionPublished,
@@ -69,6 +87,7 @@ export const useDynamicPageStore = defineStore("dynamicPageStore", () => {
setSectionPublished,
setComponentPublished,
setDataQuery,
getOverviewPageComponentById
};
});