<!-- 会员首页 -->
<view class="member-index">
  <!-- 会员信息 -->
  <view class="member-msg">
    <image src="../../images/icon/memberIndexBg.png" class="m-bg" />
    <view class="member-info">
      <view class="head-portrait">
        <image src="{{userInfo.pic? userInfo.pic : '../../../images/icon/head04.png'}}"></image>
      </view>
      <view class="text-box">
        <view class="name-box">
          <text class="name">{{userInfo.nickName}}</text>
          <view class="level">
            <image src="{{userInfo.levelType == 0?'../../../images/icon/normal-icon.png':'../../../images/icon/integral-icon.png'}}" class="l-bg" />
            <view class="text">{{userMemberInfo.userLevel.levelName}}</view>
          </view>
        </view>
        <view class="date">
          {{userInfo.levelType == 0? "您还不是付费会员~": wxs.spliceDate(userMemberInfo.endTime)+' 到期'}}
        </view>
      </view>
      <view class="buy-btn" bindtap="buyMember">购买会员</view>
    </view>
    <view class="grow-box">
      <view class="item">
        <view class="text">当前成长值</view>
        <view class="number-box" bindtap="toMemberCenter">
          <text class="number">{{userCenterInfo.growth}}</text>
          <view class="arr">
            <image src="../../../images/icon/white-arr.png" />
          </view>
        </view>
      </view>
      <view class="item">
        <view class="text">当前积分</view>
        <view class="number-box" bindtap="toIntegralDetail">
          <text class="number">{{userCenterInfo.score}}</text>
          <view class="arr">
            <image src="../../../images/icon/white-arr.png" />
          </view>
        </view>
      </view>
    </view>
  </view>
  <!-- /会员信息 -->
  <!-- 签到 -->
  <view class="sign-in">
    <view class="member-tit">
      <view class="text">每日签到</view>
    </view>
    <view class="con-box">
      <view class="item" bindtap="getPoints" data-index="{{index}}" wx:for="{{userCenterInfo.scoreList}}" wx:key="index" wx:for-item="item">
        <view class="number" wx:if="{{userCenterInfo.signInCount<index+1}}">+{{item}}</view>
        <view class="number active num-text" wx:if="{{userCenterInfo.signInCount==index+1 && userCenterInfo.isSignIn==0}}">可签到</view>
        <view class="number active num-text" wx:if="{{(userCenterInfo.signInCount>=index+1 && userCenterInfo.isSignIn==1)||(userCenterInfo.signInCount>index+1 && userCenterInfo.isSignIn==0)}}">已签到</view>
        <view class="day">第{{index+1}}天</view>
      </view>
    </view>
  </view>
  <!-- /签到 -->
  <!-- 积分活动 -->
  <view class="activity">
    <view class="member-tit">
      <view class="text">积分活动</view>
    </view>
    <view class="con-box">
      <view class="item" bindtap="goodsListViewMore">
        <image src="../../images/icon/integralActBg1.png" class="bg" />
        <view class="b-text">积分商城</view>
        <view class="s-text">积分兑换好物</view>
      </view>
      <view class="item" bindtap="toLuckyDraw">
        <image src="../../images/icon/integralActBg2.png" class="bg" />
        <view class="b-text">大转盘</view>
        <view class="s-text">积分抽奖活动</view>
      </view>
    </view>
  </view>
  <!-- /积分活动 -->
  <!-- 任务 -->
  <view class="mission">
    <view class="member-tit">
      <view class="text">积分任务</view>
      <!-- <view class="more">查看更多</view> -->
    </view>
    <view class="con-box">
      <!-- <view class="item">
        <view class="mission-box">
          <view class="name">购买付费会员</view>
          <view class="mission-des">购买付费会员可获得积分/次</view>
        </view>
        <view class="btn" bindtap="buyMember">去购买</view>
      </view> -->
      <view class="item">
        <view class="mission-box">
          <view class="name">商城购物</view>
          <view class="mission-des">商城购物可获得积分，{{userCenterInfo.shopScore}}元/分</view>
        </view>                                                                                                                                                                             
        <view class="btn" bindtap="toIndexPage">去购物</view>
      </view>
      <view class="item">
        <view class="mission-box">
          <view class="name">注册新用户</view>
          <view class="mission-des">每位用户注册成为新会员可获得{{userCenterInfo.registerScore}}积分</view>
        </view>
        <view class="btn" wx:if="{{userCenterInfo.isRegister == 0}}" bindtap="getPoints" data-type="11">去完成</view>
        <view class="btn done" wx:if="{{userCenterInfo.isRegister == 1}}">已完成</view>
      </view>
    </view>
  </view>
  <!-- /任务 -->
  <!-- 积分兑换 -->
  <view class="integral-list" wx:if="{{scoreProdList.length}}">
    <view class="member-tit">
      <view class="text">积分兑换</view>
      <view class="more" bindtap="goodsListViewMore">查看更多</view>
    </view>
    <view class="con-box">
      <block wx:for="{{scoreProdList}}" wx:for-item="prod" wx:key="prodId" >
        <goodsitem prod="{{prod}}" bindtap="toScoreProdDet" data-scoreprodid="{{prod.prodId}}"></goodsitem>
      </block>
    </view>
  </view>
  <!-- 积分兑换 -->
</view>

<wxs module="wxs" src="../../../wxs/number.wxs" />
