childsCard.wxml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <view class="card_select">
  2. <view bindtap="{{disable?'leftScroll':''}}" class="leftIcon icon {{list.length && list.length>1 ? 'iconUrl':''}}"></view>
  3. <view class="middleCard" style="width:calc({{cardWidth}}px - 120rpx)">
  4. <swiper current="{{current}}" circular="{{true}}" bindchange="bindchange" easing-function="linear" style="height:240rpx">
  5. <swiper-item style="padding:40rpx 0 20rpx;" wx:for="{{list}}" wx:key="index" id="{{'view'+index}}" class="scrollItem">
  6. <view class="card" style="width:calc({{cardWidth}}px - 120rpx)">
  7. <image class="logo_title" src="/images/card_logo.png" mode="widthFix"></image>
  8. <view class="childInfo">
  9. <view class="headImg">
  10. <image src="{{item.avatar || 'https://img.bbztx.com/miniProgram/challengeFamily/loginLogo.png'}}"></image>
  11. </view>
  12. <view class="info">
  13. <view class="left_info {{!showMedal?'medal':''}}">
  14. <view class="info_name">{{item.name}}</view>
  15. <view class="days" wx:if="{{showMedal}}">(差 <text style="color:#333">{{item.nextMedalLevel}}</text> 天升级)</view>
  16. </view>
  17. <view class="info_buttom">
  18. <view class="level" wx:if="{{showMedal}}">
  19. <view class="info_medal_level">勋章等级:{{item.medal}}级</view>
  20. <view class="info_seal_num">印章数:{{item.goldSeal+item.seal}}个</view>
  21. </view>
  22. <view class="level" wx:else>活动数:{{item.num}}次</view>
  23. <navigator wx:if="{{showMedal}}" class="btn" open-type="switchTab" url="/pages/home/index" hover-class="none">参与活动升级 ></navigator>
  24. <navigator wx:else class="btn" open-type="switchTab" url="/pages/home/index" hover-class="none">参加更多活动 ></navigator>
  25. </view>
  26. <view class="info_buttom moreActive" wx:if="{{!showMedal}}">
  27. </view>
  28. </view>
  29. </view>
  30. <view class="right_level"><view class="level">LV {{item.medal}}</view></view>
  31. </view>
  32. </swiper-item>
  33. </swiper>
  34. </view>
  35. <view bindtap="{{disable?'rightScroll':''}}" class="rightIcon icon {{list.length && list.length>1 ?'iconUrl':''}}"></view>
  36. </view>
  37. <slot></slot>