<!--pages/integralWater.wxml-->
<view class='integral'>
  <!-- <view class="integral-detail">
      <view class="integral-num">
        <view class="num-current">{{integralNum}}</view>
        <view class="num-title">当前积分</view>
      </view>
      <view class="integral-vip-rules" bindtap="handleGoMemberRulesRules">积分规则</view>
  </view> -->

  <!-- 新布局 -->
  <view class='new-container'>
    <view class='new-container-lf'>
      <view class='new-point-info'>
        <image class="point-img" src='/assets/imgs/point.png' mode="widthFix" />
        <label class='text-point'>{{memberPoint.total}}</label>
      </view>
      <view class='title-time-point' wx:if="{{memberPoint.expirePoint > 0}}">
        {{memberPoint.expirePoint}} 积分将于 {{memberPoint.expireDate}} 清零
      </view>
      <view class='title-time-point' wx:if="{{memberPoint.expirePoint == 0}}">暂无将过期积分</view>
    </view>
    <view class='new-container-rg'>
      <view class='new-integral-vip-rules' bindtap="handleGoMemberRulesRules">积分规则</view>
    </view>
  </view>


  <view wx:if="{{!integralList.length}}" class="detail-list-no">还没有任何积分记录</view>
  <view wx:if="{{integralList.length}}">
    <view class="integral-tips">
      <view class="tips-detail">显示你最近30笔变动明细</view>
      <text class="tips-much">这么多积分</text><text class="tips-gomall" bindtap="handleGoIntegralMall"> 去积分商城看看>>> </text>
    </view>
    <!--积分列表-->
    <view>
      <view class="detail-integral" 
      wx:for="{{integralList}}" 
      wx:for-item="item" 
      data-memberId = "{{item.memberId}}" 
      data-expandInfo= "{{item.expandInfo}}" 
      data-changeType="{{item.changeType}}"
      wx:for-index="k" 
      wx:key="{{k}}" bindtap="handleGoDetail">
        <view class="detail-left">
          <view class="detail-title">{{item.changeTypeDesc}}</view>
          <view class="detail-time">{{item.changeTime}}</view>
        </view>
        <view class="detail-num {{item.operation==true ? 'add' : 'less'}}" 
        style='padding-right:{{item.changeType != 26 ? "24rpx" : 0}}'>
          <text>{{item.operation == 1? '+':''}}{{item.operation*item.changeValue}}</text>
          <image wx:if="{{item.changeType == 26}}" src='/assets/imgs/arrow-right-sku.png' mode='aspectFit'></image>
        </view>
      </view>
      <no-more wx:if="{{noMore}}"/>
    </view>
  </view>
</view>
