<!-- mode1 收款码手动审核 - 参考逍遥梦样式 -->
<view class="ref-page">
  <view class="method-card method-card--row">
    <view class="method-tab method-tab--active">
      <image wx:if="{{txfangshi == 1}}" class="method-tab-icon" src="{{imgUrls.iconWechat}}" mode="aspectFit" />
      <image wx:elif="{{txfangshi == 2}}" class="method-tab-icon" src="{{imgUrls.iconAlipay}}" mode="aspectFit" />
      <view wx:else class="method-tab-icon method-tab-icon--placeholder"></view>
      <text class="method-tab-text">{{txfangshi == 1 ? '微信零钱' : (txfangshi == 2 ? '收款码' : '请先设置收款')}}</text>
      <view class="method-tab-line"></view>
    </view>
    <text class="method-setting" bindtap="onSetSkfs">设置收款方式</text>
  </view>

  <view class="account-card" wx:if="{{displayAssetList.length > 0}}">
    <scroll-view scroll-x enable-flex class="account-scroll" show-scrollbar="{{false}}">
      <view
        wx:for="{{displayAssetList}}"
        wx:key="type"
        class="account-chip {{selectedAsset.type === item.type ? 'account-chip--active' : ''}} {{item.amount <= 0 ? 'account-chip--disabled' : ''}}"
        bindtap="onSelectAsset"
        data-index="{{index}}"
      >
        <text class="chip-label">{{item.label}}</text>
        <text class="chip-amount">¥{{item.amount}}</text>
      </view>
    </scroll-view>
    <text wx:if="{{!selectedAsset}}" class="account-warn">请先选择上方提现账户</text>
    <text wx:else class="account-ok">当前：{{selectedAsset.label}}</text>
  </view>

  <view class="amount-card">
    <view class="avail-row">
      <text class="avail-label">当前可提现：</text>
      <text class="avail-symbol">¥</text>
      <text class="avail-amount">{{selectedAsset ? selectedAsset.amount : totalAmount}}</text>
    </view>
    <view class="input-row">
      <text class="input-symbol">¥</text>
      <input
        class="amount-input"
        type="digit"
        placeholder="请输入金额"
        placeholder-class="amount-placeholder"
        value="{{tixianAmount}}"
        bindinput="onAmountInput"
      />
      <text class="withdraw-all" bindtap="onWithdrawAll">全部提现</text>
    </view>
    <view class="input-divider"></view>
    <view class="fee-tip">
      <text>提示：提现手续费</text>
      <text class="fee-highlight">{{feeRateText}}</text>
      <text>。</text>
    </view>
  </view>

  <view class="submit-wrap">
    <view class="confirm-btn {{canWithdraw && !submitting ? '' : 'confirm-btn--disabled'}}" bindtap="onTapWithdraw">
      <text wx:if="{{submitting}}">处理中...</text>
      <text wx:else>确认提现</text>
    </view>
  </view>

  <view class="notice-box">
    <view class="notice-title">📢 提现须知</view>
    <view class="notice-item">🕒 提交后将进入人工审核，请耐心等待</view>
    <view class="notice-item">📌 审核结果可在「提现记录」中查看</view>
    <view class="notice-item">💰 每笔只能从单个账户提现，请先选择对应账户</view>
    <view class="notice-item">✅ 请确保收款方式与收款码正确后再提交</view>
    <view class="notice-item">🎧 如有疑问请联系客服核实处理</view>
  </view>
</view>

<view wx:if="{{showTixianModal}}" class="modal-mask" bindtap="onCloseTixianModal">
  <view class="modal-dialog" catchtap="stopPropagation">
    <view class="modal-header">确认提现</view>
    <view class="modal-body">
      <view class="info-row"><text>身份</text><text>{{selectedAsset.label}}</text></view>
      <view class="info-row"><text>可提</text><text>¥{{selectedAsset.amount}}</text></view>
      <view class="info-row"><text>费率</text><text>{{currentRate}}</text></view>
      <view class="info-row"><text>提现金额</text><text>¥{{tixianAmount}}</text></view>
      <view class="fee-row"><text>手续费 ¥{{shouxufei}}</text><text>到账 ¥{{shijidaozhang}}</text></view>
      <view class="info-row"><text>收款</text><text>{{txfangshi == 1 ? '微信' : (txfangshi == 2 ? '支付宝' : '未设置')}}</text></view>
    </view>
    <view class="modal-footer">
      <view class="modal-btn cancel" bindtap="onCloseTixianModal">取消</view>
      <view class="modal-btn confirm" bindtap="onConfirmWithdraw">{{submitting ? '处理中' : '提交申请'}}</view>
    </view>
  </view>
</view>

<view wx:if="{{showSkfsModal}}" class="modal-mask" bindtap="onCloseSkfsModal">
  <view class="modal-dialog" catchtap="stopPropagation">
    <view class="modal-header">收款方式</view>
    <view class="modal-body skfs-body">
      <view class="toggle-row">
        <view class="toggle-item {{tempTxfangshi == 1 ? 'active' : ''}}" bindtap="onSelectFangshi" data-fangshi="1">微信</view>
        <view class="toggle-item {{tempTxfangshi == 2 ? 'active' : ''}}" bindtap="onSelectFangshi" data-fangshi="2">支付宝</view>
      </view>
      <input class="field-input" placeholder="手机号" value="{{tempTxPhone}}" bindinput="onPhoneInput" />
      <view wx:if="{{tempTxfangshi == 2}}"><input class="field-input" placeholder="支付宝账号" value="{{tempTxAccount}}" bindinput="onAccountInput" /></view>
      <view class="upload-wrap">
        <view wx:if="{{!tempTxImage}}" class="upload-trigger" bindtap="onChooseImage">+ 上传收款码</view>
        <view wx:else class="image-preview"><image src="{{tempTxImage}}" mode="aspectFill" /><view class="image-actions"><text bindtap="onPreviewImage">预览</text><text bindtap="onDeleteImage">删除</text></view></view>
      </view>
    </view>
    <view class="modal-footer">
      <view class="modal-btn cancel" bindtap="onCloseSkfsModal">取消</view>
      <view class="modal-btn confirm" bindtap="onConfirmSkfs">保存</view>
    </view>
  </view>
</view>

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