privacy.vue 806 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view style="line-height: 26px;padding: 32upx;" class="home1">
  3. <view style="font-size: 28upx;" v-html="content"></view>
  4. </view>
  5. </template>
  6. <script setup>
  7. import {
  8. ref
  9. } from 'vue'
  10. import {
  11. onLoad
  12. } from '@dcloudio/uni-app'
  13. import { post, get } from '@/utils/request'
  14. const content = ref('')
  15. const getGuize = async () => {
  16. try {
  17. const res = await get('/api/protocolConfig/findByType',{
  18. type: 2
  19. })
  20. if (res.code === '200') {
  21. content.value = res.data.text
  22. } else {
  23. uni.showToast({ title: res.message || '获取失败', icon: 'none' })
  24. }
  25. } catch (err) {
  26. // console.log('请求失败:', err)
  27. uni.showToast({ title: '请求失败,请稍后重试', icon: 'none' })
  28. }
  29. }
  30. onLoad(() => {
  31. getGuize()
  32. })
  33. </script>
  34. <style>
  35. </style>