CraftJourney.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <script setup>
  2. import { reactive } from "vue";
  3. import axios from "axios";
  4. let travel = reactive({
  5. list: [],
  6. });
  7. (async () => {
  8. try {
  9. const response = await axios.get(
  10. "https://cmm.ai:8088/api/get_article?group_id=3"
  11. );
  12. travel.list = response.data.articles.filter(
  13. (e) => e.group_sort === "工藝行旅"
  14. );
  15. } catch (error) {
  16. console.error(error);
  17. }
  18. })();
  19. const breadcrumbs = reactive([
  20. {
  21. title: "首頁",
  22. disabled: false,
  23. href: "/",
  24. },
  25. {
  26. title: "生活工藝",
  27. href: "/college-group/life",
  28. disabled: false,
  29. },
  30. {
  31. title: "工藝行旅",
  32. disabled: true,
  33. },
  34. ]);
  35. </script>
  36. <template>
  37. <v-breadcrumbs
  38. :items="breadcrumbs"
  39. divider="/"
  40. class="mt-10 pa-0"
  41. ></v-breadcrumbs>
  42. <h2 class="title">工藝行旅</h2>
  43. <v-row class="px-md-8 trave-content">
  44. <v-col cols="12" class="mb-5">
  45. <h4>工藝文化深度旅遊,品味在地、標記生活</h4>
  46. <p>
  47. 打造以工藝為核心的文化深度旅遊路徑,結合工藝體驗、自然風土、地方美食、在地物產、
  48. <br />
  49. 建築等觀光資源,旅人緩步慢行,暫離喧囂、以手作沉澱自我,發現生命中的寧靜與感動。
  50. <br />
  51. 現在一起出發,感受工藝行旅的魅力和樂趣!
  52. </p>
  53. </v-col>
  54. <v-col
  55. cols="12"
  56. sm="6"
  57. md="4"
  58. v-for="item in travel.list"
  59. :key="item"
  60. class="py-5 info"
  61. >
  62. <a
  63. :href="
  64. $router.resolve(`/article-detail/${item.article_id}`).href
  65. "
  66. >
  67. <v-img
  68. :lazy-src="`https://ntcri.org/${item.cover_img}`"
  69. :src="`https://ntcri.org/${item.cover_img}`"
  70. cover
  71. >
  72. <template v-slot:placeholder>
  73. <div class="d-flex align-center justify-center fill-height">
  74. <v-progress-circular
  75. color="grey-lighten-4"
  76. indeterminate
  77. ></v-progress-circular>
  78. </div>
  79. </template>
  80. </v-img>
  81. <!-- <img :src="`https://ntcri.org/${item.cover_img}`" alt="" /> -->
  82. <section>
  83. <h3>{{ item.title }}</h3>
  84. <p>{{ item.depiction }}</p>
  85. </section>
  86. </a>
  87. </v-col>
  88. </v-row>
  89. </template>
  90. <style lang="scss" scoped>
  91. .info {
  92. .v-img {
  93. height: 215px;
  94. width: 100%;
  95. object-fit: cover;
  96. }
  97. section {
  98. width: 90%;
  99. }
  100. }
  101. </style>