eight.wxml 1.3 KB

<view class="context">
  <!-- 当前月份 -->
  <view class="top">
    <view>{{year}}年{{month}}月</view>
  </view>
  <!-- 周 -->
  <view  class="middle">
    <view wx:for="{{data_arr}}" wx:key="index" class="middle_num">
      {{item}}
    </view>
  </view>
  <!-- 日期 -->
  <view class="calen">
    <view wx:for="{{startWeek}}" wx:key="index" class="calen_blank"></view>
    <view wx:for="{{calendar}}" 
    bindtap="handoffDate"
    data-item="{{item}}"
    class='{{index+1 == today ? "active": "calen_num"}}' 
      wx:key="index">
      <text class="{{item.day > fixed_today ? 'today_after' : ''}}">{{item.day}}</text>
      <view class="{{item.clock}}">
        
      </view>
    </view>
  </view>
</view>

<view class="line" wx:for="{{sbox}}" wx:key="id">
    <view style="display:flex;flex:1;align-items:center">
        <image src="{{item.img}}"></image>
        <view>{{item.text}}</view>
    </view>
    <view  bindtap="dianji" data-id="{{item.id}}"  data-index="{{index}}">
        <view  class="buka" bindtap="gotoday">打卡</view>
    </view>
    <!-- <view  bindtap="dianji" data-bool="{{item.bool}}"  data-index="{{index}}">
        <view class="{{item.bool?'buka':' buka yibuka'}}" bindtap="gotoday">{{item.bool?'打卡':'已打卡'}}</view>
    </view> -->
</view>