电速宝
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

index.wxml 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <view class="verification-popup {{isShow ? 'show' : ''}}">
  2. <view class="overlay" bindtap="onClose"></view>
  3. <!-- 绑定晃动动画类 -->
  4. <view class="popup-content {{isShakeError ? 'shake-error' : ''}}">
  5. <view class="popup-header">
  6. <text class="title" wx:if="{{type=='结算'}}">请输入账户密码</text>
  7. <text class="title" wx:else>输入验证码</text>
  8. <view class="close-btn" bindtap="onClose">
  9. <icon type="clear" size="20" color="#999" />
  10. </view>
  11. </view>
  12. <!-- 结算密码输入框:展示●,真实值保留数字 -->
  13. <view class="code-input-container" wx:if="{{type=='结算'}}">
  14. <view wx:for="{{6}}" wx:key="index" class="code-input {{currentIndex === index ? 'active' : ''}} {{codes[index] ? 'filled' : ''}}" bindtap="focusInput">
  15. <!-- 核心修改:有值时显示●,无值时为空 -->
  16. <text>{{codes[index] ? '●' : ''}}</text>
  17. </view>
  18. <input class="real-input" type="number" maxlength="6" focus="{{isFocus}}" value="{{oncodeValue}}" bindinput="onCodeInput" bindblur="onInputBlur" />
  19. </view>
  20. <!-- 验证码输入框:仍显示明文,不变 -->
  21. <view class="code-input-container" wx:else>
  22. <view wx:for="{{4}}" wx:key="index" class="code-input {{currentIndex === index ? 'active' : ''}} {{codes[index] ? 'filled' : ''}}" bindtap="focusInput">
  23. <text>{{codes[index] || ''}}</text>
  24. </view>
  25. <input class="real-input" type="number" maxlength="4" focus="{{isFocus}}" value="{{codeValue}}" bindinput="onCodeInput" bindblur="onInputBlur" />
  26. </view>
  27. <view class="operation-area">
  28. <view class="resend-container" wx:if="{{type!='结算'}}">
  29. <view
  30. class="resend-btn {{countdown > 0 ? 'disabled' : ''}}"
  31. bindtap="onResend"
  32. wx:if="{{type === 'code'}}"
  33. >
  34. {{countdown > 0 ? countdown + 's后重新发送' : '重新发送验证码'}}
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>