travel.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <FlexCol :padding="30" backgroundColor="background.page">
  3. <!-- 闽南节庆日历 -->
  4. <!-- <HomeTitle title="闽南节庆日历" showMore @clickMore="navTo('/pages/travel/calendar/index')" />
  5. <CalendarBlock /> -->
  6. <!-- 闽南文化景区、景点 -->
  7. <HomeTitle title="闽南文化景区、景点" showMore @clickMore="navTo('/pages/travel/scenic-spot/list')" />
  8. <SimplePageContentLoader :loader="spotData">
  9. <scroll-view scroll-x>
  10. <FlexCol>
  11. <Box2LineImageRightShadow
  12. v-for="(item, i) in spotData.content.value"
  13. titleColor="title-text"
  14. fixSize
  15. :key="i"
  16. :title="item.title"
  17. :desc="item.desc"
  18. :image="item.image"
  19. :tags="item.bottomTags"
  20. @click="navTo('/pages/inhert/intangible/details', { id: item.id })"
  21. />
  22. </FlexCol>
  23. </scroll-view>
  24. </SimplePageContentLoader>
  25. <!-- 闽南时尚 -->
  26. <HomeTitle title="闽南时尚" showMore @clickMore="navTo('/pages/travel/fashion/list')" />
  27. <SimplePageContentLoader :loader="songsData">
  28. <FlexRow wrap align="stretch" justify="space-between" overflow="visible">
  29. <Box2LineLargeImageUserShadow
  30. v-for="(item, i) in songsData.content.value"
  31. titleColor="title-text"
  32. width="calc(50% - 10rpx)"
  33. fixSize
  34. :key="i"
  35. :title="item.title"
  36. :desc="item.desc"
  37. :image="item.image"
  38. @click="goSongsDetail(item.id)"
  39. />
  40. </FlexRow>
  41. </SimplePageContentLoader>
  42. <!-- 文化旅游路线 -->
  43. <HomeTitle title="文化旅游路线" showMore @clickMore="goRouteList" />
  44. <SimplePageContentLoader :loader="routeData">
  45. <scroll-view scroll-x>
  46. <view class="pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  47. <Box2LineLargeImageUserShadow
  48. v-for="(item, i) in routeData.content.value"
  49. classNames="width-2-3 mr-2"
  50. titleColor="title-text"
  51. fixSize
  52. :key="i"
  53. :title="item.title"
  54. :desc="item.desc"
  55. :image="item.thumbnail || item.image"
  56. @click="goRouteDetail(item.id)"
  57. />
  58. </view>
  59. </scroll-view>
  60. </SimplePageContentLoader>
  61. <!-- 文化产品 -->
  62. <HomeTitle title="文化产品" showMore @clickMore="goCreativeList" />
  63. <SimplePageContentLoader :loader="creativeData">
  64. <scroll-view scroll-x>
  65. <view class="pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  66. <Box2LineLargeImageUserShadow
  67. v-for="(item, i) in creativeData.content.value"
  68. classNames="width-2-3 mr-2"
  69. titleColor="title-text"
  70. fixSize
  71. :key="i"
  72. :title="item.title"
  73. :image="item.thumbnail || item.image"
  74. @click="goCreativeDetail(item.id)"
  75. />
  76. </view>
  77. </scroll-view>
  78. </SimplePageContentLoader>
  79. <!-- 闽南语在线课程-->
  80. <HomeTitle title="闽南语在线课程" :showMore="false" @clickMore="goCourseList" />
  81. <SimplePageContentLoader :loader="corseData" >
  82. <scroll-view scroll-x>
  83. <view class="pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  84. <Box2LineLargeImageUserShadow
  85. v-for="(item, i) in corseData.content.value"
  86. classNames="width-2-3 mr-2"
  87. titleColor="title-text"
  88. fixSize
  89. :key="i"
  90. :title="item.title"
  91. :desc="item.desc"
  92. :image="item.thumbnail || item.image"
  93. @click="goCourseDetail(item.id)"
  94. />
  95. </view>
  96. </scroll-view>
  97. </SimplePageContentLoader>
  98. <Footer text="我也是有底线的~" />
  99. </FlexCol>
  100. </template>
  101. <script setup lang="ts">
  102. import { navTo } from '@/components/utils/PageAction';
  103. import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
  104. import { useHomePageMiniCommonListGoMoreAndGoDetail } from '../article/common/CommonContent';
  105. import { GetContentListParams } from '@/api/CommonContent';
  106. import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
  107. import FlexCol from '@/components/layout/FlexCol.vue';
  108. import HomeTitle from '../parts/HomeTitle.vue';
  109. import Box2LineLargeImageUserShadow from '../parts/Box2LineLargeImageUserShadow.vue';
  110. import Box2LineImageRightShadow from '../parts/Box2LineImageRightShadow.vue';
  111. import ScenicSpotContent from '@/api/fusion/ScenicSpotContent';
  112. import FlexRow from '@/components/layout/FlexRow.vue';
  113. import Footer from '@/components/display/Footer.vue';
  114. const spotData = useSimpleDataLoader(async () =>
  115. (await ScenicSpotContent.getContentList(new GetContentListParams(), 1, 4)).list.map(p => ({
  116. id: p.id,
  117. title: p.title,
  118. desc: p.desc,
  119. image: p.thumbnail || p.image,
  120. bottomTags: [
  121. p.levelText,
  122. p.ichTypeText,
  123. p.batchText,
  124. p.regionText,
  125. ] as string[],
  126. }))
  127. );
  128. const {
  129. loader: songsData,
  130. goDetail: goSongsDetail,
  131. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  132. title: '闽南时尚',
  133. mainBodyColumnId: [315],
  134. modelId: 16,
  135. itemType: 'article-common',
  136. detailsPage: '/pages/video/details',
  137. });
  138. const {
  139. loader: corseData,
  140. goList: goCourseList,
  141. goDetail: goCourseDetail,
  142. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  143. title: '闽南语在线课程',
  144. mainBodyColumnId: [257/* ,235,237,210 */],
  145. modelId: 5,
  146. itemType: 'article-common',
  147. detailsPage: '/pages/video/details',
  148. });
  149. const {
  150. loader: routeData,
  151. goList: goRouteList,
  152. goDetail: goRouteDetail,
  153. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  154. title: '旅游路线',
  155. mainBodyColumnId: [274,275,276,277],
  156. modelId: 17,
  157. itemType: 'article-common',
  158. detailsPage: '/pages/article/details',
  159. });
  160. const {
  161. loader: recommendData,
  162. goList: goRecommendList,
  163. goDetail: goRecommendDetail,
  164. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  165. title: '文化景区',
  166. mainBodyColumnId: 273,
  167. modelId: 17,
  168. itemType: 'article-common',
  169. detailsPage: '/pages/article/details',
  170. });
  171. const {
  172. loader: creativeData,
  173. goList: goCreativeList,
  174. goDetail: goCreativeDetail,
  175. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  176. title: '文化产品',
  177. mainBodyColumnId: 48,
  178. modelId: 9,
  179. itemType: 'article-common',
  180. detailsPage: '/pages/article/details',
  181. });
  182. </script>