Fix code formatting and error handling

This commit is contained in:
wangqiao
2025-08-27 16:31:23 +08:00
parent dc628e3494
commit 0f96406b5a
3 changed files with 21 additions and 19 deletions

View File

@ -43,7 +43,7 @@
},
]
)
const keywords = ref(route.query?.valuekeywords as string || '')
const keywords = ref((route.query?.valuekeywords as string) || '')
const query = ref<pageReq>({
pageNo: 1,
@ -74,14 +74,16 @@
getPage()
}
const { data:result, refresh:getPage } = await useAsyncData(`draw-page-list-${Date.now()}`, async () => {
const { data: result, refresh: getPage } = useAsyncData(
`draw-page-list-${Date.now()}`,
async () => {
const res = await page(query.value)
return res.data
},{
},
{
immediate: true,
})
}
)
// const getPage = () => {
// page(query).then((res) => {
// const { data, code } = res

View File

@ -162,13 +162,13 @@
return []
})
if (!projectTypeList.value?.length) {
throw createError({
statusCode: 404,
statusMessage: 'Page Not Found',
fatal: true,
})
}
// if (!projectTypeList.value?.length) {
// throw createError({
// statusCode: 404,
// statusMessage: 'Page Not Found',
// fatal: true,
// })
// }
const { data: hotTopList, refresh: getHotTop } = useAsyncData('hotTop-PopularDrawings-popularDrawings', async () => {
const res = await hotTop({