informationInfo.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <!-- 测试 -->
  2. <template>
  3. <view id="informationInfo">
  4. <view class="info-box">
  5. <view class="info-title">{{itemData.title}}</view>
  6. <rich-text class="info-text" :nodes="itemData.content"></rich-text>
  7. <view class="info-userName">{{itemData.userName?itemData.userName:'--'}}</view>
  8. <view class="info-time">{{itemData.sendTime}}</view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import {
  14. systemNoticeGetNoticeDetail
  15. } from '@/pages/api/index.js'
  16. export default {
  17. data() {
  18. return {
  19. itemData: {},
  20. }
  21. },
  22. onLoad(option) {
  23. this.itemData = JSON.parse(decodeURIComponent(option.item));
  24. uni.setNavigationBarTitle({
  25. title: this.itemData.className
  26. });
  27. this.$nextTick(() => {
  28. this.systemNoticeGetNoticeDetail();
  29. })
  30. },
  31. methods: {
  32. //获取系统消息类型
  33. async systemNoticeGetNoticeDetail() {
  34. const {
  35. data
  36. } = await systemNoticeGetNoticeDetail({
  37. noticeId: this.itemData.noticeId
  38. });
  39. },
  40. }
  41. }
  42. </script>
  43. <style lang="stylus" scoped>
  44. #informationInfo {
  45. height: 100%;
  46. display: flex;
  47. flex-direction: column;
  48. overflow-y: scroll;
  49. .info-box {
  50. margin: 20rpx;
  51. background-color: #fff;
  52. border-radius: 20rpx;
  53. padding: 20rpx;
  54. .info-title {
  55. line-height: 50rpx;
  56. font-size: 32rpx;
  57. text-align: center;
  58. margin-bottom: 20rpx;
  59. }
  60. .info-text {
  61. }
  62. .info-userName {
  63. font-size: 28rpx;
  64. margin:60rpx 0 20rpx;
  65. text-align: right;
  66. margin-right: 60rpx;
  67. }
  68. .info-time {
  69. font-size: 28rpx;
  70. text-align: right;
  71. margin-right: 40rpx;
  72. margin-bottom: 20rpx;
  73. }
  74. }
  75. }
  76. </style>