phongdt: paging component
This commit is contained in:
@@ -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
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user