<!--pages/income-details/income-details.wxml-->
<view class='container'>
  <view>
    <view class='income-detail'>
      <view class='gather-income'>
        <view class='title'>累计收益(元)</view>
        <view class='number'>{{wxs.toPrice(addupAmount)}}</view>
      </view>
      <view class='income-item'>
        <view class='items'>
          <view>可提余额(元)</view>
          <view>{{wxs.toPrice(settledAmount)}}</view>
        </view>
        <view class='items'>
          <view>待结算(元)</view>
          <view>{{wxs.toPrice(unsettledAmount)}}</view>
        </view>
      </view>
    </view>
  </view>

  <!-- 收益明细 -->
  <view class='income-block'>
    <view class='block-title'>
      <view>本月收益：￥{{wxs.toPrice(monthAmount)}}</view>
      <view>今日收益：￥{{wxs.toPrice(todayAmount)}}</view>
    </view>

    <view class='block-lists'>
      <block wx:for="{{records}}" wx:key="id">
        <view class='list-item'>
          <view class='tit'>
          <view class="tit-left">
            <!-- 0其他、1一代奖励、2二代奖励、3邀请奖励 -->
            <text class='origin' wx:if="{{item.incomeType === 0}}">其他</text>
            <text class='origin' wx:if="{{item.incomeType === 1}}">一代奖励</text>
            <text class='origin' wx:if="{{item.incomeType === 2}}">二代奖励</text>
            <text class='origin' wx:if="{{item.incomeType === 3}}">邀请奖励</text>
            <view class='date'>{{item.updateTime}}</view>
            </view>
            <view class='income-num'>
              <text wx:if="{{item.state == -1}}" class="income-fail">{{wxs.toPrice(item.incomeAmount)}}</text>
              <text wx:else>+{{wxs.toPrice(item.incomeAmount)}}</text>
              <text class="origin-status">{{item.state==-1?'已失效':(item.state==2?'已结算':'待结算')}}</text>
            </view>
          </view>

        </view>
      </block>

    </view>

    <view class="empty" wx:if="{{records.length==0}}">{{emptyMsg}}</view>
    <view class="loading" wx:if="{{totalPage>1}}">{{loadingMsg}}</view>
  </view>
</view>

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