discover.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <template>
  2. <view class="home-container page-discover d-flex flex-col bg-base">
  3. <image
  4. class="position-absolute title"
  5. src="/static/images/discover/Title.png"
  6. mode="widthFix"
  7. />
  8. <view class="content d-flex flex-col wing-l">
  9. <!-- 文化百科 -->
  10. <HomeTitle title="文化百科" />
  11. <view class="d-flex flex-row justify-between">
  12. <view
  13. v-for="(item, i) in categories"
  14. :key="i"
  15. class="d-flex flex-col align-center"
  16. @click="item.onClick"
  17. >
  18. <image :src="item.icon" class="width-100 height-100" />
  19. <text class="width-130 text-align-center mt-2 color-primary size-s">{{ item.name }}</text>
  20. </view>
  21. </view>
  22. <!-- 闽南语猜猜猜 -->
  23. <view class="home-title">
  24. <text>闽南语猜猜猜</text>
  25. </view>
  26. <Box2LinePlayRightArrow
  27. title="听语音猜词语"
  28. desc="每日更新,赢取积分"
  29. @click="navTo('/pages/answer/words/index')"
  30. />
  31. <!-- 文化挑战 -->
  32. <HomeTitle title="文化挑战" />
  33. <!--
  34. 方言配音大赛隐藏
  35. <Box2LineRightSlot
  36. title="方言配音大赛"
  37. desc="参与人数:1,234"
  38. @click="navTo('/pages/answer/index')"
  39. >
  40. <image class="width-60 height-60 radius-base" src="/static/images/discover/IconCup.png" mode="aspectFill" />
  41. </Box2LineRightSlot> -->
  42. <Box2LineRightSlot
  43. title="闽南知识问答"
  44. desc="可获积分:500"
  45. >
  46. <view class="width-1-5">
  47. <u-button shape="circle" type="primary" @click="navTo('/pages/answer/index')">立即报名</u-button>
  48. </view>
  49. </Box2LineRightSlot>
  50. <!-- 文化社区 -->
  51. <HomeTitle title="文化社区" />
  52. <SimplePageContentLoader :loader="communityData">
  53. <view class="d-flex w-100 flex-row flex-wrap align-center justify-between">
  54. <Box2LineLargeImageUserShadow
  55. v-for="(item, i) in communityData.content.value"
  56. :key="i"
  57. :title="item.title"
  58. :desc="item.desc"
  59. :image="item.image"
  60. :userName="item.userName"
  61. :userHead="item.userHead"
  62. :likes="item.likes"
  63. :comment="item.comment"
  64. />
  65. </view>
  66. </SimplePageContentLoader>
  67. <!-- 老照片 -->
  68. <HomeTitle title="老照片" showMore />
  69. <SimplePageContentLoader :loader="imagesData">
  70. <scroll-view scroll-x>
  71. <view class="d-flex flex-row">
  72. <view v-for="(item, i) in imagesData.content.value" :key="i" class="mr-2">
  73. <image class="width-300 radius-base" :src="item.image" mode="widthFix" />
  74. </view>
  75. </view>
  76. </scroll-view>
  77. </SimplePageContentLoader>
  78. <!-- 热门话题 -->
  79. <!-- <HomeTitle title="热门话题" />
  80. <SimplePageContentLoader :loader="topicsData">
  81. <view class="d-flex flex-col">
  82. <Box2LineRightShadow
  83. v-for="(item, i) in topicsData.content.value"
  84. :key="i"
  85. :title="item.title"
  86. :desc="item.desc"
  87. :right="item.right"
  88. />
  89. </view>
  90. </SimplePageContentLoader> -->
  91. </view>
  92. </view>
  93. <tabbar :current="1"></tabbar>
  94. </template>
  95. <script setup lang="ts">
  96. import Tabbar from '@/common/components/tabs/tabbar.vue';
  97. import CategoryIcon1 from '/static/images/discover/CategoryIcon1.png';
  98. import CategoryIcon2 from '/static/images/discover/CategoryIcon2.png';
  99. import CategoryIcon3 from '/static/images/discover/CategoryIcon3.png';
  100. import CategoryIcon4 from '/static/images/discover/CategoryIcon4.png';
  101. import CategoryIcon5 from '/static/images/discover/CategoryIcon5.png';
  102. import ImageTest2 from '/static/images/home/ImageTest2.jpg';
  103. import ImageTest3 from '/static/images/home/ImageTest3.jpg';
  104. import ImageTest4 from '/static/images/home/ImageTest4.jpg';
  105. import ImageTest5 from '/static/images/home/ImageTest5.jpg';
  106. import UserHead from '/static/images/home/UserHead.png';
  107. import Box2LineRightShadow from './parts/Box2LineRightShadow.vue';
  108. import Box2LinePlayRightArrow from './parts/Box2LinePlayRightArrow.vue';
  109. import Box2LineRightSlot from './parts/Box2LineRightSlot.vue';
  110. import Box2LineLargeImageUserShadow from './parts/Box2LineLargeImageUserShadow.vue';
  111. import HomeTitle from './parts/HomeTitle.vue';
  112. import { navTo } from '@/common/utils/PageAction';
  113. import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
  114. import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
  115. const categories = [
  116. {
  117. name: '民俗文化',
  118. icon: CategoryIcon1 ,
  119. onClick: () => navTo('/pages/article/common/list', {
  120. title: '民俗文化',
  121. mainBodyColumnId: 0,
  122. modelId: 0,
  123. itemType: 'article-common',
  124. detailsPage: '/pages/article/details',
  125. })
  126. },
  127. {
  128. name: '建筑遗产',
  129. icon: CategoryIcon2 ,
  130. onClick: () => navTo('/pages/article/common/list', {
  131. title: '建筑遗产',
  132. mainBodyColumnId: 0,
  133. modelId: 0,
  134. itemType: 'article-common',
  135. detailsPage: '/pages/article/details',
  136. })
  137. },
  138. {
  139. name: '戏曲艺术',
  140. icon: CategoryIcon3 ,
  141. onClick: () => navTo('/pages/article/common/list', {
  142. title: '戏曲艺术',
  143. mainBodyColumnId: 0,
  144. modelId: 0,
  145. itemType: 'article-common',
  146. detailsPage: '/pages/article/details',
  147. })
  148. },
  149. {
  150. name: '闽南美食',
  151. icon: CategoryIcon4 ,
  152. onClick: () => navTo('/pages/article/common/list', {
  153. title: '闽南美食',
  154. mainBodyColumnId: 0,
  155. modelId: 0,
  156. itemType: 'article-common',
  157. detailsPage: '/pages/article/details',
  158. })
  159. },
  160. {
  161. name: '宗教信仰',
  162. icon: CategoryIcon5 ,
  163. onClick: () => navTo('/pages/article/common/list', {
  164. title: '宗教信仰',
  165. mainBodyColumnId: 0,
  166. modelId: 0,
  167. itemType: 'article-common',
  168. detailsPage: '/pages/article/details',
  169. })
  170. },
  171. ];
  172. const communityData = useSimpleDataLoader(async () => {
  173. return [
  174. {
  175. title: '茶艺传承作坊',
  176. desc: '',
  177. image: ImageTest4,
  178. likes: 123,
  179. comment: 66,
  180. userHead: UserHead,
  181. userName: 'Regular',
  182. },
  183. {
  184. title: '茶艺传承作坊',
  185. desc: '',
  186. image: ImageTest2,
  187. likes: 123,
  188. comment: 66,
  189. userHead: UserHead,
  190. userName: 'Regular',
  191. },
  192. {
  193. title: '茶艺传承作坊',
  194. desc: '',
  195. image: ImageTest3,
  196. likes: 123,
  197. comment: 66,
  198. userHead: UserHead,
  199. userName: 'Regular',
  200. },
  201. {
  202. title: '茶艺传承作坊',
  203. desc: '',
  204. image: ImageTest5,
  205. likes: 123,
  206. comment: 66,
  207. userHead: UserHead,
  208. userName: 'Regular',
  209. },
  210. ]
  211. });
  212. const imagesData = useSimpleDataLoader(async () => {
  213. return [
  214. {
  215. image: ImageTest2,
  216. },
  217. {
  218. image: ImageTest3,
  219. },
  220. {
  221. image: ImageTest4,
  222. },
  223. {
  224. image: ImageTest5,
  225. }
  226. ]
  227. });
  228. const topicsData = useSimpleDataLoader(async () => {
  229. return [
  230. {
  231. title: '宗族文化探讨',
  232. desc: '关于闽南宗教的传承与发展',
  233. right: '234 人参与讨论',
  234. },
  235. {
  236. title: '宗族文化探讨',
  237. desc: '关于闽南宗教的传承与发展',
  238. right: '234 人参与讨论',
  239. },
  240. ]
  241. });
  242. </script>
  243. <style lang="scss">
  244. .page-discover {
  245. > .content {
  246. margin-top: 10vh;
  247. }
  248. > .title {
  249. width: 100rpx;
  250. }
  251. .grid4-item {
  252. width: 330rpx;
  253. }
  254. }
  255. </style>