<!--nova-werun/components/home/index.wxml-->
<view class="all" style="height: {{screenHeight}}rpx;">
  <view class="navbox" style="height: {{navheight}}rpx;">
    <view class="nav">
      <view class="nav-title">首页</view>
      <view class="nav-addbox">
        <van-icon name="location-o" size='28rpx' color='white' />
        <view class="nav-add">{{address}}</view>
      </view>
    </view>
  </view>
  <view class="sco" style="height: {{contentHeight}}rpx;">
    <!-- 顶部 -->
    <view class="topbox">
      <view class="top-tex">
        健康运动 go
      </view>
      <view class="top-tex2">
        积累运动
        <view class="top-tex2-tex">225</view>
        天
      </view>
    </view>
    <view class="clockinbox">
      <view class="clockinbox2">
        <view class="runbox" style="background:{{percentage}}">
          <view class="run">
            <view class="step-num">{{steps||0}}</view>
            <view class="tody-steps">今日步数</view>
          </view>
        </view>
        <!--    目标 -->
        <view class="objbox">
          <view class="obj1" bindtap="gourl" data-url="../../pages/home/step/index">
            <view class="boj1-ti">目标步数</view>
            <view class="obj1-numbox">
              <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241225/s519td033232206.png"></image>
              <view class="obj1-numbox-tex">{{target}}步</view>
            </view>
          </view>

          <view class="obj1" style="margin-top: 32rpx;">
            <view class="boj1-ti">连续打卡</view>
            <view class="obj1-numbox">
              <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20250102/tii6p6035434602.png"></image>
              <view class="obj1-numbox-tex">7天</view>
            </view>
          </view>
          <view class="obj2">积累打卡7天，超过20%人</view>
        </view>
      </view>
      <view class="today-check" bindtap="gourl" data-url="../../pages/home/sport/sport-home/index">今日打卡</view>
    </view>

    <van-notice-bar color="#1989fa" color='#000' background="#ecf9ff" background="#fff" left-icon="volume-o" custom-class='a' text="在微信开发者工具中进行测试，确保定位和轨迹绘制的准确性。完成测试后，提交审核并发布小程序。通过以上步骤，您就可以在微信小程序中使用高德地图实现实时运动轨迹的功能。" />
    <!-- 类型 -->
    <view class="typebox">
      <view class="column" wx:for="{{rows}}" wx:key="index" data-url="{{item.url}}" bindtap="gourl" data-active="{{item.active}}">
        <image src="{{item.image}}"></image>
        <text class="item-text">{{item.text}}</text>
      </view>
    </view>

    <view class="rankbox">
      <view class="ran-top">
        <view class="top-til">{{changetitleMap[changetitle]}}排行榜</view>
        <view class="top-box" bindtap="change">
          切换
          <image style="width: 22rpx;height: 22rpx;" src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241226/fejv43122812199.png"></image>
        </view>
        <view class="top-box" style="margin-left: 20rpx;" bindtap="changeup">
          {{rank=='ASC'?'逆序':'正序'}}
          <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241226/8lu1od115228414.png"></image>
        </view>
      </view>

      <block wx:for="{{todayList}}" wx:key="index">
        <view class="cardbox">
          <view class="image1" wx:if="{{index==0}}">1</view>
          <view class="image2" wx:if="{{index==1}}">2</view>
          <view class="image3" wx:if="{{index==2}}">3</view>
          <view class="paiming" wx:if="{{index>=3}}">{{index+1}}</view>
          <image class="avarter" src="{{item.avatar}}"></image>
          <view class="name">
            {{item.nickname}}
            <view class="name2">已打卡12天</view>
          </view>
          <view class="num">{{item.totalSteps}}</view>
        </view>
      </block>
      <block wx:if="{{todayList.length<=0}}">
        <van-empty description="{{changetitleMap[changetitle]}}榜单静悄悄，快来运动一下吧~">
          <van-button bindtap="gourl" data-url="../../pages/home/sport/sport-home/index"   color="#4F9AF7" size="small">前往运动</van-button>
        </van-empty>
      </block>
    </view>

  </view>


</view>