inhert.vue 9.0 KB

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