introduction.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view class="home-container page-home-introduction d-flex flex-col bg-base">
  3. <u-navbar :autoBack="true" bgColor="transparent" />
  4. <image
  5. class="w-100 position-absolute"
  6. src="/static/images/home/BackgroundBanner2.jpg"
  7. mode="widthFix"
  8. />
  9. <view class="content d-flex flex-col wing-l">
  10. <!-- 标题 -->
  11. <view class="font-songti color-title-text d-flex flex-col align-center justify-center p-3">
  12. <text class="size-lll">闽南文化(厦门)生态保护区</text>
  13. <text class="size-base mt-2">世界闽南文化交流中心</text>
  14. </view>
  15. <!-- 分栏 -->
  16. <view class="shadow-l radius-l bg-base p-3">
  17. <SimplePageContentLoader :loader="introdData">
  18. <u-parse :content="introdData.content.value" :tag-style="commonParserStyle"></u-parse>
  19. </SimplePageContentLoader>
  20. </view>
  21. </view>
  22. </view>
  23. <tabbar :current="0"></tabbar>
  24. </template>
  25. <script setup lang="ts">
  26. import { GetContentListParams } from '@/api/CommonContent';
  27. import { useSimpleDataLoader } from '@/common/composeabe/SimpleDataLoader';
  28. import NewsIndexContent from '@/api/news/NewsIndexContent';
  29. import Tabbar from '@/common/components/tabs/tabbar.vue';
  30. import commonParserStyle from '@/common/style/commonParserStyle';
  31. import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
  32. const introdData = useSimpleDataLoader(async () => {
  33. return (await NewsIndexContent.getColumList(new GetContentListParams().setSelfValues({
  34. modelId: 3,
  35. mainBodyColumnId: 234,
  36. }))).list[0]?.overview || '无内容!请添加内容!!';
  37. }, true);
  38. </script>
  39. <style lang="scss">
  40. .page-home-introduction {
  41. .content {
  42. margin-top: 15vh;
  43. }
  44. }
  45. </style>