noticeDetails.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view class="notice-item">
  3. <view class="notice_name">{{info.title}}</view>
  4. <view class="flex notice_text">
  5. <text class="">作者:{{info.author}}</text>
  6. <text class="">{{info.createtime}}</text>
  7. </view>
  8. <view class="notice_content" v-html="info.content"></view>
  9. </view>
  10. </template>
  11. <script>
  12. import { getDetail } from '@/api/notice.js';
  13. export default {
  14. data() {
  15. return {
  16. id:'',
  17. info:""
  18. };
  19. },
  20. onLoad(options) {
  21. this.id = options.id;
  22. this.loadData();
  23. },
  24. methods: {
  25. // 公告信息
  26. async loadData() {
  27. let obj = this;
  28. getDetail(obj.id).then(function(e) {
  29. obj.info = e.data
  30. })
  31. }
  32. }
  33. };
  34. </script>
  35. <style lang="scss">
  36. .container{
  37. width: 100%;
  38. color: #FFFFFF;
  39. background-color: #051137;
  40. }
  41. .notice_name {
  42. font-size: 31rpx;
  43. color: #ffffff;
  44. }
  45. .notice-item {
  46. color: #fff;
  47. padding: 35rpx 35rpx;
  48. }
  49. .notice_text {
  50. // border-bottom: 1px solid #1b1f43;
  51. padding: 30rpx 0rpx;
  52. }
  53. .notice_content {
  54. font-size: 28rpx;
  55. padding: 25rpx 0rpx;
  56. color: #fff;
  57. line-height: 45rpx;
  58. }
  59. </style>