<!-- record-mode1：仅提现记录（收款码手动审核） -->
<view class="app">
  <image class="global-bg" src="{{imgUrls.pageBg}}" mode="aspectFill" />

  <view class="history-section history-section--full">
    <view class="history-header">
      <text class="history-title">提现记录</text>
    </view>
    <scroll-view class="history-scroll" scroll-y enable-back-to-top bindscrolltolower="onLoadMoreFromScroll">
      <view wx:for="{{recordList}}" wx:key="index" class="history-item">
        <view class="history-info">
          <text class="history-amount">¥{{item.jine}}</text>
          <text class="history-time">{{item.create}}</text>
        </view>
        <view class="history-detail">
          <text class="history-method">{{item.fangshi == 1 ? '微信' : '支付宝'}}</text>
          <text class="history-type">{{item.leixing == 1 ? '佣金' : (item.leixing == 2 ? '分红' : (item.leixing == 3 ? '组长' : (item.leixing == 4 ? '考核官' : '保证金')))}}</text>
        </view>
        <view class="history-status">
          <view wx:if="{{item.zhuangtai == 1}}" class="status-badge status-wait" bindtap="onModifyRecord" data-record="{{item}}">{{item.statusText}} ✏修改</view>
          <view wx:elif="{{item.zhuangtai == 3}}" class="status-badge status-fail">
            {{item.statusText}}
            <text class="fail-link" bindtap="onViewFailReason" data-record="{{item}}">详情</text>
          </view>
          <view wx:else class="status-badge status-done">{{item.statusText}}</view>
        </view>
      </view>
      <view wx:if="{{loading}}" class="load-tip">加载中...</view>
      <view wx:if="{{nomore && recordList.length > 0}}" class="more-tip">—— 没有更多了 ——</view>
      <view wx:if="{{!nomore && recordList.length > 0}}" class="load-more-btn" bindtap="loadMoreRecords">加载更多记录</view>
      <view wx:if="{{recordList.length === 0 && !loading}}" class="load-tip">暂无提现记录</view>
    </scroll-view>
  </view>

  <view class="safe-bottom"></view>
</view>

<view wx:if="{{showModifyModal}}" class="modal-mask" bindtap="onCloseModifyModal">
  <view class="modal-dialog" catchtap="stopPropagation">
    <view class="modal-header">修改信息</view>
    <view class="modal-body">
      <view class="toggle-row"><view class="toggle-item {{modifyTxfangshi == 1 ? 'active' : ''}}" bindtap="onSelectModifyFangshi" data-fangshi="1">微信</view><view class="toggle-item {{modifyTxfangshi == 2 ? 'active' : ''}}" bindtap="onSelectModifyFangshi" data-fangshi="2">支付宝</view></view>
      <input class="field-input" placeholder="电话" value="{{modifyTxPhone}}" bindinput="onModifyPhoneInput" />
      <view wx:if="{{modifyTxfangshi == 2}}"><input class="field-input" placeholder="支付宝账号" value="{{modifyTxAccount}}" bindinput="onModifyAccountInput" /></view>
      <view class="upload-wrap"><view wx:if="{{modifyImageUrl}}" class="current-img"><image src="{{modifyImageUrl}}" mode="aspectFill" bindtap="onPreviewModifyImage" /></view><view class="upload-trigger" bindtap="onChooseModifyImage">+ 上传新图片</view><view wx:if="{{modifyTxImage}}" class="image-preview"><image src="{{modifyTxImage}}" mode="aspectFill" /><view class="image-actions"><text bindtap="onPreviewModifyImage">预览</text><text bindtap="onDeleteModifyImage">删除</text></view></view></view>
    </view>
    <view class="modal-footer"><view class="modal-btn cancel" bindtap="onCloseModifyModal">取消</view><view class="modal-btn confirm" bindtap="onConfirmModify">确认</view></view>
  </view>
</view>

<view wx:if="{{showFailModal}}" class="modal-mask" bindtap="onCloseFailModal">
  <view class="modal-dialog" catchtap="stopPropagation">
    <view class="modal-header">失败原因</view>
    <view class="modal-body">{{currentFailReason}}</view>
    <view class="modal-footer"><view class="modal-btn confirm" bindtap="onCloseFailModal">知道了</view></view>
  </view>
</view>

<global-notification id="global-notification" />
<popup-notice id="popupNotice" />
