<!--index.wxml-->
<view class="calendar">
    <view class="time">
        <view>
            <text class="t_blue">{{year}}</text>年
            <text class="t_blue">{{month}}</text>月
        </view>
        <view style="text-align: right;">
            本月已签到
            <text class="t_red">{{count}}</text>天
        </view>
    </view>
    <view class="weekName">
        <view class="sunday">日</view>
        <view class="monday">一</view>
        <view class="tuesday">二</view>
        <view class="wednesday">三</view>
        <view class="thursday">四</view>
        <view class="friday">五</view>
        <view class="saturday">六</view>
    </view>
    <view class="week">

        <!--填补空格-->
        <view wx:for="{{nbsp}}" wx:key="unique">\n</view>

        <!--开心循环日期-->
        <view wx:for="{{date-1}}" wx:key="unique" style="color:gainsboro;">
            <text wx:if="{{item+1==calendarSignData[item+1]}}" style="color:red;font-size:22rpx;">已签到</text>
            <text wx:else="">{{item+1}}</text>
        </view>
        <view style="border-bottom: 1px solid blue; padding-bottom:8rpx;">
            <text wx:if="{{date==calendarSignData[date]}}" style="color:red;font-size:22rpx;  border-radius: 50%;background-color: ghostwhite">已签到</text>
            <text wx:else="" style="color:blue;">{{date}}</text>
        </view>
        <view wx:for="{{monthDaySize-date}}" wx:key="unique">{{item+date+1}}</view>
    </view>
    <view class="calendarSign">
        <button wx:if="{{date!=calendarSignData[date]}}" class='main-bg white' bindtap="calendarSign">签到</button>
        <button wx:else="">今日已签到</button>
    </view>
</view>

<view class='desc_text'>
    <view class='desc_title'>签到说明</view>
    <view class='desc_content'>1、每次签到可获得{{qian}}积分。</view>
    <view class='desc_content'>2、签到获得的积分可在大转盘中进行抽奖。</view>
</view>