pageNavigation.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <div class="menuStyle1">
  3. 当前皮肤:{{ skinId }}
  4. <div class="menuBoxBg">
  5. <div class="menuBox" ref="menuBox">
  6. <div v-for="(item, index) in navigation" :key="index">
  7. <NuxtLink
  8. :href="getLinkPath(item)"
  9. :title="item.alias"
  10. :target="item.is_url == 1 ? '_blank' : '_self'"
  11. >
  12. {{ item.alias }}
  13. </NuxtLink>
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <script setup>
  20. //1.1 pinia
  21. import { useTemplateBaseStore } from '@/stores/templateBase'
  22. const templateBaseStore = useTemplateBaseStore()
  23. //获得皮肤id
  24. const skinId = ref("")
  25. skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
  26. //1.获取导航菜单 start ---------------------------------------->
  27. //第一行导航菜单 10个
  28. const navigation = ref([]);
  29. //获取导航菜单1
  30. async function getNavigation() {
  31. const mkdata = await requestDataPromise('/web/getWebsiteModelCategory', {
  32. method: 'GET',
  33. query: {
  34. 'pid': 0,
  35. 'num': 24,
  36. 'placeid': 1
  37. },
  38. });
  39. navigation.value = mkdata.data;
  40. }
  41. getNavigation();
  42. //1.获取导航菜单 end ---------------------------------------->
  43. </script>
  44. <style lang="less" scoped>
  45. @import url('@/assets/css/public/nav.less');
  46. </style>