与牧同行-兽医端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
5.8 KiB

  1. <view class="login-container">
  2. <!-- 顶部波浪背景 -->
  3. <view class="wave-background">
  4. <view class="wave wave-1"></view>
  5. <view class="wave wave-2"></view>
  6. <view class="wave wave-3"></view>
  7. </view>
  8. <!-- 装饰元素 - 兽医主题 -->
  9. <view class="decorations">
  10. <view class="cloud cloud-1"></view>
  11. <view class="cloud cloud-2"></view>
  12. <view class="cloud cloud-3"></view>
  13. <view class="medical-icon icon-1">🐾</view>
  14. <view class="medical-icon icon-2">💊</view>
  15. <view class="medical-icon icon-3">🏥</view>
  16. </view>
  17. <!-- 主要内容区域 -->
  18. <view class="main-content">
  19. <!-- Logo区域 -->
  20. <view class="logo-section">
  21. <view class="logo-container">
  22. <view class="logo-circle">
  23. <view class="logo-inner">
  24. <text class="logo-text">牧</text>
  25. </view>
  26. </view>
  27. </view>
  28. <text class="app-title">牧医通</text>
  29. <text class="app-subtitle">Veterinary Assistant</text>
  30. </view>
  31. <!-- 登录区域 -->
  32. <view class="login-section">
  33. <view class="welcome-text">
  34. <text class="welcome-main">欢迎登录</text>
  35. <text class="welcome-desc">请输入您的手机号密码</text>
  36. </view>
  37. <!-- 账号输入框 -->
  38. <view class="input-group">
  39. <view class="input-wrapper {{accountFocus ? 'input-focused' : ''}}">
  40. <image class="input-icon" src="/pages/images/zh.png" mode=""/>
  41. <input
  42. type="text"
  43. placeholder="请输入手机号"
  44. placeholder-class="input-placeholder"
  45. value="{{account}}"
  46. bindinput="onAccountInput"
  47. bindfocus="onAccountFocus"
  48. bindblur="onAccountBlur"
  49. maxlength="20"
  50. confirm-type="next"
  51. bindconfirm="focusPassword"
  52. />
  53. </view>
  54. <!-- 密码输入框 -->
  55. <view class="input-wrapper {{passwordFocus ? 'input-focused' : ''}}">
  56. <image class="input-icon" src="/pages/images/mm.png" mode=""/>
  57. <input
  58. type="{{passwordVisible ? 'text' : 'password'}}"
  59. placeholder="请输入密码"
  60. placeholder-class="input-placeholder"
  61. value="{{password}}"
  62. password="{{!passwordVisible}}"
  63. bindinput="onPasswordInput"
  64. bindfocus="onPasswordFocus"
  65. bindblur="onPasswordBlur"
  66. maxlength="20"
  67. confirm-type="done"
  68. bindconfirm="handleLogin"
  69. />
  70. <view class="password-toggle" bindtap="togglePasswordVisible" data-stop="true">
  71. <text wx:if="{{passwordVisible}}">👁️</text>
  72. <text wx:else>👁️‍🗨️</text>
  73. </view>
  74. </view>
  75. </view>
  76. <!-- 登录按钮 -->
  77. <button
  78. class="login-btn {{canLogin ? '' : 'btn-disabled'}}"
  79. hover-class="btn-hover"
  80. bindtap="handleLogin"
  81. disabled="{{!canLogin}}"
  82. >
  83. <view class="btn-inner">
  84. <text class="btn-text">登录</text>
  85. </view>
  86. </button>
  87. <!-- 其他选项 -->
  88. <view class="options-section">
  89. <view class="option-item" bindtap="showAgreement">
  90. <text class="option-text">用户协议</text>
  91. </view>
  92. <view class="option-item" bindtap="showPrivacy">
  93. <text class="option-text">隐私政策</text>
  94. </view>
  95. <view class="option-item" bindtap="forgotPassword">
  96. <text class="option-text">忘记密码</text>
  97. </view>
  98. </view>
  99. <!-- 协议确认 -->
  100. <view class="agreement-section">
  101. <view class="agreement-checkbox {{isAgree ? 'checked' : ''}}" bindtap="toggleAgreement">
  102. <text class="checkmark" wx:if="{{isAgree}}">✓</text>
  103. </view>
  104. <view class="agreement-text">
  105. 我已阅读并同意
  106. <text class="link" bindtap="showAgreement">《用户协议》</text>
  107. <text class="link" bindtap="showPrivacy">《隐私政策》</text>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. <!-- 底部装饰 -->
  113. <view class="bottom-decor">
  114. <view class="bottom-wave"></view>
  115. </view>
  116. <!-- 协议弹窗(使用原样式) -->
  117. <view class="agreement-modal" wx:if="{{showAgreementModal}}">
  118. <view class="modal-mask" bindtap="hideModal"></view>
  119. <view class="modal-content">
  120. <view class="modal-header">
  121. <text class="modal-title">{{modalTitle}}</text>
  122. <view class="modal-close" bindtap="hideModal">×</view>
  123. </view>
  124. <scroll-view class="modal-body" scroll-y>
  125. <text class="modal-text">{{modalContent}}</text>
  126. </scroll-view>
  127. </view>
  128. </view>
  129. <!-- 加载提示 -->
  130. <view class="loading-mask" wx:if="{{isLoading}}">
  131. <view class="loading-content">
  132. <view class="loading-spinner"></view>
  133. <text class="loading-text">登录中...</text>
  134. </view>
  135. </view>
  136. </view>