index.wxml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <wxs src="../../utils/filter.wxs" module="filters" />
  2. <view class="activityList">
  3. <block wx:for="{{activityList}}" wx:key="id">
  4. <!-- 邀新活动 -->
  5. <view class="newActivityBox" data-info="{{item}}" bindtap="activityEvent" wx:if="{{item.bannerType==6}}">
  6. <image src="{{item.icon}}" class="cover" />
  7. <view class="footer">
  8. <view class="row">
  9. <view class="title">{{item.title}}</view>
  10. <view class="btn">
  11. 立即参与
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="activityBox" wx:if="{{item.bannerType==1}}" bindtap="activityEvent" data-info="{{item}}">
  17. <image src="{{item.icon}}" class="cover" />
  18. </view>
  19. <view class="ranking-class-1 {{item.type=='2'?'yxb':item.type=='3'?'rbb':'pkb'}}"
  20. wx:if="{{item.bannerType==2}}">
  21. <view class="header">
  22. <view class="left">
  23. <image src="{{item.type=='2'?'/static/yxb.png':item.type=='3'?'/static/rbb.png':'/static/pkb.png'}}"
  24. class="icon" />
  25. <view class="title">{{item.title}}</view>
  26. </view>
  27. <view class="toAll" bindtap="activityEvent" data-info="{{item}}">查看全部
  28. <image src="/static/rbtn.png" class="backIcon" />
  29. </view>
  30. </view>
  31. <view class="body">
  32. <view class="top">
  33. <view class="userBox" bindtap="jumpUserInfo" data-uid='{{item.userList[1].uid}}'>
  34. <view class="secondUser">
  35. <image src="{{item.userList[1].avatar||'/static/nullAvatar.png'}}" class="avatar" />
  36. </view>
  37. <view class="nickName textOver">{{item.userList[1].nickName||item.userList[1].eid||'等你来占位'}}
  38. </view>
  39. </view>
  40. <view class="userBox" bindtap="jumpUserInfo" data-uid='{{item.userList[0].uid}}'>
  41. <view class="firstUser">
  42. <image src="{{item.userList[0].avatar||'/static/nullAvatar.png'}}" class="avatar" />
  43. </view>
  44. <view class="nickName textOver">{{item.userList[0].nickName||item.userList[0].eid||'等你来占位'}}
  45. </view>
  46. </view>
  47. <view class="userBox" bindtap="jumpUserInfo" data-uid='{{item.userList[2].uid}}'>
  48. <view class="thirdUser">
  49. <image src="{{item.userList[2].avatar||'/static/nullAvatar.png'}}" class="avatar" />
  50. </view>
  51. <view class="nickName textOver">{{item.userList[2].nickName||item.userList[2].eid||'等你来占位'}}
  52. </view>
  53. </view>
  54. </view>
  55. <view class="btm">
  56. <view class="userBox" wx:for="{{5}}" wx:key="index" wx:for-item="items">
  57. <image src="{{item.userList[index+3].avatar||'/static/nullAvatar.png'}}" class="avatar"
  58. bindtap="jumpUserInfo" data-uid='{{item.userList[index+3].uid}}' />
  59. <view class="nickName textOver">
  60. {{item.userList[index+3].nickName||item.userList[index+3].eid||'等你来占位'}}
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="ranking-class-2 {{item.type=='2'?'yxb':item.type=='3'?'rbb':'pkb'}}"
  67. wx:if="{{item.bannerType==3}}">
  68. <view class="header">
  69. <view class="left">
  70. <image src="{{item.type=='2'?'/static/yxb.png':item.type=='3'?'/static/rbb.png':'/static/pkb.png'}}"
  71. class="icon" />
  72. <view class="title">{{item.title}}</view>
  73. </view>
  74. <view class="toAll" bindtap="activityEvent" data-info="{{item}}">查看全部
  75. <image src="/static/rbtn.png" class="backIcon" />
  76. </view>
  77. </view>
  78. <view class="body">
  79. <view class="row" wx:for="{{3}}" wx:key="index" wx:for-item='items' bindtap="jumpUserInfo"
  80. data-uid='{{item.userList[index].uid}}'>
  81. <view class="left">
  82. <image src="/static/{{index+1}}-1.png" class="stand" />
  83. <image src="{{item.userList[index].avatar||'/static/nullAvatar.png'}}" class="avatar" />
  84. <view class="nickName textOver">
  85. {{item.userList[index].nickName||item.userList[index].eid||'等你来占位'}}
  86. </view>
  87. </view>
  88. <view class="right">
  89. <image
  90. src="{{item.type=='2'?'/static/yx.png':item.type=='3'?'/static/play.png':'/static/win.png'}}"
  91. class="playIcon" />
  92. <view class="num">{{item.userList[index].count}}</view>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. <view class="activityBox" wx:if="{{item.bannerType==4&&!isIos}}">
  98. <image src="{{item.icon}}" class="cover-small " />
  99. <view class="footer">
  100. <view class="info">
  101. <view class="title">{{item.title}}</view>
  102. <view class="time" wx:if="{{!item.voucherType}}">
  103. {{filters.formatDate(item.startTime,2)}}—{{filters.formatDate(item.endTime,2)}}
  104. </view>
  105. <view class="timeOut {{item.finish?'closing':''}}" wx:if="{{item.voucherType}}">距活动结束:
  106. <view class="outNum">{{item.hour}}</view>
  107. <view class="outSplit">:</view>
  108. <view class="outNum">{{item.minute}}</view>
  109. <view class="outSplit">:</view>
  110. <view class="outNum">{{item.second}}</view>
  111. </view>
  112. </view>
  113. <view class="btn {{item.finish?'closingBtn':''}}" data-info='{{item}}' bindtap="drawVoucher">
  114. {{item.finish?
  115. '已结束':item.voucherType?'立即使用':'立即领取'}}
  116. </view>
  117. </view>
  118. </view>
  119. <view class="newActivityBox" wx:if="{{item.bannerType==5}}" data-info="{{item}}" bindtap="activityEvent">
  120. <image src="{{item.icon}}" class="cover" />
  121. <view class="footer">
  122. <view class="row">
  123. <view class="title">{{item.title}}</view>
  124. <view class="partake">
  125. <text>{{filters.numFilter(item.joinCount)}}</text>人参与
  126. </view>
  127. </view>
  128. <view class="row" style="margin-top: 10rpx;">
  129. <view class="time">
  130. {{filters.formatDate(item.startTime,2)}}—{{filters.formatDate(item.endTime,2)}}
  131. </view>
  132. <view class="btn">
  133. 立即参与
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. </block>
  139. </view>
  140. <Voucher id="voucher" bind:reload='getActivities' />