discover.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  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://mn.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://mn.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://mn.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://mn.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. :likes="item.likes"
  104. :comment="item.comments"
  105. @click="goCultureDetail(item.id)"
  106. />
  107. </view>
  108. </SimplePageContentLoader>
  109. <!-- 热门话题 -->
  110. <!-- <HomeTitle title="热门话题" />
  111. <SimplePageContentLoader :loader="topicsData">
  112. <view class="d-flex flex-col">
  113. <Box2LineRightShadow
  114. v-for="(item, i) in topicsData.content.value"
  115. :key="i"
  116. :title="item.title"
  117. :desc="item.desc"
  118. :right="item.right"
  119. />
  120. </view>
  121. </SimplePageContentLoader> -->
  122. </view>
  123. </view>
  124. <tabbar :current="1"></tabbar>
  125. </template>
  126. <script setup lang="ts">
  127. import Tabbar from '@/common/components/tabs/tabbar.vue';
  128. import CategoryIcon1 from 'https://mn.wenlvti.net/app_static/minnan/images/discover/CategoryIcon1.png';
  129. import CategoryIcon2 from 'https://mn.wenlvti.net/app_static/minnan/images/discover/CategoryIcon2.png';
  130. import CategoryIcon3 from 'https://mn.wenlvti.net/app_static/minnan/images/discover/CategoryIcon3.png';
  131. import CategoryIcon4 from 'https://mn.wenlvti.net/app_static/minnan/images/discover/CategoryIcon4.png';
  132. import CategoryIcon5 from 'https://mn.wenlvti.net/app_static/minnan/images/discover/CategoryIcon5.png';
  133. import ImageTest2 from 'https://mn.wenlvti.net/app_static/minnan/images/home/ImageTest2.jpg';
  134. import ImageTest3 from 'https://mn.wenlvti.net/app_static/minnan/images/home/ImageTest3.jpg';
  135. import ImageTest4 from 'https://mn.wenlvti.net/app_static/minnan/images/home/ImageTest4.jpg';
  136. import ImageTest5 from 'https://mn.wenlvti.net/app_static/minnan/images/home/ImageTest5.jpg';
  137. import UserHead from 'https://mn.wenlvti.net/app_static/minnan/images/home/UserHead.png';
  138. import Box2LineRightShadow from './parts/Box2LineRightShadow.vue';
  139. import Box2LinePlayRightArrow from './parts/Box2LinePlayRightArrow.vue';
  140. import Box2LineRightSlot from './parts/Box2LineRightSlot.vue';
  141. import Box2LineLargeImageUserShadow from './parts/Box2LineLargeImageUserShadow.vue';
  142. import HomeTitle from './parts/HomeTitle.vue';
  143. import { navTo } from '@/common/utils/PageAction';
  144. import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
  145. import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
  146. import { useHomePageMiniCommonListGoMoreAndGoDetail } from './article/common/CommonContent';
  147. const categories = [
  148. {
  149. name: '海洋文化',
  150. icon: CategoryIcon5 ,
  151. onClick: () => navTo('/pages/article/common/list', {
  152. title: '海洋文化',
  153. mainBodyColumnId: 254,
  154. modelId: 3,
  155. itemType: 'article-common',
  156. detailsPage: '/pages/article/details',
  157. })
  158. },
  159. {
  160. name: '建筑遗产',
  161. icon: CategoryIcon2 ,
  162. onClick: () => navTo('/pages/article/common/list', {
  163. title: '建筑遗产',
  164. mainBodyColumnId: 252,
  165. modelId: 3,
  166. itemType: 'article-common',
  167. detailsPage: '/pages/article/details',
  168. })
  169. },
  170. {
  171. name: '闽南美食',
  172. icon: CategoryIcon4 ,
  173. onClick: () => navTo('/pages/article/common/list', {
  174. title: '闽南美食',
  175. mainBodyColumnId: 303,
  176. modelId: 17,
  177. itemType: 'article-common',
  178. detailsPage: '/pages/article/details',
  179. })
  180. },
  181. {
  182. name: '戏剧曲艺',
  183. icon: CategoryIcon3 ,
  184. onClick: () => navTo('/pages/article/common/list', {
  185. title: '戏剧曲艺',
  186. mainBodyColumnId: '240,241',
  187. modelId: 3,
  188. itemType: 'article-common',
  189. detailsPage: '/pages/article/details',
  190. })
  191. },
  192. {
  193. name: '音乐舞蹈',
  194. icon: CategoryIcon3 ,
  195. onClick: () => navTo('/pages/article/common/list', {
  196. title: '音乐舞蹈',
  197. mainBodyColumnId: 239,
  198. modelId: 3,
  199. itemType: 'article-common',
  200. detailsPage: '/pages/article/details',
  201. })
  202. },
  203. {
  204. name: '民俗文化',
  205. icon: CategoryIcon1 ,
  206. onClick: () => navTo('/pages/article/common/list', {
  207. title: '民俗文化',
  208. mainBodyColumnId: '245,248',
  209. modelId: 4,
  210. itemType: 'article-common',
  211. detailsPage: '/pages/article/details',
  212. })
  213. },
  214. {
  215. name: '美术技艺',
  216. icon: CategoryIcon1 ,
  217. onClick: () => navTo('/pages/article/common/list', {
  218. title: '美术技艺',
  219. mainBodyColumnId: 314,
  220. modelId: 3,
  221. itemType: 'article-common',
  222. detailsPage: '/pages/article/details',
  223. })
  224. },
  225. /* {
  226. name: '宗教信俗',
  227. icon: CategoryIcon5 ,
  228. onClick: () => navTo('/pages/article/common/list', {
  229. title: '宗教信俗',
  230. mainBodyColumnId: 248,
  231. modelId: 4,
  232. itemType: 'article-common',
  233. detailsPage: '/pages/article/details',
  234. })
  235. }, */
  236. ];
  237. const communityData = useSimpleDataLoader(async () => {
  238. return [
  239. {
  240. title: '茶艺传承作坊',
  241. desc: '',
  242. image: ImageTest4,
  243. likes: 123,
  244. comment: 66,
  245. userHead: UserHead,
  246. userName: 'Regular',
  247. },
  248. {
  249. title: '茶艺传承作坊',
  250. desc: '',
  251. image: ImageTest2,
  252. likes: 123,
  253. comment: 66,
  254. userHead: UserHead,
  255. userName: 'Regular',
  256. },
  257. {
  258. title: '茶艺传承作坊',
  259. desc: '',
  260. image: ImageTest3,
  261. likes: 123,
  262. comment: 66,
  263. userHead: UserHead,
  264. userName: 'Regular',
  265. },
  266. {
  267. title: '茶艺传承作坊',
  268. desc: '',
  269. image: ImageTest5,
  270. likes: 123,
  271. comment: 66,
  272. userHead: UserHead,
  273. userName: 'Regular',
  274. },
  275. ]
  276. });
  277. const {
  278. loader: cultureData,
  279. goList: goCultureList,
  280. goDetail: goCultureDetail,
  281. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  282. title: '闽南文化',
  283. mainBodyColumnId: [252,253,254],
  284. modelId: 3,
  285. itemType: 'article-common',
  286. detailsPage: '/pages/article/details',
  287. });
  288. const {
  289. loader: imagesData,
  290. goList: goImagesList,
  291. goDetail: goImagesDetail,
  292. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  293. title: '老照片',
  294. mainBodyColumnId: 102,
  295. modelId: 8,
  296. itemType: 'image-large-2',
  297. detailsPage: '/pages/article/details',
  298. });
  299. const topicsData = useSimpleDataLoader(async () => {
  300. return [
  301. {
  302. title: '宗族文化探讨',
  303. desc: '关于闽南宗教的传承与发展',
  304. right: '234 人参与讨论',
  305. },
  306. {
  307. title: '宗族文化探讨',
  308. desc: '关于闽南宗教的传承与发展',
  309. right: '234 人参与讨论',
  310. },
  311. ]
  312. });
  313. </script>
  314. <style lang="scss">
  315. .page-discover {
  316. > .content {
  317. margin-top: 10vh;
  318. }
  319. > .title {
  320. width: 100rpx;
  321. }
  322. .grid4-item {
  323. width: 330rpx;
  324. }
  325. }
  326. </style>