<!--pages/poi/poi.wxml-->
<view class="page">

  <!-- 顶部用户信息卡片 -->
  <view class="header-card" bindtap="goBadges">
    <view class="header-left">
      <view class="header-label">我的积分</view>
      <view class="header-points">
        <text class="points-num">{{points}}</text>
        <text class="points-unit"> 分</text>
      </view>
    </view>
    <view class="header-right">
      <view class="badge-count">
        <text class="badge-count-num">{{badgeCount}}</text>
        <text class="badge-count-label">枚徽章</text>
      </view>
      <view class="arrow">查看 ›</view>
    </view>
  </view>

  <!-- 景点列表 -->
  <view class="section-title">热门景点</view>

  <view class="poi-list">
    <view class="poi-item" wx:for="{{pois}}" wx:key="id">
      <view class="poi-icon">{{item.icon}}</view>
      <view class="poi-info">
        <view class="poi-name">{{item.name}}</view>
        <view class="poi-desc">{{item.desc}}</view>
      </view>
      <button
        class="poi-btn {{item.checked ? 'poi-btn-done' : ''}}"
        disabled="{{item.checked}}"
        data-id="{{item.id}}"
        data-name="{{item.name}}"
        bindtap="onCheckIn"
      >
        {{item.checked ? '已打卡' : '打卡 +10'}}
      </button>
    </view>
  </view>

  <!-- 调试按钮：清空数据 -->
  <view class="reset-wrap">
    <button class="reset-btn" bindtap="onResetData">清空本地数据（调试）</button>
  </view>

</view>
