Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

46 wiersze
909 B

  1. <template>
  2. <view class="agreement-page">
  3. <!-- #ifdef H5 -->
  4. <view class="txt" v-html="detail.content"></view>
  5. <!-- #endif -->
  6. <!-- #ifndef H5 -->
  7. <rich-text class="txt" :nodes="detail.content || ''"></rich-text>
  8. <!-- #endif -->
  9. </view>
  10. </template>
  11. <script setup>
  12. import { ref } from 'vue'
  13. import { onLoad } from '@dcloudio/uni-app'
  14. import { commonApi } from '@/api/index.js'
  15. const detail = ref({})
  16. onLoad((options) => {
  17. getHtmlInfo(options.key)
  18. })
  19. async function getHtmlInfo(key) {
  20. try {
  21. const res = await commonApi.getHtml({ key })
  22. detail.value = res.data || {}
  23. if (res.data && res.data.title) {
  24. uni.setNavigationBarTitle({ title: res.data.title })
  25. }
  26. } catch (e) {
  27. // 忽略
  28. }
  29. }
  30. </script>
  31. <style lang="scss" scoped>
  32. .agreement-page {
  33. padding: 30rpx;
  34. .txt {
  35. line-height: 1.6;
  36. font-size: 28rpx;
  37. color: $ai-text;
  38. }
  39. }
  40. </style>