favour.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="uni-app">
  3. <view class="status-bar" />
  4. <view class="main-container">
  5. <wk-nav-bar :title="navTitle" />
  6. <scroll-view scroll-y class="list">
  7. <view
  8. v-for="user in dataList"
  9. :key="user.userId"
  10. class="list-item">
  11. <view class="left">
  12. <wk-avatar
  13. :avatar="user.img"
  14. :name="user.realname"
  15. :preview="false"
  16. class="wk-avatar" />
  17. </view>
  18. <view class="right">
  19. <view class="username">
  20. {{ user.realname }}
  21. </view>
  22. <!-- <view class="desc">
  23. <view class="dept">
  24. 销售福
  25. </view>
  26. <view class="time">
  27. 2021-03-14 12:00
  28. </view>
  29. </view> -->
  30. </view>
  31. </view>
  32. </scroll-view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import { deepCopy } from '@/utils/lib.js'
  38. export default {
  39. name: 'JournalFavourList',
  40. data() {
  41. return {
  42. dataList: []
  43. }
  44. },
  45. computed: {
  46. navTitle() {
  47. return `获得${this.dataList.length}个赞`
  48. }
  49. },
  50. onShow() {
  51. this.dataList = deepCopy(getApp().globalData.cacheDataBridge || [])
  52. getApp().globalData.cacheDataBridge = null
  53. if (this.$isEmpty(this.dataList)) {
  54. this.$Router.navigateBack()
  55. }
  56. },
  57. methods: {}
  58. }
  59. </script>
  60. <style scoped lang="scss">
  61. .list {
  62. position: relative;
  63. width: 100%;
  64. height: 100%;
  65. background-color: white;
  66. overflow: hidden;
  67. margin-top: 15rpx;
  68. .list-item {
  69. padding: 18rpx 32rpx;
  70. @include left;
  71. .left {
  72. width: 90rpx;
  73. height: 90rpx;
  74. ::v-deep wk-avatar, .wk-avatar {
  75. width: 90rpx;
  76. height: 90rpx;
  77. }
  78. }
  79. .right {
  80. flex: 1;
  81. margin-left: 20rpx;
  82. flex-direction: column;
  83. @include left;
  84. .username {
  85. width: 100%;
  86. font-size: $wk-font-large;
  87. color: $dark;
  88. }
  89. .desc {
  90. width: 100%;
  91. font-size: $wk-font-base;
  92. color: $light;
  93. @include left;
  94. .dept {
  95. flex: 1;
  96. }
  97. .time {}
  98. }
  99. }
  100. }
  101. }
  102. </style>