details.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <div>
  3. <navBar @click="handleClickNav"></navBar>
  4. <div class="white-bgc">
  5. <service v-if="query.type === 'service' || query.type === 'industry'" :id="query.key" :type="query.type" class="content-box"></service>
  6. <consultant v-if="query.type === 'consultant'" :id="query.key" class="content-box"></consultant>
  7. <ArticleDrill v-if="query.type === 'article'" :id="query.key"></ArticleDrill>
  8. </div>
  9. </div>
  10. </template>
  11. <script setup>
  12. defineOptions({ name: 'headhuntingDetails' })
  13. import { useRouter } from 'vue-router'
  14. import navBar from './components/nav.vue'
  15. import service from './drill/service.vue'
  16. import consultant from './drill/consultant.vue'
  17. import ArticleDrill from './drill/article.vue'
  18. const router = useRouter()
  19. const query = router.currentRoute.value.query
  20. const handleClickNav = (path) => {
  21. if (!path) return
  22. router.push(path)
  23. }
  24. </script>
  25. <style scoped lang="scss">
  26. .content-box {
  27. width: 1000px;
  28. max-width: 1000px;
  29. min-width: 1000px;
  30. margin: 0 auto;
  31. }
  32. </style>