blacklist.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view class="blacklist-box">
  3. <en-nav title="黑名单" :title-color="'#333'" @navHeight="setNavHeight"></en-nav>
  4. <scroll-view class="blacklist-list" :scroll-y="true" :scroll-x="true" :style="{'height':'calc(100% - '+navHeight+'rpx)'}">
  5. <view class="blacklist-item" v-for="i in 12">
  6. <view class="blacklist-left">
  7. <image class="blacklist-img" src="/static/img/temporary/4.png" mode="aspectFill"></image>
  8. </view>
  9. <view class="blacklist-right">
  10. <view class="blacklist-title">
  11. <view class="title-text sys-color-black sys-weight-600 sys-height-44">江小明</view>
  12. <view class="title-icon">
  13. <text class="iconfont sys-height-44 sys-color-black">&#xe74b;</text>
  14. </view>
  15. </view>
  16. <view class="blacklist-text">
  17. <view class="text-item sys-color-gray-9">女/24/天瓶座</view>
  18. <view class="text-item sys-color-gray-9">2023/04/24</view>
  19. </view>
  20. </view>
  21. </view>
  22. </scroll-view>
  23. </view>
  24. </template>
  25. <script>
  26. import EnNav from "@/components/en-utils/en-nav/en-nav";
  27. import {getBlackList} from "@/api/my";
  28. export default {
  29. components: {EnNav},
  30. data() {
  31. return {
  32. navHeight:0,
  33. list:[],
  34. isAjax:false,
  35. total:undefined,
  36. page:1,
  37. }
  38. },
  39. mounted() {
  40. this.startList()
  41. },
  42. methods: {
  43. setNavHeight(navHeight){
  44. this.navHeight=navHeight
  45. },
  46. startList(){
  47. if(this.userId<=0){
  48. // return false
  49. }
  50. this.list=[]
  51. this.isAjax=false
  52. this.total=undefined
  53. this.page=1
  54. this.getBlackList()
  55. },
  56. getBlackList(){
  57. if(this.isAjax){
  58. return
  59. }
  60. this.isAjax=true
  61. let that=this
  62. getBlackList({'pageNo':this.page,'pageSize':20}).then((res)=>{
  63. this.isAjax=false
  64. if(res.code===0){
  65. res.data.data.forEach((item)=>{
  66. that.list.push(item )
  67. })
  68. ++that.page
  69. that.total=res.data.total
  70. }
  71. })
  72. },
  73. }
  74. }
  75. </script>
  76. <style scoped lang="scss">
  77. .blacklist-box{
  78. height: 100vh;
  79. padding: 0 32rpx;
  80. overflow-x: auto;
  81. .blacklist-list{
  82. width: calc(100vw - 64rpx);
  83. }
  84. .blacklist-item{
  85. width: calc(100vw - 64rpx);
  86. display: flex;
  87. justify-content: space-between;
  88. .blacklist-left{
  89. padding: 32rpx 0;
  90. margin-right: 28rpx;
  91. .blacklist-img{
  92. border-radius: 50%;
  93. width: 96rpx;
  94. height: 96rpx;
  95. }
  96. }
  97. .blacklist-right{
  98. padding: 32rpx 0;
  99. width: calc(100% - 124rpx);
  100. border-bottom: 1rpx solid #F2F2F2;
  101. .blacklist-title{
  102. display: flex;
  103. justify-content: space-between;
  104. height: 44rpx;
  105. .title-text{
  106. font-size: 32rpx;
  107. }
  108. .title-icon{
  109. .iconfont{
  110. font-size: 24rpx;
  111. }
  112. }
  113. }
  114. .blacklist-text{
  115. display: flex;
  116. justify-content: space-between;
  117. margin-top: 4rpx;
  118. .text-item{
  119. font-size: 28rpx;
  120. }
  121. }
  122. }
  123. }
  124. }
  125. </style>