From 9d2863d6d37bd5964defecf7fcd70590e15d81f0 Mon Sep 17 00:00:00 2001 From: wangqiao Date: Sun, 14 Sep 2025 19:34:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=A5=E5=85=B7=E7=AE=B1?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/toolbox/index.vue | 48 +++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/pages/toolbox/index.vue b/pages/toolbox/index.vue index fc1129e..c58b128 100644 --- a/pages/toolbox/index.vue +++ b/pages/toolbox/index.vue @@ -10,7 +10,15 @@ - + @@ -133,12 +141,18 @@ `draw-page-toobox-list`, async () => { const res = await page(pageReq) - return res.data - },{ + if (res.code === 0) { + return res.data + } + return { + list: [], + total: 0, + } + }, + { immediate: true, } ) - const loading = ref(false) // const getPage = () => { @@ -180,29 +194,11 @@ return res.data }) - // 猜你喜欢 - // const recommendList = ref([]) // 猜你喜欢数据 - // const getRelationRecommendList = () => { - // getRelationRecommend({ - // type: 4, - // }).then((res) => { - // if (res.code === 0) { - // console.log(res.data) - // recommendList.value = res.data - // } - // }) - // } - // getRelationRecommendList() - - const projectTypeList = ref([]) - /** 获取分类下拉框 */ - const getParent = () => { - parent({ + const { data: projectTypeList } = await useAsyncData(`project-type-list`, async () => { + const res = await parent({ type: 3, parentId: 0, - }).then((res) => { - projectTypeList.value = res.data }) - } - getParent() + return res.data + })