showbox.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <view class="show-box">
  3. <view class="in-border">
  4. <view class="table-title">
  5. <image src="../../static/head-l-point.png" mode=""></image>
  6. <view class="text" v-if="showMsg.type === 'user'">
  7. {{$t(`中奖记录`)}}
  8. </view>
  9. <view class="text" v-else-if="showMsg.type === 'me'">
  10. {{$t(`我的奖品`)}}
  11. </view>
  12. <view class="text" v-else-if="showMsg.type === 'html'">
  13. {{$t(`活动规则`)}}
  14. </view>
  15. <image src="../../static/head-r-point.png" mode=""></image>
  16. </view>
  17. <view class="table" v-if="['me','user'].includes(showMsg.type)">
  18. <view class="table-head">
  19. <view class="nickname">{{showMsg.type === 'user' ? $t(`昵称`) : $t(`序号`)}}</view>
  20. <view class="table-name">{{$t(`奖品名称`)}}</view>
  21. <view class="table-name time">{{$t(`获奖时间`)}}</view>
  22. </view>
  23. <view class="table-d">
  24. <view class="table-body" v-for="(item,index) in showMsg.data" :key="index">
  25. <view class="nickname">
  26. {{showMsg.type === 'user' ? item.user.nickname : index + 1}}
  27. </view>
  28. <view class="table-name">
  29. {{item.prize.name}}
  30. </view>
  31. <view class="table-name time">
  32. {{item.add_time}}
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="content" v-else v-html="showMsg.data"></view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. data() {
  44. return {
  45. }
  46. },
  47. props: {
  48. showMsg: {
  49. type: Object
  50. },
  51. }
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. .show-box {
  56. display: flex;
  57. flex-direction: column;
  58. align-items: center;
  59. background-color: #FFFEFE;
  60. margin: 20px;
  61. padding: 4px;
  62. border-radius: 12rpx;
  63. box-shadow: 0px 3px 0px 0px #FCF5C8;
  64. }
  65. .in-border {
  66. width: 100%;
  67. display: flex;
  68. flex-direction: column;
  69. align-items: center;
  70. border: 1px dashed #FF7F5F;
  71. border-radius: 12rpx;
  72. padding: 35rpx 0;
  73. }
  74. .table-title {
  75. display: flex;
  76. align-items: center;
  77. margin-bottom: 30rpx;
  78. .text {
  79. color: #E74435;
  80. font-size: 36rpx;
  81. font-weight: 600;
  82. padding: 0 12rpx;
  83. }
  84. image {
  85. width: 50rpx;
  86. height: 16rpx;
  87. }
  88. }
  89. .table-d {
  90. max-height: 200rpx;
  91. overflow-y: scroll;
  92. }
  93. .table {
  94. width: 100%;
  95. .table-head,
  96. .table-body {
  97. display: flex;
  98. justify-content: space-around;
  99. width: 100%;
  100. }
  101. .table-head {
  102. color: #A57E7E;
  103. .nickname {
  104. width: 30%;
  105. padding: 10rpx 20rpx;
  106. }
  107. .table-name {
  108. width: 30%;
  109. text-align: left;
  110. padding: 10rpx 20rpx;
  111. }
  112. .time {
  113. width: 40%;
  114. }
  115. }
  116. .table-body {
  117. color: #282828;
  118. .nickname {
  119. width: 30%;
  120. font-size: 24rpx;
  121. padding: 10rpx 20rpx;
  122. }
  123. .table-name {
  124. width: 30%;
  125. text-align: left;
  126. text-overflow: ellipsis;
  127. white-space: nowrap;
  128. overflow: hidden;
  129. font-size: 24rpx;
  130. padding: 10rpx 20rpx;
  131. }
  132. .time {
  133. width: 40%;
  134. }
  135. }
  136. }
  137. .content {
  138. width: 100%;
  139. padding: 0 20rpx;
  140. }
  141. </style>