dy.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="dy">
  3. <statusBar :item="navBarData"></statusBar>
  4. <view class="bigBox" v-for=" i in applyUserlist">
  5. <view class="imgblk">
  6. <image class="img" :src="i.avatar" mode="aspectFill"></image>
  7. </view>
  8. <view class="info">
  9. <view class="uname">
  10. <view class="nameTxt">
  11. {{i.username}}
  12. </view>
  13. <view class="sch">{{i.create_at}}</view>
  14. </view>
  15. <view class="sch1">{{i.schoolName}}</view>
  16. </view>
  17. </view>
  18. <!-- <view class="loading">
  19. <view v-if="newsLoading==1">数据加载中...</view>
  20. <view v-if="newsLoading==2">没有更多了~~</view>
  21. </view> -->
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. navBarData: {
  29. title: '新增订阅',
  30. btn: 1
  31. },
  32. // 报名列表
  33. applyUserlist:[],
  34. // 活动id
  35. acId:'',
  36. // 触底加载动画提示
  37. newsLoading: 0, //0默认值 1加载中 2没有更多了
  38. currentPage: 1,
  39. // items:[ //1回粉 2关注 3相互关注
  40. // {tit:'hf',btn:1},
  41. // {tit:'hf2',btn:1},
  42. // {tit:'gz',btn:2},
  43. // {tit:'hx',btn:3},
  44. // ]
  45. };
  46. },
  47. methods:{
  48. // 获取报名用户
  49. getUsers(){
  50. let data = {
  51. oid: this.$store.state.user.openid, //用户id
  52. aid:this.acId,
  53. type: 2,
  54. page: this.currentPage, //下拉获取更多的备用字段
  55. lim: 20 //一次获取多少数据
  56. }
  57. this.$request('/selectApplyUser', 'POST', data).then(res => {
  58. this.applyUserlist=res[0]
  59. // console.log('获取报名用户列表', res[0]);
  60. // if (!res[0].length) {
  61. // this.newsLoading = 2
  62. // } else {
  63. // this.newsLoading = 0
  64. // }
  65. // this.applyUserlist=[...this.applyUserlist,...res[0]]
  66. })
  67. }
  68. },
  69. // 触底加载更多
  70. // onReachBottom() {
  71. // if (this.newsLoading == 2) {
  72. // return
  73. // }
  74. // this.newsLoading = 1
  75. // this.currentPage++
  76. // setTimeout(this.getUsers(),1500)
  77. // },
  78. onLoad(e) {
  79. // console.log('接受参数',e);
  80. this.acId=e.acId
  81. this.getUsers()
  82. }
  83. };
  84. </script>
  85. <style lang="scss" scoped>
  86. .dy{
  87. }
  88. .bigBox{
  89. background-color: white;
  90. width: 750rpx;
  91. height: 136rpx;
  92. padding: 0rpx 30rpx;
  93. display: flex;
  94. justify-content: space-between;
  95. align-items: center;
  96. .imgblk{
  97. height: 80rpx;
  98. display: flex;
  99. justify-content: center;
  100. align-items: center;
  101. // background-color: #888;
  102. .img{
  103. width: 72rpx;
  104. height: 72rpx;
  105. border-radius: 50%;
  106. }
  107. }
  108. .info{
  109. flex: 1;
  110. display: flex;
  111. flex-direction: column;
  112. height: 80rpx;
  113. justify-content: space-between;
  114. margin-left: 20rpx;
  115. // background-color: rebeccapurple;
  116. .uname{
  117. display: flex;
  118. justify-content: space-between;
  119. .nameTxt{
  120. font-size: 28rpx;
  121. color: rgba(0, 0, 0, 0.8);
  122. // line-height: 50%;
  123. }
  124. .sch{
  125. font-size: 24rpx;
  126. color: rgba(0, 0, 0, 0.6);
  127. }
  128. }
  129. .sch1{
  130. // flex: 1;
  131. font-size: 24rpx;
  132. color: rgba(0, 0, 0, 0.6);
  133. }
  134. }
  135. }
  136. .loading{
  137. height: 50rpx;
  138. text-align: center;
  139. padding-top: 20rpx;
  140. padding-bottom: 100rpx;
  141. font-size: 26rpx;
  142. color:#888;
  143. line-height: 2em;
  144. }
  145. </style>