index.vue 755 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <view class="content">
  3. <view class="one">
  4. <rich-text :nodes="config.agreement"></rich-text>
  5. </view>
  6. </view>
  7. </template>
  8. <script setup lang="ts">
  9. import { ref } from 'vue';
  10. //该依赖已内置不需要单独安装
  11. import { onShow } from "@dcloudio/uni-app";
  12. // 基本信息
  13. const config = ref({ agreement: '' });
  14. onShow(() => {
  15. searchConfig();
  16. })
  17. // config信息
  18. const searchConfig = async () => {
  19. config.value = uni.getStorageSync('config');
  20. };
  21. </script>
  22. <style lang="scss" scoped>
  23. .content {
  24. display: flex;
  25. flex-direction: column;
  26. width: 100vw;
  27. height: 100vh;
  28. .one {
  29. padding: 2vw;
  30. .rich-img {
  31. width: 100% !important;
  32. display: block;
  33. }
  34. }
  35. }
  36. </style>