message.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <view class="message">
  3. <view class="item" v-for="l in list">
  4. <view class="img">
  5. <image :src="l.img" mode=""></image>
  6. </view>
  7. <view class="right">
  8. <view class="top">
  9. <view class="title">{{ l.title }}</view><view class="time">{{ l.time }}</view>
  10. </view>
  11. <view class="bottom">
  12. <view class="concent clamp2">{{ l.concent }}</view><view class="icon" v-show="l.lookAll"></view>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. list: [
  23. {
  24. img: require('../../static/icon/message1.png'),
  25. title: "系统消息",
  26. time: "2018-12-09 12:00:00",
  27. concent: "恭喜你,你已从营长升级至团长!",
  28. lookAll: true
  29. },
  30. {
  31. img: require('../../static/icon/message2.png'),
  32. title: "新增下线",
  33. time: "2018-12-09 12:00:00",
  34. concent: "恭喜你,[下线昵称]在[时间]成为你的下线!",
  35. lookAll: false
  36. },
  37. {
  38. img: require('../../static/icon/message3.png'),
  39. title: "佣金通知",
  40. time: "2018-12-09 12:00:00",
  41. concent: "[下线昵称]在[时间]成功支付,恭喜你获得0.3元佣金!",
  42. lookAll: false
  43. },
  44. {
  45. img: require('../../static/icon/message4.png'),
  46. title: "发货通知",
  47. time: "2018-12-09 12:00:00",
  48. concent: "您购买的[商品名称]在[时间]已成功发货!!",
  49. lookAll: false
  50. },
  51. {
  52. img: require('../../static/icon/message5.png'),
  53. title: "开团通知",
  54. time: "2018-12-09 12:00:00",
  55. concent: "您于[时间]成功发起[商品名称]的拼购活动,快去邀请好友一起拼团吧!快去邀请好友一起拼团吧",
  56. lookAll: true
  57. }
  58. ]
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .message {
  65. margin-top: 20rpx;
  66. font-family: PingFangSC-Medium;
  67. background-color: #fff;
  68. .item {
  69. display: flex;
  70. padding: 30rpx 0;
  71. margin: 0 30rpx;
  72. border-bottom: solid 1rpx #f8f8f8;
  73. .img {
  74. margin: auto 0;
  75. width: 110rpx;
  76. margin-left: 0rpx;
  77. image {
  78. width: 80rpx;
  79. height: 80rpx;
  80. }
  81. }
  82. .right {
  83. width: calc(100% - 110rpx);
  84. display: grid;
  85. align-content: space-between;
  86. .top {
  87. display: flex;
  88. justify-content: space-between;
  89. .title {
  90. color: #000;
  91. font-size: 30rpx;
  92. }
  93. .time {
  94. color: #999999;
  95. font-size: 25rpx;
  96. }
  97. }
  98. .bottom {
  99. display: flex;
  100. justify-content: space-between;
  101. .concent {
  102. width: calc(100% - 30rpx);
  103. color: #999999;
  104. font-size: 26rpx;
  105. }
  106. .icon {
  107. margin: auto 0;
  108. width: 10rpx;
  109. height: 10rpx;
  110. background-color: #FB555C;
  111. border-radius: 50%;
  112. }
  113. }
  114. }
  115. }
  116. }
  117. </style>