MyMsg.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view class="notice-container">
  3. <!-- 返回按钮 -->
  4. <back text="通知"></back>
  5. <!-- <p class="notice-title">通知</p> -->
  6. <view class="notice-wrap">
  7. <view class="notice-item">
  8. <view class="notice-item-title">
  9. <view class="left">
  10. <view class="t-icon t-icon-shuju" ></view>成绩通知
  11. </view>
  12. <text>12分钟前</text>
  13. </view>
  14. <view class="notice-item-content">您的孩子【张梅】在 【青城山学校】的【2020年语文期末测试】成绩已经生成,请点击查看详情 > </view>
  15. <image class="notice-item-poster" src="https://image.meiye.art/pic_9ikZaVYnJE38Ao6AZlVIx?imageMogr2/thumbnail/450x/interlace/1" mode="widthFix"></image>
  16. </view>
  17. <view class="notice-item">
  18. <view class="notice-item-title">
  19. <view class="left">
  20. <view class="t-icon t-icon-tishi" ></view>系统通知
  21. </view>
  22. <text>12分钟前</text>
  23. </view>
  24. <view class="notice-item-content">您以成功绑定【青城山学校】【五年级8班】【张梅】学生。</view>
  25. <image class="notice-item-poster" src="https://image.meiye.art/pic_ucQUd7WwkuW1vKvjbgUlv?imageMogr2/thumbnail/450x/interlace/1" mode="widthFix"></image>
  26. </view>
  27. <view class="notice-item">
  28. <view class="notice-item-title">
  29. <view class="left">
  30. <view class="t-icon t-icon-bianji" ></view>任务通知
  31. </view>
  32. <text>12分钟前</text>
  33. </view>
  34. <view class="notice-item-content">您的孩子【张梅】班主任李老师给您发布一个新的问卷活动【周末孩子表现问卷调查】,快去填写吧 ></view>
  35. <image class="notice-item-poster" src="https://image.meiye.art/pic_1628927180566LfOmH3IV5i24Mmc65BGE0?imageMogr2/thumbnail/450x/interlace/1" mode="widthFix"></image>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import {
  42. mapState,
  43. mapMutations
  44. } from 'vuex';
  45. export default {
  46. computed: {
  47. ...mapState('m_parent', ['myData'])
  48. },
  49. data() {
  50. return {};
  51. },
  52. methods: {
  53. ...mapMutations('m_parent', ['updateMyMsg']),
  54. //删除信息
  55. deleteMsg(index) {
  56. let msgList = this.myData.msgList
  57. let after = msgList.splice(index, 1)
  58. this.updateMyMsg(after)
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. .u-alert-item {
  65. margin: 20rpx;
  66. }
  67. .notice-container{
  68. .notice-title{
  69. font-size: 48rpx;
  70. padding-left: 40rpx;
  71. }
  72. .notice-wrap{
  73. padding: 40rpx;
  74. .notice-item{
  75. // width: 100%;
  76. // height: 400rpx;
  77. border-radius: $card-border-radius;
  78. margin-bottom: 40rpx;
  79. background-color: #fff;
  80. padding: 30rpx;
  81. &-title{
  82. font-size: 32rpx;
  83. display: flex;
  84. align-items: center;
  85. justify-content: space-between;
  86. .t-icon{
  87. display: inline-block;
  88. margin-right: 10rpx;
  89. width: 40rpx;
  90. height: 40rpx;
  91. }
  92. .left{
  93. display: flex;
  94. align-items: center;
  95. justify-content: space-between;
  96. }
  97. text{
  98. font-size: 24rpx;
  99. color: #848587;
  100. }
  101. }
  102. &-content{
  103. font-size: 24rpx;
  104. margin: 16rpx 0;
  105. color: #6c6c6c;
  106. display: -webkit-box!important;
  107. overflow: hidden;
  108. text-overflow: ellipsis;
  109. word-break: break-all;
  110. -webkit-line-clamp: 2;
  111. -webkit-box-orient: vertical!important;
  112. }
  113. &-poster{
  114. width: 100%;
  115. border-radius: 10rpx;
  116. }
  117. }
  118. }
  119. }
  120. </style>