login.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="login">
  3. <car-common ref="common" ></car-common>
  4. <u-navbar title="登录" :is-back="false">
  5. <view class="slot-wrap"></view>
  6. <view class="navbar-right" @click="gotoHome" >
  7. <u-icon name="home-fill" color="#999" size="28"></u-icon>
  8. <span >前往首页</span>
  9. </view>
  10. </u-navbar>
  11. <view class="login-logo">
  12. <img src="static/img/logo_1.png" alt="">
  13. </view>
  14. <view class="login-name">车信达</view>
  15. <view class="login-form">
  16. <view class="login-form-row">
  17. <view class="login-form-title">
  18. <u-icon name="zhanghao" custom-prefix="custom-icon" size="38" color="#1677ff"></u-icon>
  19. </view>
  20. <view class="login-form-input">
  21. <u-input placeholder="请输入手机号" v-model="subFormCode.phone" type="text"></u-input>
  22. </view>
  23. </view>
  24. <view class="login-form-row">
  25. <view class="login-form-title">
  26. <u-icon name="yanzhengma" custom-prefix="custom-icon" size="38" color="#1677ff"></u-icon>
  27. </view>
  28. <view class="login-form-input">
  29. <u-input placeholder="请输入验证码" maxlength="6" v-model="subFormCode.verifyCode" type="number" ></u-input>
  30. </view>
  31. <view class="login-form-code">
  32. <span @click="sendMsg" v-text="isSendMsgIng?(sendMsgSecond+'秒'):'发送验证码'" >发送验证码</span>
  33. </view>
  34. </view>
  35. <view class="login-button">
  36. <u-button type="primary" shape="circle" @click="login" >立即登录</u-button>
  37. </view>
  38. <view class="forget" v-if="false" ><span>忘记密码?</span></view>
  39. <view class="login-foot">
  40. <p>登录即为同意</p><span>《用户协议》</span><span>《隐私政策》</span>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import api from './login.js'
  47. export default api;
  48. </script>
  49. <style scoped lang="scss">
  50. .login{
  51. text-align: center;
  52. }
  53. .login-logo{
  54. width: 200rpx;
  55. height: 200rpx;
  56. border-radius: 20px;
  57. overflow: hidden;
  58. margin: 160rpx auto 0;
  59. img{
  60. width: 100%;
  61. height: 100%;
  62. }
  63. }
  64. .login-name{
  65. font-size:16px;
  66. font-weight: bold;
  67. margin-top: 20rpx;
  68. }
  69. .login-form{
  70. width: 300px;
  71. margin: 30px auto;
  72. }
  73. .login-form-row{
  74. display: flex;
  75. align-items: center;
  76. padding: 20rpx 0;
  77. border-bottom: 1px solid #f7f7f7;
  78. position: relative;
  79. .login-form-title{
  80. margin-right: 20rpx;
  81. }
  82. .login-form-input{
  83. flex: 1;
  84. padding-right: 20rpx;
  85. }
  86. }
  87. .login-button{
  88. margin: 40rpx 0;
  89. }
  90. .navbar-right {
  91. display: flex;
  92. margin-right: 20rpx;
  93. span{
  94. color:rgb(96, 98, 102);
  95. margin-left: 3px;
  96. }
  97. }
  98. .slot-wrap {
  99. display: flex;
  100. align-items: center;
  101. flex: 1;
  102. }
  103. .forget{
  104. text-align: right;
  105. color:#1677ff;
  106. }
  107. .login-form-code{
  108. color:#1677ff;
  109. }
  110. .login-foot{
  111. display: flex;
  112. text-align: center;
  113. position: fixed;
  114. bottom:20rpx;
  115. left:50%;
  116. margin-left:-250rpx;
  117. color:#999;
  118. span{
  119. color:#1677ff
  120. }
  121. }
  122. </style>