<!--nova-werun/pages/home/ranking/index.wxml-->
<nav type="back" title="排行榜" background-color="{{'#87ceeb'}}" front-color="{{'#ffffff'}}"></nav>
<view class="all" style="height: {{contentHeight}}rpx;">
    <view class="textbox">
        <view class="textobx2">
            <view class="text" wx:if="{{changetitle=='today'}}" >本日排行榜</view>
            <view class="text" wx:if="{{changetitle=='weekdday'}}" >本周排行榜</view>
            <view class="text" wx:if="{{changetitle=='month'}}" >本月排行榜</view>
            <view class="switch" bindtap="change">
                <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241111/8ic78m043647360.png?imageView2/1/w/200/h/200"></image>
                <view class="switch-text">切换</view>
            </view>
        </view>
        <view class="cardbox">
            <view class="paiming" >{{myList[0].rank}}</view>
            <image class="avarter" src="{{myList[0].user.avatar}}"></image>
            <view class="name">{{myList[0].user.nickname}}</view>
            <view class="num">{{myList[0].steps}}步</view>
            <view class="good">
                <view class="good-num">77</view>
                <van-icon name="good-job-o" />
            </view>
        </view>
    </view>
    <view class="rankbox">
        <block wx:for="{{todayList}}" wx:key="index"> 
            <view class="cardbox">
                <image wx:if="{{index<3}}" src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241111/je1q5i052857833.png?imageView2/1/w/200/h/200"></image>
                <view class="paiming" wx:if="{{index>=3}}">{{index+1}}</view>
                <image class="avarter" src="{{item.user.avatar}}"></image>
                <view class="name">{{item.user.nickname}}</view>
                <view class="num">{{item.steps}}步</view>
                <view class="good">
                    <view class="good-num">77</view>
                    <van-icon name="good-job-o" />
                </view>
            </view>
        </block>

    </view>
</view>