Refactor API requests and update component structure

This commit is contained in:
wangqiao
2025-08-20 22:58:08 +08:00
parent 1ef219878c
commit 2fe36051f8
8 changed files with 123 additions and 109 deletions

View File

@ -31,14 +31,20 @@
status: 0,
})
const bannerList = ref<PageResultIndexSettingRespVO[]>([])
const getBanner = async () => {
const { data: bannerList } = useAsyncData('get-setting-Page', async () => {
const res = await getSettingPage(pageReq)
if (res.code === 0) {
bannerList.value = res.data
}
}
getBanner()
return res.data
})
// const bannerList = ref<PageResultIndexSettingRespVO[]>([])
// const getBanner = async () => {
// const res = await getSettingPage(pageReq)
// if (res.code === 0) {
// bannerList.value = res.data
// }
// }
// getBanner()
const handleClick = (url: string) => {
navigateTo(url)