login.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <view>
  3. <view class="main">
  4. <view class="close">
  5. <u-icon name="close" size="32" color="#101010"></u-icon>
  6. </view>
  7. <view class="logo">
  8. <img src="../../assets/img/logo.png" alt="">
  9. </view>
  10. <view class="name">
  11. 荆州市地方铁路有限公司
  12. </view>
  13. <view class="login">
  14. <view class="login-box">
  15. <view :class="['tel',telHighlight==true?'highlight':'']" >
  16. <view class="icon" >
  17. <u-icon name="account-fill" size="40" ></u-icon>
  18. </view>
  19. <view class="line">
  20. </view>
  21. <view class="tips">
  22. <u-input @focus="handleTelFocus" @blur="handleTelBlur" class="telInput" type="number" placeholder="请填写系统预留手机号码" />
  23. </view>
  24. </view>
  25. <view :class="['pwd',pwdHighlight==true?'highlight':'']" >
  26. <view class="icon">
  27. <u-icon name="chat-fill" size="40"></u-icon>
  28. </view>
  29. <view class="line">
  30. </view>
  31. <view class="tips">
  32. <view class="input">
  33. <u-input @focus="handlePwdFocus" @blur="handlePwdBlur" type="number" placeholder="请输入验证码" />
  34. </view>
  35. <view class="verification-code">获取验证码</view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="btn">
  41. <button>登录</button>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. export default {
  48. data() {
  49. return {
  50. show:true,
  51. telHighlight:false,
  52. pwdHighlight:false
  53. }
  54. },
  55. methods: {
  56. // 帐号框聚焦失焦
  57. handleTelFocus(){
  58. this.telHighlight=true
  59. },
  60. handleTelBlur(){
  61. this.telHighlight=false
  62. },
  63. // 密码框聚焦失焦
  64. handlePwdFocus(){
  65. this.pwdHighlight=true
  66. },
  67. handlePwdBlur(){
  68. this.pwdHighlight=false
  69. }
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. page {
  75. background: url("../../assets/img/bgc.png");
  76. }
  77. .main {
  78. width: 100%;
  79. padding-top:240rpx;
  80. position: relative;
  81. .close{
  82. position: absolute;
  83. top: 24rpx;
  84. left: 24rpx;
  85. }
  86. .logo {
  87. display: flex;
  88. justify-content: center;
  89. }
  90. .name {
  91. color: rgba(16, 16, 16, 1);
  92. font-size: 40rpx;
  93. text-align: center;
  94. font-weight: bold;
  95. margin-top: 8rpx;
  96. font-family: 'SemiBold';
  97. }
  98. }
  99. .login-box {
  100. margin-top: 160rpx;
  101. .tel {
  102. /deep/.u-input {
  103. width: 400rpx;
  104. }
  105. }
  106. .line{
  107. width: 2rpx;
  108. height: 40rpx;
  109. background-color: #C1CCDF;
  110. position: absolute;
  111. top: 20rpx;
  112. left: 70rpx;
  113. }
  114. .tel,
  115. .pwd {
  116. position: relative;
  117. display: flex;
  118. width: 74.4%;
  119. height: 80rpx;
  120. line-height: 80rpx;
  121. color: rgba(183, 172, 172, 1);
  122. margin: auto;
  123. margin-bottom: 36rpx;
  124. border: 1px solid rgba(193, 204, 223, 1);
  125. border-radius: 8px;
  126. /deep/.u-input__input{
  127. font-size: 32rpx;
  128. }
  129. .icon {
  130. width: 14%;
  131. text-align: center;
  132. color: #B0B8C8;
  133. img {
  134. vertical-align: middle;
  135. }
  136. }
  137. .tips {
  138. text-indent: 16rpx;
  139. padding-right: 16rpx;
  140. display: flex;
  141. justify-content: space-between;
  142. /deep/uni-input {
  143. height: 80rpx !important;
  144. line-height: 80rpx !important;
  145. }
  146. .input {
  147. width: 60%;
  148. }
  149. }
  150. // 验证码
  151. .verification-code {
  152. color: #1F4A99;
  153. line-height: 80rpx;
  154. font-family: 'Regular';
  155. }
  156. }
  157. // 高亮
  158. .highlight {
  159. border: 1px solid rgba(31, 74, 153, 1);
  160. box-shadow: 0px 0px 8rpx 0px rgba(0, 90, 217, 50);
  161. /deep/.u-input__input{
  162. color: rgba(0, 90, 217, 1);
  163. }
  164. .icon{
  165. color: #1F4A99;
  166. }
  167. .line{
  168. background-color: #005AD9;
  169. }
  170. }
  171. }
  172. .btn{
  173. width: 100%;
  174. margin-top: 120rpx;
  175. uni-button{
  176. margin:0 96rpx;
  177. height: 80rpx;
  178. border-radius: 8px;
  179. background-color: rgba(31, 74, 153, 1);
  180. color: rgba(255, 255, 255, 1);
  181. font-size: 16px;
  182. }
  183. }
  184. </style>