<view class="page-container">
  <view class="card checkin-hero">
    <view class="checkin-title">每日签到</view>
    <view class="checkin-streak">已连续签到 {{streak}} 天</view>
    <button class="btn sign-btn {{checkedToday ? 'sign-done':'sign-today'}}" bindtap="doCheckin">
      {{checkedToday ? '今日已签到 ✓' : '立即签到'}}
    </button>
    <view class="reward-hint">连续签到积分更多：3天10分 / 10天30分 / 30天100分 / 60天200分</view>
  </view>

  <!-- 本周 -->
  <view class="card">
    <view class="card-header"><text>本周</text></view>
    <view class="week-row">
      <view class="week-item {{item.active ? 'week-active':''}}" wx:for="{{week}}" wx:key="index">
        <text class="week-day">{{item.day}}</text>
        <text class="week-date">{{item.date}}</text>
      </view>
    </view>
  </view>

  <!-- 签到记录 -->
  <view class="card" wx:if="{{records.length > 0}}">
    <view class="card-header"><text>签到记录</text></view>
    <view class="ck-record" wx:for="{{records}}" wx:key="id">
      <text class="ck-date">{{item.created_at}}</text>
      <text class="ck-points">+{{item.points}} 积分</text>
    </view>
  </view>
</view>
