login.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <template>
  2. <view class="login">
  3. <view class="logo">
  4. <image src="../../static/images/login/logo.png" style="width: 160upx;height: 160upx;" mode="scaleToFill"></image>
  5. </view>
  6. <view class="login-from">
  7. <view class="input-item">
  8. <label for="">
  9. <image src="../../static/images/login/phone.png" style="width: 30upx;height: 40upx;" mode=""></image>
  10. </label>
  11. <input type="text" placeholder="请输入账号">
  12. </view>
  13. <view class="input-item" style="margin-bottom: 20upx;">
  14. <label for="">
  15. <image src="../../static/images/login/lock.png" style="width: 30upx;height: 40upx;" mode=""></image>
  16. </label>
  17. <input type="text" placeholder="请输入密码">
  18. </view>
  19. <view class="forget">
  20. <navigator url="/pages/user/find-pass" open-type="navigate" style="display: inline;">
  21. <text>忘记密码</text>
  22. </navigator>
  23. </view>
  24. <view class="button-item">
  25. <button class="login-btn">登录</button>
  26. </view>
  27. <view class="button-item">
  28. <navigator url="/pages/register/step1" open-type="navigate">
  29. <button class="reg-btn">注册</button>
  30. </navigator>
  31. </view>
  32. <view class="use-phone">
  33. <navigator url="/pages/user/vcode-login" open-type="navigate" style="display: inline;">
  34. <text>使用手机验证码登入</text>
  35. </navigator>
  36. </view>
  37. </view>
  38. <view class="third-party">
  39. <view class="title"><text>第三方登录</text></view>
  40. <view class="content">
  41. <image src="../../static/images/login/wx.png" style="width: 90upx;height: 90upx;" mode="scaleToFill"></image>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. export default {
  48. data() {
  49. return {
  50. }
  51. },
  52. methods: {
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .login {
  58. background: $primary-color;
  59. height: 100vh;
  60. width: 750rpx;
  61. /* #ifdef APP-PLUS */
  62. padding-bottom: 60upx;
  63. /* #endif */
  64. }
  65. .logo {
  66. width: 160upx;
  67. height: 160upx;
  68. background: white;
  69. border-radius: 160upx;
  70. border: 10upx solid $primary-color;
  71. margin: auto;
  72. margin-top: -60upx;
  73. position: relative;
  74. top: 80upx;
  75. z-index: 999;
  76. }
  77. .login-from {
  78. margin: auto;
  79. width: 600upx;
  80. height: 740upx;
  81. background-color: white;
  82. border-radius: 20rpx;
  83. padding: 72upx;
  84. padding-top: 180upx;
  85. box-sizing: border-box;
  86. position: relative;
  87. z-index: 2;
  88. &::after {
  89. content: "";
  90. background: url(../../static/images/login/box-bottom.png) no-repeat;
  91. background-size: contain;
  92. width: 564upx;
  93. height: 30upx;
  94. display: block;
  95. position: absolute;
  96. bottom: -30upx;
  97. left: 18upx;
  98. z-index: -1;
  99. }
  100. }
  101. .input-item {
  102. display: flex;
  103. margin-bottom: 48upx;
  104. label {
  105. width: 50upx;
  106. }
  107. input {
  108. border-bottom: 2upx solid $primary-color;
  109. flex-grow: 1;
  110. padding: 5upx;
  111. font-size: 30upx;
  112. }
  113. }
  114. .forget {
  115. text-align: right;
  116. color: $primary-color;
  117. font-size: 28upx;
  118. }
  119. .login-btn,
  120. .reg-btn {
  121. height: 80upx;
  122. border: 2upx solid $primary-color;
  123. line-height: 80upx;
  124. margin: 30upx 0;
  125. font-size: 32upx;
  126. &::after {
  127. border: none;
  128. }
  129. }
  130. .login-btn {
  131. background: $primary-color;
  132. color: white;
  133. }
  134. .reg-btn {
  135. background-color: white;
  136. color: $primary-color;
  137. }
  138. .use-phone {
  139. font-size: 28upx;
  140. text-align: center;
  141. color: $primary-color;
  142. }
  143. .third-party {
  144. margin: auto;
  145. text-align: center;
  146. margin-top: 100upx;
  147. .title {
  148. font-size: 28upx;
  149. color: white;
  150. &::before,
  151. &::after {
  152. display: inline-block;
  153. width: 100upx;
  154. height: 0upx;
  155. border: 1upx solid #ff8ca8;
  156. transform: scaleY(0.5);
  157. content: "";
  158. margin: 8upx 20upx;
  159. }
  160. }
  161. .content {
  162. margin-top: 50upx;
  163. }
  164. }
  165. </style>