index.vue 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <view class="content">
  3. <view class="title">{{title}}</view>
  4. <mp-html class="style-s" :content="contenet" />
  5. <!-- <rich-text class="style-s" :nodes="contenet"></rich-text> -->
  6. </view>
  7. </template>
  8. <script>
  9. import api from 'utils/api'
  10. import util from 'utils/util'
  11. import uParse from '@/components/gaoyia-parse/parse.vue'
  12. export default {
  13. components: {
  14. uParse
  15. },
  16. data() {
  17. return {
  18. contenet:'',
  19. title:''
  20. }
  21. },
  22. onLoad() {
  23. api.getSysConfig({}).then((res)=>{
  24. if(res.code==1){
  25. this.contenet=res.data.notice_content.replace(/\<img/gi, '<img style=max-width:100%;height:auto')
  26. this.title=res.data.notice_title
  27. }
  28. })
  29. },
  30. methods: {
  31. }
  32. }
  33. </script>
  34. <style lang="scss">
  35. .style-s{
  36. font-size: 24rpx;
  37. }
  38. .title{
  39. padding: 20rpx 0;
  40. font-size: 32rpx;
  41. color: #222;
  42. font-weight: bold;
  43. text-align: center;
  44. }
  45. .content{
  46. padding:30rpx;
  47. background-color: #fff;
  48. width: 640rpx;
  49. margin: 0 auto;
  50. border-radius: 16rpx;
  51. }
  52. </style>