ranking.wxml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!--compontents/ranking/ranking.wxml-->
  2. <view class="ranking">
  3. <view class="title">
  4. <text>{{title}}</text>
  5. </view>
  6. <view class="my-rank">
  7. <block wx:for="{{friendsThreeData}}" wx:key="{{index}}">
  8. <view class="head-rank-{{item.rank == 2 ? '0' : (item.rank == 3 ? '2' : item.rank)}}">
  9. <image src="{{item.users.headImgUrl}}" class="big-head-img"></image>
  10. <view class="head">
  11. <image src="../../pages/image/bg_{{item.rank}}.png" class="bg"></image>
  12. </view>
  13. <view class="txt">
  14. <text class="name">{{item.users.wechatName}}</text>
  15. <text wx:if="{{myData.exp >= 0}}" class="medal-num">LV{{item.number}}({{item.exp}})</text>
  16. <text wx:else class="medal-num">{{item.number}}{{str}}</text>
  17. </view>
  18. </view>
  19. </block>
  20. </view>
  21. <view class="rank-list" animation="{{animationData}}" style="height: {{height}}rpx">
  22. <view class="rank-friend" wx:for="{{friendsData}}" wx:key="{{index}}">
  23. <view class="rank-head">
  24. <text class="rank-text">{{item.rank}}</text>
  25. <image src="{{item.users.headImgUrl}}" class="head-img"></image>
  26. <text style="width: 120px; overflow: hidden;">{{item.users.wechatName}}</text>
  27. </view>
  28. <text wx:if="{{myData.exp >= 0}}" class="medal-num">LV{{item.number}}({{item.exp}})</text>
  29. <text wx:else class="medal-num">{{item.number}}{{str}}</text>
  30. </view>
  31. </view>
  32. <view class="my-rank-list">
  33. <view class="rank-head">
  34. <text wx:if="{{indexs == 1}}" class="rank-text">{{rankData.expRank == '0' ? '1000+' : rankData.expRank}}</text>
  35. <text wx:elif="{{indexs == 2}}" class="rank-text">{{rankData.userQuestionRank == '0' ? '1000+' : rankData.userQuestionRank}}</text>
  36. <text wx:elif="{{indexs == 3}}" class="rank-text">{{rankData.userQuestionCorrectRank == '0' ? '1000+' : rankData.userQuestionCorrectRank}}</text>
  37. <text wx:else class="rank-text">{{rankData.userMetalRank == '0' ? '1000+' : rankData.userMetalRank}}</text>
  38. <image src="{{rankData.users.headImgUrl}}" class="head-img"></image>
  39. <text style="width: 120px; overflow: hidden;">{{rankData.users.wechatName}}</text>
  40. </view>
  41. <!--判断显示个人排名-->
  42. <view wx:if="{{indexs == 1}}">
  43. <text class="medal-num" style="color: #5b82fa">LV{{rankData.level}}({{rankData.exp}})</text>
  44. </view>
  45. <view wx:elif="{{indexs == 2}}">
  46. <text class="medal-num" style="color: #5b82fa">{{rankData.userQuestionNum}}题</text>
  47. </view>
  48. <view wx:elif="{{indexs == 3}}">
  49. <text class="medal-num" style="color: #5b82fa">{{rankData.userQuestionAccuracy}}%</text>
  50. </view>
  51. <view wx:else>
  52. <text class="medal-num" style="color: #5b82fa">{{rankData.userMetalNum}}枚</text>
  53. </view>
  54. </view>
  55. <view class="particular" bindtap="more" data-flag="{{flag}}" wx:if="{{height && flag}}">
  56. 查看更多
  57. </view>
  58. </view>