msg-list.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <view class="msg-item" @tap='clickMsgItem'>
  3. <view class="msg-timer">{{$formatDate(item.createTime)}}</view>
  4. <view class="msg-content u-f u-f-jsb">
  5. <image class="msg-img" v-if="item.msgType==1" src="@/static/images/message/regular_client_icon_80.png" mode="widthFix"></image>
  6. <image class="msg-img" v-else-if="item.msgType==2" src="@/static/images/message/Timingvideo.png" mode="widthFix"></image>
  7. <image class="msg-img" v-else-if="item.msgType==3" src="@/static/images/message/budget_icon_80.png" mode="widthFix"></image>
  8. <image class="msg-img" v-else src="@/static/images/message/announcement_icon_100.png" mode="widthFix"></image>
  9. <view class="msg-txt">{{item.content}}</view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default{
  15. props:{
  16. item:{
  17. type:Object,
  18. default:function(){
  19. return {};
  20. }
  21. },
  22. index:{
  23. type:Number,
  24. default:-1
  25. }
  26. },
  27. data(){
  28. return{
  29. }
  30. },
  31. methods:{
  32. clickMsgItem(){
  33. return this.$emit('clickMsgItem',this.index)
  34. }
  35. }
  36. }
  37. </script>
  38. <style lang="scss">
  39. .msg-item{
  40. width: 710rpx;
  41. padding: 0 20rpx;
  42. .msg-timer{
  43. margin: 30rpx 0;
  44. text-align: center;
  45. font-size: 26rpx;
  46. font-family: PingFang SC;
  47. font-weight: 500;
  48. color: #999999;
  49. }
  50. .msg-content{
  51. .msg-img{
  52. width: 90rpx;
  53. height: 90rpx;
  54. margin-right: 20rpx;
  55. }
  56. .msg-txt{
  57. background-color: #FFFFFF;
  58. width: 600rpx;
  59. padding: 30rpx 20rpx;
  60. border-radius: 0px 30px 30px 30px;
  61. font-size: 30rpx;
  62. font-family: PingFang SC;
  63. font-weight: 500;
  64. color: #333333;
  65. line-height: 48rpx;
  66. }
  67. }
  68. }
  69. </style>