<view class="verification-popup {{isShow ? 'show' : ''}}">
  <view class="overlay" bindtap="onClose"></view>
  <!-- 绑定晃动动画类 -->
  <view class="popup-content {{isShakeError ? 'shake-error' : ''}}">
    <view class="popup-header">
      <text class="title" wx:if="{{type=='结算'}}">请输入账户密码</text>
      <text class="title" wx:else>输入验证码</text>
      <view class="close-btn" bindtap="onClose">
        <icon type="clear" size="20" color="#999" />
      </view>
    </view>
    <!-- 结算密码输入框：展示●，真实值保留数字 -->
    <view class="code-input-container" wx:if="{{type=='结算'}}">
      <view wx:for="{{6}}" wx:key="index" class="code-input {{currentIndex === index ? 'active' : ''}} {{codes[index] ? 'filled' : ''}}" bindtap="focusInput">
        <!-- 核心修改：有值时显示●，无值时为空 -->
        <text>{{codes[index] ? '●' : ''}}</text>
      </view>
      <input class="real-input" type="number" maxlength="6" focus="{{isFocus}}" value="{{oncodeValue}}" bindinput="onCodeInput" bindblur="onInputBlur" />
    </view>
    <!-- 验证码输入框：仍显示明文，不变 -->
    <view class="code-input-container" wx:else>
      <view wx:for="{{4}}" wx:key="index" class="code-input {{currentIndex === index ? 'active' : ''}} {{codes[index] ? 'filled' : ''}}" bindtap="focusInput">
        <text>{{codes[index] || ''}}</text>
      </view>
      <input class="real-input" type="number" maxlength="4" focus="{{isFocus}}" value="{{codeValue}}" bindinput="onCodeInput" bindblur="onInputBlur" />
    </view>

    <view class="operation-area">
      <view class="resend-container" wx:if="{{type!='结算'}}">
        <view 
  class="resend-btn {{countdown > 0 ? 'disabled' : ''}}"
  bindtap="onResend"
  wx:if="{{type === 'code'}}"
>
  {{countdown > 0 ? countdown + 's后重新发送' : '重新发送验证码'}}
</view>
      </view>
    </view>
  </view>
</view>