discover.vue 10 KB

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