travel.vue 7.7 KB

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