rule.vue 768 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <view class="u-content">
  3. <u-parse :html="content" v-show="!loading"></u-parse>
  4. <loading ref="loading" type="3"/>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. data() {
  10. return {
  11. loading:true,
  12. content: ''
  13. }
  14. },
  15. onLoad() {
  16. this.$refs.loading.showLoading()
  17. this.fetchDetail()
  18. },
  19. methods:{
  20. fetchDetail(){
  21. let params={
  22. title:'活动规则'
  23. }
  24. this.$api.notice.detail(params).then(res=>{
  25. this.content=res.data.data.content
  26. this.hideLoading()
  27. })
  28. },
  29. hideLoading(){
  30. setTimeout(()=>{
  31. this.$refs.loading.hide()
  32. this.loading=false
  33. },300)
  34. }
  35. }
  36. }
  37. </script>
  38. <style >
  39. page{
  40. background-color: #FFFFFF;
  41. }
  42. .u-content {
  43. padding: 30rpx;
  44. line-height: 50rpx;
  45. }
  46. </style>