notice.vue 1013 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="home">
  3. <view class="title">
  4. {{info.noticeTitle}}
  5. </view>
  6. <text class="time">创建时间:{{info.createTime}}</text>
  7. <rich-text :nodes="info.noticeContent" style="text-indent: 2em;" class="content"></rich-text>
  8. </view>
  9. </template>
  10. <script>
  11. import { getNoticeDetail } from '@/api/notice.js'
  12. export default {
  13. data() {
  14. return {
  15. info:{},
  16. id:null
  17. };
  18. },
  19. onLoad:function(option){
  20. this.id = option.id
  21. console.log(this.id)
  22. this.init()
  23. },
  24. methods:{
  25. init(){
  26. getNoticeDetail(this.id).then(res=>{
  27. this.info = res
  28. })
  29. }
  30. }
  31. }
  32. </script>
  33. <style lang="scss">
  34. .home{
  35. padding:0 30rpx 30rpx;
  36. .title{
  37. color: rgba(80, 80, 80, 1);
  38. font-size: 40rpx;
  39. line-height: 300%;
  40. text-align: center;
  41. }
  42. .time{
  43. color: rgba(80, 80, 80, 1);
  44. font-size: 28rpx;
  45. line-height: 200%;
  46. text-align: left;
  47. }
  48. .content{
  49. color: rgba(102, 102, 102, 1);
  50. font-size: 30rpx;
  51. line-height: 190%;
  52. text-align: left;
  53. text-indent: 2em;
  54. }
  55. }
  56. </style>