详情页面切换
This commit is contained in:
parent
ea9f61ede8
commit
9706fd18b3
|
@ -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,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue