travel.vue 7.0 KB

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