index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <script setup>
  2. import {
  3. ref
  4. } from "vue";
  5. import {
  6. onLoad,
  7. } from "@dcloudio/uni-app";
  8. import {
  9. readMessage
  10. } from "@/api/work/message.js";
  11. let userName = ref(null);
  12. let content = ref(null);
  13. function sendRead(id) {
  14. readMessage({
  15. id
  16. })
  17. };
  18. onLoad(options => {
  19. if (options.type === "unread") {
  20. sendRead(options.id)
  21. }
  22. userName = options.userName;
  23. content = options.content;
  24. })
  25. </script>
  26. <template>
  27. <view class="container">
  28. <page-title>消息详情</page-title>
  29. <view class="content">
  30. <view class="card only-card">
  31. <view class="card-name">
  32. <view class="card-name-title">
  33. <text class="card-name-description">接收人</text>
  34. </view>
  35. <view class="select-item">
  36. <view>{{userName}}</view>
  37. <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
  38. </view>
  39. </view>
  40. <view class="card-item">
  41. <view class="card-item-name">内容</view>
  42. <view class="item-textarea">
  43. <u--textarea v-model="content" maxlength="-1" height='294rpx' disabled></u--textarea>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <style lang="scss" scoped>
  51. .clear {
  52. position: absolute;
  53. top: 8%;
  54. right: 4%;
  55. display: flex;
  56. font-size: 40rpx;
  57. font-weight: 500;
  58. color: #FFF;
  59. }
  60. .content {
  61. position: absolute;
  62. top: 5%;
  63. left: 0;
  64. width: 100%;
  65. height: 95%;
  66. padding: 100rpx 4% 0;
  67. box-sizing: border-box;
  68. // border-radius: 40rpx 40rpx 0 0;
  69. background-color: #fff;
  70. }
  71. .select-item {
  72. display: flex;
  73. align-items: center;
  74. font-size: 32rpx;
  75. color: #343437;
  76. }
  77. .item-textarea {
  78. width: 100%;
  79. min-height: 294rpx;
  80. padding: 20rpx;
  81. border: 2rpx solid #D0D9E7;
  82. border-radius: 20rpx;
  83. }
  84. .user-choose {
  85. width: 666rpx;
  86. min-height: 688rpx;
  87. padding: 30rpx 28rpx;
  88. .user-choose-title {
  89. display: flex;
  90. justify-content: space-between;
  91. width: 100%;
  92. margin-bottom: 54rpx;
  93. font-weight: 500;
  94. color: #3D3D3D;
  95. font-size: 32rpx;
  96. .uesr-choose-icon {
  97. width: 44rpx;
  98. height: 44rpx;
  99. background: url("@/static/message-close.svg");
  100. background-size: 100% 100%;
  101. }
  102. .hide {
  103. background: none;
  104. }
  105. }
  106. .search-item {
  107. display: flex;
  108. justify-content: space-between;
  109. align-items: flex-start;
  110. width: 606rpx;
  111. min-height: 88rpx;
  112. padding: 26rpx 30rpx;
  113. margin-bottom: 32rpx;
  114. font-size: 28rpx;
  115. border-radius: 20rpx;
  116. border: 2rpx solid #D0D9E7;
  117. .search-item-name {
  118. min-width: 30rpx;
  119. color: #939AA5;
  120. }
  121. .search-item-content {
  122. color: #3D3D3D;
  123. text-align: right;
  124. }
  125. .swiper-item-content {
  126. height: 286rpx;
  127. }
  128. }
  129. .search-btn {
  130. width: 606rpx;
  131. height: 64rpx;
  132. margin-top: 50rpx;
  133. line-height: 64rpx;
  134. text-align: center;
  135. color: #FFFFFF;
  136. font-size: 28rpx;
  137. background: #1869F6;
  138. border-radius: 16rpx;
  139. }
  140. }
  141. ::v-deep .u-popup__content {
  142. border-radius: 28rpx !important;
  143. }
  144. </style>