travel.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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. import { onShareTimeline, onShareAppMessage } from '@dcloudio/uni-app';
  123. const CategoryIcon1 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon1.png';
  124. const CategoryIcon2 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon2.png';
  125. const CategoryIcon3 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon3.png';
  126. const CategoryIcon4 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon4.png';
  127. const CategoryIcon5 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon5.png';
  128. const CategoryIcon6 = 'https://mncdn.wenlvti.net/app_static/minnan/images/travel/CategoryIcon6.png';
  129. const subTabs = [
  130. {
  131. name: '节庆日历',
  132. icon: CategoryIcon1,
  133. onClick: () => navTo('/pages/travel/calendar'),
  134. },
  135. {
  136. name: '文化景区',
  137. icon: CategoryIcon2 ,
  138. onClick: () => navTo('/pages/article/common/list', {
  139. title: '文化景区',
  140. mainBodyColumnId: 273,
  141. modelId: 17,
  142. itemType: 'article-common',
  143. detailsPage: '/pages/article/details',
  144. })
  145. },
  146. {
  147. name: '旅游路线',
  148. icon: CategoryIcon3 ,
  149. onClick: () => navTo('/pages/article/common/list', {
  150. title: '旅游路线',
  151. mainBodyColumnId: '274,275,276,277',
  152. modelId: 17,
  153. itemType: 'article-common',
  154. detailsPage: '/pages/article/details',
  155. })
  156. },
  157. {
  158. name: '文化产品',
  159. icon: CategoryIcon4 ,
  160. onClick: () => navTo('/pages/article/common/list', {
  161. title: '文化产品',
  162. mainBodyColumnId: 48,
  163. modelId: 9,
  164. itemType: 'article-common',
  165. detailsPage: '/pages/article/details',
  166. })
  167. },
  168. {
  169. name: '非旅融合',
  170. icon: CategoryIcon5 ,
  171. onClick: () => navTo('/pages/article/common/list', {
  172. title: '非遗与旅游融合发展推荐',
  173. mainBodyColumnId: 278,
  174. modelId: 17,
  175. itemType: 'article-common',
  176. detailsPage: '/pages/article/details',
  177. })
  178. },
  179. {
  180. name: '闽南歌曲',
  181. icon: CategoryIcon6 ,
  182. onClick: () => navTo('/pages/article/common/list', {
  183. title: '闽南歌曲',
  184. mainBodyColumnId: 315,
  185. modelId: 16,
  186. itemType: 'article-common',
  187. detailsPage: '/pages/video/details',
  188. })
  189. },
  190. ]
  191. const {
  192. loader: routeData,
  193. goList: goRouteList,
  194. goDetail: goRouteDetail,
  195. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  196. title: '旅游路线',
  197. mainBodyColumnId: [274,275,276,277],
  198. modelId: 17,
  199. itemType: 'article-common',
  200. detailsPage: '/pages/article/details',
  201. });
  202. const {
  203. loader: recommendData,
  204. goList: goRecommendList,
  205. goDetail: goRecommendDetail,
  206. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  207. title: '文化景区',
  208. mainBodyColumnId: 273,
  209. modelId: 17,
  210. itemType: 'article-common',
  211. detailsPage: '/pages/article/details',
  212. });
  213. const {
  214. loader: creativeData,
  215. goList: goCreativeList,
  216. goDetail: goCreativeDetail,
  217. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  218. title: '文化产品',
  219. mainBodyColumnId: 48,
  220. modelId: 9,
  221. itemType: 'article-common',
  222. detailsPage: '/pages/article/details',
  223. });
  224. const activityData = useSimpleDataLoader(async () => [
  225. {
  226. title: '闽南文化节',
  227. desc: '泉州市区',
  228. right: '报名中',
  229. },
  230. {
  231. title: '泉州市区',
  232. desc: '泉州市区',
  233. right: '已截至',
  234. },
  235. ]);
  236. onShareTimeline(() => {
  237. return {};
  238. })
  239. onShareAppMessage(() => {
  240. return {};
  241. })
  242. </script>
  243. <style lang="scss">
  244. .page-travel {
  245. > .content {
  246. margin-top: 10vh;
  247. }
  248. > .title {
  249. width: 100rpx;
  250. }
  251. }
  252. </style>