<!--packageF/storeSign/storeSign/storeSign.wxml-->
<wxs module="m1">
    function indexOfx(arr, value) {
        if (arr) {
            return arr.indexOf(value + 1) + 1
        }
    }
    module.exports.indexOfx = indexOfx;
</wxs>
<view id="storeSign">
    <view class="calendarBox">
        <view class="headTop">
            <view class="headTopleft">
                <view class="headTopleft_point">{{ info.store_accumulate_integral || 0 }}</view>
                <view class="headTopleft_txt">累计签到分</view>
                <view class="headTopleft_txt2">今日签到可得 {{ info.can_get_integral || 0 }} 签到分</view>
            </view>
            <view class="headTopRight">
                <view class="headTopRight_conten">
                    <block wx:if="{{!info.new_finish_task}}">
                        <view class="headTopRight_contentxt">-已连续签到-</view>
                        <view class="headTopRight_contentxt2">{{ info.continuity || 0 }}<view class="span">天</view>
                        </view>
                    </block>
                    <block wx:else>
                        <div class="headTopRight_contentxt clear">已完成门店新用户签到任务</div>
                    </block>
                </view>
                <view class="btnbox">
                    <view class="btn" catchtap="attendance">{{info.attended ? "已签到" : "立即签到"}}</view>
                </view>
            </view>
        </view>
        <view class="calendarView">
            <view class="month">{{year}}年{{month}}月</view>
            <view class="calendarList">
                <view class="ol">
                    <view class="li">日</view>
                    <view class="li">一</view>
                    <view class="li">二</view>
                    <view class="li">三</view>
                    <view class="li">四</view>
                    <view class="li">五</view>
                    <view class="li">六</view>
                </view>
                <view>
                    <view class="ul">
                        <view style="width:{{  w + '%'}}"></view>
                        <view class="li" wx:for="{{m}}" wx:key="index">
                            <view class="dayTxt">
                                {{ item+1 }}
                                <image wx:if="{{m1.indexOfx(info.attendance_date,index)}}" src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/sign.png" />
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <view class="calendarBottom">
            <view class="detail" catchtap="goDetail">
                <view class="span">签到明细</view>
                <van-icon name="arrow" />
            </view>
            <view class="signDetail">
                <view class="signDetail_list">
                    <view class="txt">{{info.surplus_count}}</view>
                    <view>剩余签到次数</view>
                </view>
                <view class="signDetail_list">
                    <view class="txt">{{info.store_accumulate_count}}</view>
                    <view>累计已签到次数</view>
                </view>
            </view>
        </view>
        <view class="intro" catchtap="showTap">
            <view class="icona">
                <i class="iconfont icon-qhm_shuoming"></i>
            </view>
            签到规则
        </view>
    </view>
    <van-popup show="{{show}}" class="mint-popup" custom-style="border-radius: 1.31rem; background: transparent">
        <view class="showBox">
            <view class="showBoxTop"></view>
            <view class="showBoxBottom">签到成功，奖励{{awardinfo}}签到分！</view>
        </view>
        <view style="width: 100%;text-align: center;">
            <icon class="iconfont icon-adsystem_icon_cancle" catchtap="showClose"></icon>
        </view>
    </van-popup>
    <van-popup show="{{intrShow}}" class="mint-popup" custom-style="width: 80%; border-radius: 1rem; background: transparent">
        <view class="intrShowBox">
            <view class="title">签到规则</view>
            <view class="intro">
                <mp-html content="{{info.attendance_describe}}"></mp-html>
            </view>
        </view>
        <view style="width: 100%;text-align: center;">
            <icon class="iconfont icon-adsystem_icon_cancle" catchtap="showClose"></icon>
        </view>
    </van-popup>
</view>