From 9706fd18b3b88589e048840ff45d7a5f30f313cb Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Tue, 14 Jun 2022 19:35:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E5=88=87?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/details.vue | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/front/src/views/home/details.vue b/front/src/views/home/details.vue index 06423409..d07ddcfb 100644 --- a/front/src/views/home/details.vue +++ b/front/src/views/home/details.vue @@ -28,7 +28,8 @@ import AbilityToRecommendBottom from '@/views/home/components/AbilityToRecommendBottom' import AlgorithmDetails from '@/views/detailsAll/AlgorithmDetails' import ApplicationDetails from '@/views/detailsAll/ApplicationDetails' - + import { selectOne } from '@/api/home' + import { useRouter } from 'vue-router' export default defineComponent({ name: '', props: {}, @@ -74,11 +75,26 @@ label: '交通运输局', }, ]) - const showView = ref('application-details') + const router = useRouter() + const id = router.currentRoute.value.query.id + let showView = ref('algorithm-details') + const init = () => { + selectOne(id).then((res) => { + if (res.data.data.type == '组件服务') { + showView.value = 'algorithm-details' + } else { + showView.value = 'application-details' + } + }) + } + init() return { formState, options, showView, + init, + router, + id, } }, })