index.wxml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!--nova-werun/pages/home/medal/index.wxml-->
  2. <nav type="back" title="我的勋章" background-color="{{'#4F9AF7'}}" front-color="{{'#333333'}}"></nav>
  3. <view class="all">
  4. <view class="infobox">
  5. <image class="avater" src="{{user.avatar}}"></image>
  6. <view class="info">
  7. <view class="name">{{user.nickname}}</view>
  8. </view>
  9. </view>
  10. <view class="medalbox">
  11. <view class="med-text">全部勋章</view>
  12. <view class="med-infobox">
  13. <block wx:for="{{medalList}}" wx:key="index">
  14. <view class="med-info" bindtap="showPopup" data-index="{{index}}">
  15. <block wx:if="{{item.user}}">
  16. <image src="{{item.image}}" style="margin-top: 52rpx;"></image>
  17. </block>
  18. <block wx:else>
  19. <image src="{{item.imageIn}}" style="margin-top: 52rpx;"></image>
  20. </block>
  21. <view class="med-name">{{item.name}}</view>
  22. <block wx:if="{{item.user}}">
  23. <view class="med-time">{{item.createdAt}}</view>
  24. </block>
  25. </view>
  26. </block>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 勋章介绍 -->
  31. <van-popup round show="{{ show }}" position="bottom" bind:close="onClose">
  32. <view class="medPopup">
  33. <view class="title-title">{{chickMedal.name||'勋章介绍'}}</view>
  34. <view class="text">您已累计运动 {{distance||0}} km</view>
  35. <view class="text">解锁勋章需满足:</view>
  36. <view class="li">累计运动距离达 {{(chickMedal.condition.distance/1000)||0}} km</view>
  37. <view class="text" wx:if="{{chickMedal.user}}">已在 {{chickMedal.createdAt}} 解锁本勋章!</view>
  38. <view class="text" wx:else>暂未解锁本勋章,一起加油吧!</view>
  39. </view>
  40. </van-popup>