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.

93 lines
1.9 KiB

7 months ago
  1. <template>
  2. <view class="box" >
  3. <view class="" v-if="Object.keys(item).length">
  4. <view class="flex-b">
  5. <!-- 匿名用户 -->
  6. <view class="name">{{item.studentName}}</view>
  7. <view class="date">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd')}}</view>
  8. </view>
  9. <view class="starBox">
  10. <u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.stars" :readonly="true" allowHalf></u-rate>
  11. <view class="num">{{ item.stars?item.stars.toFixed(1):0 }}</view>
  12. </view>
  13. <view class="text">{{item.description}}</view>
  14. <!-- <view class="imgBox">
  15. <view class="img" v-for="(item,index) in urls2" :key="index">
  16. <image :src="item" mode=""></image>
  17. </view>
  18. </view> -->
  19. <view class="imgBox" v-if="item.images&&item.images.length">
  20. <u-album :urls="item.images" :multipleSize="'160rpx'"></u-album>
  21. </view>
  22. <view class="vdo" v-if="item.videoUrl">
  23. <video :src="item.videoUrl" objectFit="fill"></video>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. props: ['item'],
  31. data() {
  32. return {
  33. urls2: [
  34. 'https://cdn.uviewui.com/uview/album/1.jpg',
  35. 'https://cdn.uviewui.com/uview/album/2.jpg',
  36. 'https://cdn.uviewui.com/uview/album/3.jpg',
  37. 'https://cdn.uviewui.com/uview/album/4.jpg',
  38. ]
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss" scoped>
  44. .flex-b {
  45. align-items: center;
  46. .name {
  47. font-weight: 600;
  48. font-size: 32rpx;
  49. color: #333;
  50. }
  51. .date {
  52. font-size: 24rpx;
  53. color: #686B73;
  54. }
  55. }
  56. .starBox {
  57. padding: 10rpx 0 24rpx 0;
  58. }
  59. .text {
  60. font-size: 24rpx;
  61. }
  62. .imgBox {
  63. display: flex;
  64. flex-wrap: wrap;
  65. padding-top: 20rpx;
  66. .img {
  67. margin-top: 20rpx;
  68. width: 160rpx;
  69. height: 160rpx;
  70. border-radius: 8rpx;
  71. overflow: hidden;
  72. margin-right: 24rpx;
  73. }
  74. }
  75. .vdo {
  76. margin-top: 12rpx;
  77. width: 360rpx;
  78. height: 296rpx;
  79. border-radius: 8rpx;
  80. overflow: hidden;
  81. video {
  82. width: 100%;
  83. height: 100%;
  84. }
  85. }
  86. </style>