<!--pages/signIn/index.wxml-->
<view wx:if="{{showPage}}">

<!-- 页面主体 -->
<view class="sign-scroll-body" style="margin-top:{{navHeight}}px; height: {{bodyHeight}}px;">
    <view class="sign-info-extra">
        <view class="coupon_num_box">
          <view class="my_coupon_title">我的优惠券</view>
          <view class="_num_arear">
              <text class="_num">{{notUseNum}}</text>
              <text class="_unit">张</text>
              <view class="_btn" wx:if="{{notUseNum > 0}}">
               <jumpmallapp>去使用</jumpmallapp>
              </view>
          </view>
        </view>
        <view class="_look_btn" catchtap="toRecordDetailPage">明细 | 查看</view>
    </view>
    <!-- 签到卡片 -->
    <view class="sign-card-box">
        <view class="sign-item-box">
            <view class="_left">
                <view class="_item" wx:for="{{signInNodes}}" wx:key="index" >
                    <image class="_figure" src="{{item.figure}}" mode="aspectFill" />
                    <view class="_no" style="{{item.textBgGround}}">{{item.text}}</view>
                    <image wx:if="{{item.isSignIn == -1}}" class="_lose_sign_in" src="/images/signIn/losesign.png" />
                    <image wx:if="{{item.isSignIn == 1}}" class="_finish_sign_in" src="/images/signIn/finishsign.png" />
                </view>
            </view>
            <view class="_right">
                <view class="_item">
                    <image class="_figure" src="{{lastSignInNode.figure}}" mode="aspectFill" />
                    <view class="_no" style="{{lastSignInNode.textBgGround}}">{{lastSignInNode.text}}</view>
                    <image wx:if="{{lastSignInNode.isSignIn == -1}}" class="_lose_sign_in" src="/images/signIn/losesign.png" />
                    <image wx:if="{{lastSignInNode.isSignIn == 1}}" class="_finish_sign_in" src="/images/signIn/finishsign.png" />
                </view>
            </view>
        </view>
        
        <block wx:if="{{todayIsSigned}}">
            <view class="_sign_in_btn">今日已签到</view>
        </block>
        <block wx:else>
            <view class="_sign_in_btn" style="{{backGroundStyle}}" catchtap="tapSignIn">
                签到领好礼
                <button wx:if="{{!isLogin}}" class="phone-button" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" />
            </view>
        </block>

    </view>

    <!-- 签到任务列表 -->
    <view class="sign-task-box">
        <view class="_task_title">做任务领优惠券</view>
        <view class="_task_list">
            <!-- 签到项 -->
            <view wx:for="{{activity.taskAwardList}}" wx:key="index" class="_task_item">
               <view  class="_task_item_left">
                   <view class="_ico">
                     <image src="{{item.figure}}" mode="aspectFill" />
                   </view>
                   <view class="_info">
                        <view class="_title">{{item.taskTitle}}</view>
                        <view class="_des">{{item.taskSubtitle}}</view>
                   </view>
               </view>
               <view class="_task_item_right">
                   <view style="color:#999;" class="_btn" wx:if="{{item.isComplete == 1}}">
                    已完成
                   </view>
                   <view style="color: {{mainColor}};" class="_btn" wx:else>
                    未完成
                   </view>
               </view>
            </view>
        </view>
    </view>

    <!-- 活动说明 -->
    <view class="activity-des">
       <view class="_title">活动说明</view>
       <view class="_des">
          <text>{{activity.activityDesc}}</text>
       </view>
    </view>

</view>

<!-- 页面头部 -->
<view class="sign-head">
   <view class="head-bg">
    <image src="{{activity.themePic}}" />
   </view>
   <view class="head-bar" style="height:{{navHeight}}px">
      <view style="margin-top: {{capsuleTop}}px;line-height: {{capHeight}}px;">签到中心</view>
   </view>
</view>


<!-- 签到成功弹窗 -->
<view class="dlg" wx:if="{{showSignInSuccessDlg}}">
    <view class="sign-pop-body">
        <view class="_body">
           <view class="gift_wrap">
                <view class="coupon_node">
                    <view wx:if="{{hitResult.couponType=='D'}}" class="_node_left _zk {{hitResult._classSmallStyle}}">
                        <view class="_num">{{hitResult.formatDiscount}}</view>
                        <view class="_zhe">折</view>
                    </view>
                    <view wx:if="{{hitResult.couponType=='C'}}" class="_node_left _cash {{hitResult._classSmallStyle}}">
                        <view class="_unit">¥</view>
                        <view class="_num">{{hitResult.formatReduceCost}}</view>
                    </view>
                    <view class="_node_right">
                        <view class="_coupont_title">{{hitResult.couponTitle}}</view>
                        <view class="_coupon_sub_title">{{hitResult.formatLeastCostStr}}</view>
                        <view class="_coupon_times"></view>
                    </view>
                    <image wx:if="{{hitResult.couponType=='D'}}" class="_bg" src="/images/signIn/coupon1.png" />
                    <image wx:if="{{hitResult.couponType=='C'}}" class="_bg" src="/images/signIn/cash_coupon.png" />
                </view>
           </view>
           <view class="award_des" style="color:{{secColor}};">恭喜您签到成功 获得9折扣折扣券</view>

           <view class="_btn" style="{{backGroundStyle}}">
            <jumpmallapp>去使用</jumpmallapp>
           </view>

        </view>
        
        <image class="_layer_bg" src="{{activity.popBgPic}}" />
    </view>
    
    <view class="_layer" catchtap="closeDlg" >
        <image class="_close" src="/images/signIn/close.png" />
    </view>
</view>

</view>