<!--pages/yhq/yhq.wxml-->
<!-- 保留两位小数 过滤器-->
<wxs module="filter" src="filter.wxs"></wxs>
<view class='money'>
  <view class='mt1'>账户积分 </view>
  <view class='mt10'>
    <text class='sz'>{{filter.getNum(number)}}</text>积分
  </view>
</view>

<!--选择款-->
<view class='top'>
 <view class="jfmx-rim" bindtap="swichNav">
 <!-- class='tyi' -->
 <view  class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" >积分明细</view></view> 
 <view class="jfmx-rim"bindtap="swichNav">
 <!-- class='ter' -->
  <view wx:if="{{is_show_jfcz}}"  class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" >积分充值</view></view>
</view>
<view wx:if="{{jfmx}}">
  <view class='body' bindtap="detailed">
    <view class='b_left'>
      <text>积分收支明细</text>
    </view>
    <view class='b_right'>
      <view class='r_img'>
        <text class='gd'>更多</text>
        <image src='{{iurl}}miniapp/images/user/leftTip.png'></image>
      </view>
    </view>

  </view>
  <view wx:if="{{details}}">
    <block wx:for="{{details}}" wx:for-index="idx" wx:for-item="details">
      <view class="data">
        <view class="left">
          <view class='left-test'>{{details.Remark}}
            <view class='time'>{{details.BillDate}}</view>
          </view>
        </view>
        <view class="val" style='color:{{(details.InOutInt>0)?"green":""}}'>
          {{(details.InOutInt>0)?"+":""}}{{filter.getNum(details.InOutInt)}}积分 </view>
        </view>
        <view style="clear:both"></view>
    </block>

  </view>

    <!-- 暂无数据 -->
		<nodata nodataContainer="t-c" wx:if="{{(is_get_d && details.length == 0)}}"></nodata>
    <view class="noMore" wx:if="{{is_no_more == 1 && details.length>0}}">—— 已经到底了 ——</view>

</view>

<!-- 充值 -->
<view wx:if='{{jfcz}}'>
  <block wx:for="{{result}}" wx:for-index="idx" wx:for-item="result">
    <view class='jfcz1'>

      <view class="money-rim">
        <view class="tosum">
          <view class="rbm">￥</view>
          <text class='f_big'>{{filter.getval(result.ToSum,2)}}</text>
        </view>
      </view>
      <view class='mb20'>充值{{result.Integral}}积分</view>
      <view class='jf_btn' data-money='{{result.ToSum}}' data-integral='{{result.Integral}}' bindtap="integral">立即充值</view>
    </view>
  </block>

  <!-- 暂无数据 -->
	<nodata nodataContainer="t-c" wx:if="{{is_get_c && result.length == 0}}"></nodata>
  <view class="noMore" wx:if="{{is_no_more_e == 1 && result.length>0}}">—— 已经到底了 ——</view>


  <!-- 积分劵的弹框 -->
  <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
  <view class="big-rim modalDlg" wx:if="{{showModal}}">
    <view class="gb-rim" bindtap="shut">
      <image class="imag" src="{{iurl}}/miniapp/images/usermoney/img.png"></image>
    </view>
    <view class='cz-rim'>
     <view class="text">充值{{integral}}积分</view>
      <view class="min-rim">
        <view class="fh">¥</view>
        <view class="value">{{filter.getval(money,2)}}</view>
      </view>
      </view>
    <view class="bk">
      <view class="shul-rim">
        <view class="gmsl">购买数量</view>
        <view class="reduce" bindtap='reduce'>
        <!-- style='background: url(/images/usermoney/shop-cart.png)no-repeat 10rpx -130rpx;background-size:140rpx; ' -->
          <image class="jian" src="{{iurl}}/miniapp/images/usermoney/shop-cart.png"></image>
        </view>

        <view class='input_box'>
          <input class="box" value='{{val}}'>{{val}}</input>
        </view>
        <view class="reduce_two" bindtap='plus'>
          <image class="jia" src="{{iurl}}/miniapp/images/usermoney/shop-cart.png"></image>
        </view>
      </view>
      <button class="button" data-money='{{money}}' data-integral='{{integral}}' data-val="{{val}}" bindtap="determine">确定</button>
    </view>
  </view>
</view>