inhert.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. <template>
  2. <view class="home-container page-inhert d-flex flex-col bg-base">
  3. <image
  4. class="position-absolute title"
  5. src="https://mn.wenlvti.net/app_static/minnan/images/inhert/Title.png"
  6. mode="widthFix"
  7. />
  8. <view class="content d-flex flex-col ">
  9. <!-- 非遗项目 -->
  10. <HomeTitle title="非遗项目" showMore inWing @clickMore="navTo('inhert/intangible/list')" />
  11. <SimplePageContentLoader :loader="intangibleData" >
  12. <scroll-view scroll-x>
  13. <view class="padding-wing-l pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  14. <Box2LineLargeImageUserShadow
  15. v-for="(item, i) in intangibleData.content.value"
  16. classNames="width-2-3 mr-2"
  17. titleColor="title-text"
  18. :key="i"
  19. :title="item.title"
  20. :desc="item.desc"
  21. :image="item.image"
  22. :bottomLocate="item.bottomLocate"
  23. :bottomScore="item.bottomScore"
  24. @click="navTo('inhert/intangible/details', { id: item.id })"
  25. />
  26. </view>
  27. </scroll-view>
  28. </SimplePageContentLoader>
  29. <!-- 文物 -->
  30. <HomeTitle title="文物古迹" showMore inWing @clickMore="navTo('inhert/artifact/list')" />
  31. <SimplePageContentLoader :loader="artifactData">
  32. <scroll-view scroll-x>
  33. <view class="padding-wing-l pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  34. <Box2LineLargeImageUserShadow
  35. v-for="(item, i) in artifactData.content.value"
  36. classNames="width-2-5 mr-2"
  37. titleColor="title-text"
  38. :key="i"
  39. :title="item.title"
  40. :image="item.image"
  41. :likes="item.likes"
  42. :comment="item.comment"
  43. title1
  44. @click="navTo('inhert/artifact/details', { id: item.id })"
  45. />
  46. </view>
  47. </scroll-view>
  48. </SimplePageContentLoader>
  49. <!-- 非遗作品 -->
  50. <HomeTitle title="非遗产品(作品)" showMore inWing @clickMore="navTo('inhert/intangible/list')" />
  51. <SimplePageContentLoader :loader="productsData" >
  52. <scroll-view scroll-x>
  53. <view class="padding-wing-l pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  54. <Box2LineLargeImageUserShadow
  55. v-for="(item, i) in productsData.content.value"
  56. classNames="width-2-3 mr-2"
  57. titleColor="title-text"
  58. :key="i"
  59. :title="item.title"
  60. :desc="item.desc"
  61. :image="item.image"
  62. :bottomLocate="item.bottomLocate"
  63. :bottomScore="item.bottomScore"
  64. @click="navTo('inhert/intangible/details', { id: item.id })"
  65. />
  66. </view>
  67. </scroll-view>
  68. </SimplePageContentLoader>
  69. <!-- 闽南语在线课程 -->
  70. <HomeTitle title="闽南语在线课程" showMore inWing @clickMore="goCourseList" />
  71. <SimplePageContentLoader :loader="corseData" >
  72. <scroll-view scroll-x>
  73. <view class="padding-wing-l pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  74. <Box2LineLargeImageUserShadow
  75. v-for="(item, i) in corseData.content.value"
  76. classNames="width-2-3 mr-2"
  77. titleColor="title-text"
  78. :key="i"
  79. :title="item.title"
  80. :desc="item.desc"
  81. :image="item.thumbnail || item.image"
  82. :videoMark="true"
  83. @click="goCourseDetail(item.id)"
  84. />
  85. </view>
  86. </scroll-view>
  87. </SimplePageContentLoader>
  88. <view class="d-flex flex-col wing-l">
  89. <!-- 闽南语原创歌曲 -->
  90. <HomeTitle title="闽南语原创歌曲" showMore @clickMore="goMingnanSongsList" />
  91. <SimplePageContentLoader :loader="mingnanSongsData" >
  92. <Box1AudioPlay
  93. v-for="s in mingnanSongsData.content.value"
  94. :key="s.id"
  95. :title="s.title"
  96. class="w-100 mt-3"
  97. @click="goMingnanSongsDetail(s.id)"
  98. />
  99. </SimplePageContentLoader>
  100. <!-- 闽南语作品库 -->
  101. <HomeTitle title="闽南语作品库" showMore @clickMore="goSongsList" />
  102. <SimplePageContentLoader :loader="songsData" >
  103. <Box2LinePlayRightArrow
  104. v-for="s in songsData.content.value"
  105. :key="s.id"
  106. :title="s.title"
  107. :desc="s.desc"
  108. @click="goSongsDetail(s.id)"
  109. />
  110. </SimplePageContentLoader>
  111. </view>
  112. <!-- 老字号 -->
  113. <HomeTitle title="老字号" showMore inWing @clickMore="goOldList" />
  114. <SimplePageContentLoader :loader="oldData">
  115. <scroll-view scroll-x>
  116. <view class="padding-wing-l pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  117. <Box2LineLargeImageUserShadow
  118. v-for="(item, i) in oldData.content.value"
  119. classNames="width-2-3 mr-2"
  120. titleColor="title-text"
  121. :key="i"
  122. :title="item.title"
  123. :desc="item.desc"
  124. :image="item.thumbnail"
  125. :bottomLocate="(item.regionText as string)"
  126. :bottomScore="''"
  127. @click="goOldDetail(item.id)"
  128. />
  129. </view>
  130. </scroll-view>
  131. </SimplePageContentLoader>
  132. <!-- 童趣记忆 -->
  133. <HomeTitle title="童趣记忆" showMore inWing @clickMore="goMemoryList" />
  134. <SimplePageContentLoader :loader="memoryData" >
  135. <scroll-view scroll-x>
  136. <view class="padding-wing-l pb-3 pt-3 d-flex flex-row overflow-visible align-stretch">
  137. <Box2LineLargeImageUserShadow
  138. v-for="(item, i) in memoryData.content.value"
  139. classNames="width-2-3 mr-2"
  140. titleColor="title-text"
  141. :key="i"
  142. :title="item.title"
  143. :desc="item.desc"
  144. :image="item.thumbnail || item.image"
  145. @click="goMemoryDetail(item.id)"
  146. />
  147. </view>
  148. </scroll-view>
  149. </SimplePageContentLoader>
  150. <!-- 闽南知识百科 -->
  151. <view class="d-flex flex-col wing-l">
  152. <HomeTitle title="闽南知识百科" showMore @clickMore="goTopicsList" />
  153. <SimplePageContentLoader :loader="topicsData">
  154. <Box2LineRightShadow
  155. v-for="(item, i) in topicsData.content.value"
  156. :key="i"
  157. :title="item.title"
  158. :desc="item.desc"
  159. @click="goTopicsDetail(item.id)"
  160. />
  161. </SimplePageContentLoader>
  162. </view>
  163. </view>
  164. </view>
  165. <tabbar :current="2"></tabbar>
  166. </template>
  167. <script setup lang="ts">
  168. import { navTo } from '@/common/utils/PageAction';
  169. import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
  170. import { GetContentListParams } from '@/api/CommonContent';
  171. import Tabbar from '@/common/components/tabs/tabbar.vue';
  172. import HomeTitle from './parts/HomeTitle.vue';
  173. import Box2LineLargeImageUserShadow from './parts/Box2LineLargeImageUserShadow.vue';
  174. import Box2LinePlayRightArrow from './parts/Box2LinePlayRightArrow.vue';
  175. import Box1AudioPlay from './parts/Box1AudioPlay.vue';
  176. import Box2LineRightShadow from './parts/Box2LineRightShadow.vue';
  177. import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
  178. import ProjectsContent from '@/api/inheritor/ProjectsContent';
  179. import UnmoveableContent from '@/api/inheritor/UnmoveableContent';
  180. import { useHomePageMiniCommonListGoMoreAndGoDetail } from './article/common/CommonContent';
  181. import ProductsContent from '@/api/inheritor/ProductsContent';
  182. const artifactData = useSimpleDataLoader(async () =>
  183. (await UnmoveableContent.getContentList(new GetContentListParams(), 1, 4)).list.map(p => ({
  184. id: p.id,
  185. title: p.title,
  186. desc: '',
  187. image: p.thumbnail || p.image,
  188. likes: p.likes,
  189. comment: p.comments,
  190. }))
  191. );
  192. const intangibleData = useSimpleDataLoader(async () =>
  193. (await ProjectsContent.getContentList(new GetContentListParams(), 1, 4)).list.map(p => ({
  194. id: p.id,
  195. title: p.title,
  196. desc: p.desc,
  197. image: p.thumbnail || p.image,
  198. bottomLocate: p.area as string,
  199. bottomScore: '5.0',
  200. }))
  201. );
  202. const productsData = useSimpleDataLoader(async () =>
  203. (await ProductsContent.getContentList(new GetContentListParams(), 1, 4)).list.map(p => ({
  204. id: p.id,
  205. title: p.title,
  206. desc: p.desc,
  207. image: p.thumbnail || p.image,
  208. bottomLocate: p.area as string,
  209. bottomScore: '5.0',
  210. }))
  211. );
  212. const {
  213. loader: corseData,
  214. goList: goCourseList,
  215. goDetail: goCourseDetail,
  216. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  217. title: '闽南语在线课程',
  218. mainBodyColumnId: [257,235,237,210],
  219. modelId: 5,
  220. itemType: 'article-common',
  221. detailsPage: '/pages/video/details',
  222. });
  223. const {
  224. loader: songsData,
  225. goList: goSongsList,
  226. goDetail: goSongsDetail,
  227. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  228. title: '闽南语作品库',
  229. mainBodyColumnId: 189,
  230. modelId: 16,
  231. itemType: 'article-common',
  232. detailsPage: '/pages/video/details',
  233. });
  234. const {
  235. loader: mingnanSongsData,
  236. goList: goMingnanSongsList,
  237. goDetail: goMingnanSongsDetail,
  238. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  239. title: '闽南语原创歌曲',
  240. mainBodyColumnId: 315,
  241. modelId: 16,
  242. itemType: 'article-common',
  243. detailsPage: '/pages/video/details',
  244. });
  245. const {
  246. loader: memoryData,
  247. goList: goMemoryList,
  248. goDetail: goMemoryDetail,
  249. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  250. title: '童趣记忆',
  251. mainBodyColumnId: 96,
  252. modelId: 8,
  253. itemType: 'article-common',
  254. detailsPage: '/pages/article/details',
  255. });
  256. const {
  257. loader: oldData,
  258. goList: goOldList,
  259. goDetail: goOldDetail,
  260. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  261. title: '老字号',
  262. mainBodyColumnId: 312,
  263. modelId: 17,
  264. itemType: 'article-common',
  265. detailsPage: '/pages/article/details',
  266. });
  267. const {
  268. loader: topicsData,
  269. goList: goTopicsList,
  270. goDetail: goTopicsDetail,
  271. } = useHomePageMiniCommonListGoMoreAndGoDetail({
  272. title: '闽南知识百科',
  273. mainBodyColumnId: 43,
  274. modelId: 8,
  275. itemType: 'article-common',
  276. detailsPage: '/pages/article/details',
  277. });
  278. </script>
  279. <style lang="scss">
  280. .page-inhert {
  281. > .content {
  282. margin-top: 10vh;
  283. }
  284. > .title {
  285. width: 100rpx;
  286. }
  287. }
  288. </style>