鸿宇研学生前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
2.2 KiB

  1. <template>
  2. <view class="card">
  3. <view class="card-header">
  4. <view class="title">{{ data.title }}</view>
  5. <view class="desc">{{ data.noticeDate }}</view>
  6. </view>
  7. <view class="card-content">
  8. <uv-parse :content="data.content"></uv-parse>
  9. </view>
  10. <view class="card-footer">
  11. <button class="btn" @click="jumpToDetail">了解详情</button>
  12. </view>
  13. <view v-if="data.isRead == '0'" class="dot"></view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. props: {
  19. data: {
  20. type: Object,
  21. default() {
  22. return {}
  23. }
  24. },
  25. },
  26. methods: {
  27. jumpToDetail() {
  28. this.$utils.navigateTo(`/pages_order/message/index?id=${this.data.id}`)
  29. },
  30. },
  31. }
  32. </script>
  33. <style scoped lang="scss">
  34. .card {
  35. position: relative;
  36. padding: 32rpx 32rpx 0 32rpx;
  37. font-family: PingFang SC;
  38. font-weight: 400;
  39. line-height: 1.4;
  40. background-image: linear-gradient(164deg,#DAF3FF 88rpx, #FBFEFF 176rpx, #FBFEFF);
  41. background: linear-gradient(110deg, #DAF3FF, #FBFEFF 25%, #FBFEFF);
  42. border: 2rpx solid #FFFFFF;
  43. border-radius: 32rpx;
  44. &-header {
  45. .title {
  46. font-size: 32rpx;
  47. color: #181818;
  48. }
  49. .desc {
  50. margin-top: 4rpx;
  51. font-size: 24rpx;
  52. color: #999999;
  53. }
  54. }
  55. &-content {
  56. margin-top: 16rpx;
  57. max-height: 176rpx;
  58. font-size: 26rpx;
  59. line-height: 1.7;
  60. color: #666666;
  61. overflow: hidden;
  62. // text-overflow: ellipsis;
  63. // display:-webkit-box; //作为弹性伸缩盒子模型显示。
  64. // -webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
  65. // -webkit-line-clamp:4; //显示的行
  66. }
  67. &-footer {
  68. margin-top: 16rpx;
  69. border-top: 2rpx dashed #DADADA;
  70. .btn {
  71. width: 100%;
  72. padding: 16rpx 32rpx;
  73. font-family: PingFang SC;
  74. font-size: 32rpx;
  75. font-weight: 400;
  76. line-height: 1.4;
  77. color: #00A9FF;
  78. box-sizing: border-box;
  79. }
  80. }
  81. .dot {
  82. position: absolute;
  83. top: 12rpx;
  84. right: 12rpx;
  85. width: 16rpx;
  86. height: 16rpx;
  87. background: #F53F3F;
  88. border-radius: 50%;
  89. }
  90. }
  91. </style>