travel.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <template>
  2. <view class="home-container page-travel d-flex flex-col bg-base">
  3. <image
  4. class="position-absolute title"
  5. src="https://mncdn.wenlvti.net/app_static/minnan/images/travel/Title.png"
  6. mode="widthFix"
  7. />
  8. <view class="content d-flex flex-col">
  9. <view class="content d-flex flex-col wing-l">
  10. <!-- 大图 -->
  11. <image
  12. class="w-100"
  13. src="https://mncdn.wenlvti.net/app_static/minnan/images/travel/Banner.jpg"
  14. mode="widthFix"
  15. />
  16. <!-- 分栏 -->
  17. <view
  18. class="position-relative d-grid mt-3"
  19. style="grid: repeat(2, 3fr) / auto-flow; grid-gap: 20rpx;"
  20. >
  21. <view
  22. v-for="(tab, k) in subTabs"
  23. :key="k"
  24. class="d-flex bg-light-light-primary radius-base p-2 flex-column align-center"
  25. @click="tab.onClick"
  26. >
  27. <image class="width-100" :src="tab.icon" mode="widthFix" />
  28. <text class="color-title-text mt-2">{{ tab.name }}</text>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 精品路线 -->
  33. <HomeTitle title="精品路线" showMore inWing @clickMore="goRouteList" />
  34. <SimplePageContentLoader :loader="routeData">
  35. <scroll-view scroll-x>
  36. <view class="padding-wing-l pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  37. <Box2LineLargeImageUserShadow
  38. v-for="(item, i) in routeData.content.value"
  39. classNames="width-2-3 mr-2"
  40. titleColor="title-text"
  41. fixSize
  42. :key="i"
  43. :title="item.title"
  44. :desc="item.desc"
  45. :image="item.thumbnail || item.image"
  46. @click="goRouteDetail(item.id)"
  47. />
  48. </view>
  49. </scroll-view>
  50. </SimplePageContentLoader>
  51. <!-- 精选推荐 -->
  52. <HomeTitle title="精选推荐" showMore inWing @clickMore="goRecommendList" />
  53. <SimplePageContentLoader :loader="recommendData">
  54. <scroll-view scroll-x>
  55. <view class="padding-wing-l pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  56. <Box2LineLargeImageUserShadow
  57. v-for="(item, i) in recommendData.content.value"
  58. classNames="width-2-3 mr-2"
  59. titleColor="title-text"
  60. fixSize
  61. :key="i"
  62. :title="item.title"
  63. title1
  64. :image="item.thumbnail || item.image"
  65. :bottomLocate="item.district"
  66. :bottomScore="'5.0'"
  67. @click="goRecommendDetail(item.id)"
  68. />
  69. </view>
  70. </scroll-view>
  71. </SimplePageContentLoader>
  72. <!-- 文创好物 -->
  73. <HomeTitle title="文创好物" showMore inWing @clickMore="goCreativeList" />
  74. <SimplePageContentLoader :loader="creativeData">
  75. <scroll-view scroll-x>
  76. <view class="padding-wing-l pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  77. <Box2LineLargeImageUserShadow
  78. v-for="(item, i) in creativeData.content.value"
  79. classNames="width-2-3 mr-2"
  80. titleColor="title-text"
  81. fixSize
  82. :key="i"
  83. :title="item.title"
  84. :image="item.thumbnail || item.image"
  85. @click="goCreativeDetail(item.id)"
  86. />
  87. </view>
  88. </scroll-view>
  89. </SimplePageContentLoader>
  90. <!-- 近期活动 -->
  91. <!-- <view class="d-flex flex-col wing-l">
  92. <HomeTitle title="近期活动" showMore />
  93. <SimplePageContentLoader :loader="activityData">
  94. <Box2LineRightShadow
  95. v-for="(item, i) in activityData.content.value"
  96. :key="i"
  97. :title="item.title"
  98. :desc="item.desc"
  99. :right="item.right"
  100. >
  101. <template #left>
  102. <view class="d-flex flex-col justify-center align-center radius-base bg-light-light-primary p-25 pt-2 pb-2">
  103. <text class="color-primary size-s">12月</text>
  104. <text class="color-primary size-base text-bold">28</text>
  105. </view>
  106. </template>
  107. </Box2LineRightShadow>
  108. </SimplePageContentLoader>
  109. </view> -->
  110. </view>
  111. </view>
  112. <tabbar :current="3"></tabbar>
  113. </template>
  114. <script setup lang="ts">
  115. import Tabbar from '@/common/components/tabs/tabbar.vue';
  116. import Box2LineLargeImageUserShadow from './parts/Box2LineLargeImageUserShadow.vue';
  117. import HomeTitle from './parts/HomeTitle.vue';
  118. import { useHomePageMiniCommonListGoMoreAndGoDetail } from './article/common/CommonContent';
  119. import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
  120. import { navTo } from '@/common/utils/PageAction';
  121. import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
  122. const CategoryIcon1 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon1.png';
  123. const CategoryIcon2 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon2.png';
  124. const CategoryIcon3 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon3.png';
  125. const CategoryIcon4 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon4.png';
  126. const CategoryIcon5 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon5.png';
  127. const CategoryIcon6 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon6.png';
  128. const subTabs = [
  129. {
  130. name: '节庆日历',
  131. icon: CategoryIcon1,
  132. onClick: () => navTo('/pages/travel/calendar'),
  133. },
  134. {
  135. name: '文化景区',
  136. icon: CategoryIcon2 ,
  137. onClick: () => navTo('/pages/article/common/list', {
  138. title: '文化景区',
  139. mainBodyColumnId: 273,
  140. modelId: 17,
  141. itemType: 'article-common',
  142. detailsPage: '/pages/article/details',
  143. })
  144. },
  145. {
  146. name: '旅游路线',
  147. icon: CategoryIcon3 ,
  148. onClick: () => navTo('/pages/article/common/list', {
  149. title: '旅游路线',
  150. mainBodyColumnId: '274,275,276,277',
  151. modelId: 17,
  152. itemType: 'article-common',
  153. detailsPage: '/pages/article/details',
  154. })
  155. },
  156. {
  157. name: '文化产品',
  158. icon: CategoryIcon4 ,
  159. onClick: () => navTo('/pages/article/common/list', {
  160. title: '文化产品',
  161. mainBodyColumnId: 48,
  162. modelId: 9,
  163. itemType: 'article-common',
  164. detailsPage: '/pages/article/details',
  165. })
  166. },
  167. {
  168. name: '非旅融合',
  169. icon: CategoryIcon5 ,
  170. onClick: () => navTo('/pages/article/common/list', {
  171. title: '非遗与旅游融合发展推荐',
  172. mainBodyColumnId: 278,
  173. modelId: 17,
  174. itemType: 'article-common',
  175. detailsPage: '/pages/article/details',
  176. })
  177. },
  178. {
  179. name: '闽南歌曲',
  180. icon: CategoryIcon6 ,
  181. onClick: () => navTo('/pages/article/common/list', {
  182. title: '闽南歌曲',
  183. mainBodyColumnId: 315,
  184. modelId: 16,
  185. itemType: 'article-common',
  186. detailsPage: '/pages/video/details',
  187. })
  188. },
  189. ]
  190. const {
  191. loader: routeData,
  192. goList: goRouteList,
  193. goDetail: goRouteDetail,
  194. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  195. title: '旅游路线',
  196. mainBodyColumnId: [274,275,276,277],
  197. modelId: 17,
  198. itemType: 'article-common',
  199. detailsPage: '/pages/article/details',
  200. });
  201. const {
  202. loader: recommendData,
  203. goList: goRecommendList,
  204. goDetail: goRecommendDetail,
  205. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  206. title: '文化景区',
  207. mainBodyColumnId: 273,
  208. modelId: 17,
  209. itemType: 'article-common',
  210. detailsPage: '/pages/article/details',
  211. });
  212. const {
  213. loader: creativeData,
  214. goList: goCreativeList,
  215. goDetail: goCreativeDetail,
  216. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  217. title: '文化产品',
  218. mainBodyColumnId: 48,
  219. modelId: 9,
  220. itemType: 'article-common',
  221. detailsPage: '/pages/article/details',
  222. });
  223. const activityData = useSimpleDataLoader(async () => [
  224. {
  225. title: '闽南文化节',
  226. desc: '泉州市区',
  227. right: '报名中',
  228. },
  229. {
  230. title: '泉州市区',
  231. desc: '泉州市区',
  232. right: '已截至',
  233. },
  234. ]);
  235. </script>
  236. <style lang="scss">
  237. .page-travel {
  238. > .content {
  239. margin-top: 10vh;
  240. }
  241. > .title {
  242. width: 100rpx;
  243. }
  244. }
  245. </style>