<!--nova-werun/pages/home/medal/index.wxml-->
<nav type="back" title="我的勋章" background-color="{{'#4F9AF7'}}" front-color="{{'#333333'}}"></nav>
<view class="all" style="height: {{contentHeight}}rpx;">
    <view class="infobox">
        <image class="avater" src="{{userList[0].avatar}}"></image>
        <view class="info">
            <view class="name">{{userList[0].nickname}}</view>
            <!-- <view class="but-box">
                <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20250113/314h43042541125.png?imageView2/1/w/200/h/200"></image>
                <view class="text">分享 ></view>
            </view> -->
        </view>
    </view>

    <view class="medalbox">
        <view class="med-text">全部勋章</view>
        <view class="med-infobox">
            <!-- 已获得 -->
            <block wx:if="{{alreadyList.length>0}}" wx:for="{{alreadyList}}" wx:key="index">
                <view class="med-info" bindtap="showPopup" data-id="{{item.objectId}}" data-type="alreadyList">
                    <image src="{{item.medal.image}}"></image>
                    <view class="med-name">{{item.medal.name}}</view>
                    <!-- <view class="med-rul">勋章达成规则</view> -->
                    <view class="med-time">{{item.createdAt}}</view>
                </view>
            </block>
            <!-- 为获得 -->
            <block wx:if="{{MedalList.length>0}}" wx:for="{{MedalList}}">
                <view class="med-info" bindtap="showPopup" data-id="{{item.objectId}}" data-type="MedalList">
                    <image src="{{item.imageIn}}"></image>
                    <view class="med-name">{{item.name}}</view>
                </view>
            </block>

            <!-- 勋章介绍 -->
            <van-popup show="{{ show }}" position="bottom" custom-style="height: 40%;" bind:close="onClose">
                <view class="title-title">获取条件</view>
                <view class="med-rul">{{title}}</view>
            </van-popup>
        </view>
    </view>


</view>