index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <div class="simple-login">
  3. <van-overlay :show="show" @click="show = false">
  4. <div class="wrapper flex justify-center items-center" @click.stop>
  5. <div class="block flex items-center flex-col py-6">
  6. <div class="close" @click="onClose"></div>
  7. <div class="title pb-6">登录</div>
  8. <div class="forlogoutm">
  9. <div class="form-item mb-4">
  10. <input type="text" placeholder="手机号" />
  11. </div>
  12. <div class="form-item mb-4 code">
  13. <input type="text" placeholder="验证码" class="code" />
  14. <span class="send">获取验证码</span>
  15. </div>
  16. <div class="submit" @click="onSubmit">登录</div>
  17. </div>
  18. </div>
  19. </div>
  20. </van-overlay>
  21. </div>
  22. </template>
  23. <script>
  24. export default {
  25. name: 'simple-login',
  26. data() {
  27. return {
  28. show: false,
  29. }
  30. },
  31. methods: {
  32. onSubmit() {},
  33. onClose() {
  34. this.show = false
  35. },
  36. },
  37. }
  38. </script>
  39. <style scoped lang="scss">
  40. @media screen and (min-width: 768px) {
  41. .wrapper {
  42. height: 100vh;
  43. .block {
  44. position: relative;
  45. width: 400px;
  46. background: #fff;
  47. .close {
  48. position: absolute;
  49. right: 16px;
  50. top: 16px;
  51. width: 24px;
  52. height: 24px;
  53. background: url(https://static.caimei365.com/www/authentic/h5/icon-close.png)
  54. center no-repeat;
  55. background-size: 24px 24px;
  56. cursor: pointer;
  57. }
  58. .title {
  59. font-size: 24px;
  60. color: #101010;
  61. }
  62. .form-item {
  63. position: relative;
  64. width: 326px;
  65. input {
  66. width: 326px;
  67. display: block;
  68. padding: 14px 16px;
  69. font-size: 14px;
  70. border: 1px solid #d8d8d8;
  71. box-sizing: border-box;
  72. &.code {
  73. width: 225px;
  74. }
  75. }
  76. .send {
  77. position: absolute;
  78. right: 0;
  79. top: 50%;
  80. transform: translateY(-50%);
  81. font-size: 16px;
  82. color: #bc1724;
  83. cursor: pointer;
  84. }
  85. }
  86. .submit {
  87. width: 326px;
  88. height: 46px;
  89. background: #bc1724;
  90. font-size: 16px;
  91. color: #fff;
  92. text-align: center;
  93. line-height: 46px;
  94. transition: all 0.4s;
  95. cursor: pointer;
  96. &:hover {
  97. background-color: #960915;
  98. }
  99. }
  100. }
  101. }
  102. }
  103. @media screen and (max-width: 768px) {
  104. .wrapper {
  105. height: 100vh;
  106. .block {
  107. position: relative;
  108. width: 76vw;
  109. background: #fff;
  110. .close {
  111. position: absolute;
  112. right: 2.4vw;
  113. top: 2.4vw;
  114. width: 5.6vw;
  115. height: 5.6vw;
  116. background: url(https://static.caimei365.com/www/authentic/h5/icon-close.png)
  117. center no-repeat;
  118. background-size: 4.8vw 4.8vw;
  119. cursor: pointer;
  120. }
  121. .title {
  122. font-size: 4.8vw;
  123. color: #101010;
  124. }
  125. .form-item {
  126. position: relative;
  127. width: 62vw;
  128. input {
  129. width: 62vw;
  130. display: block;
  131. padding: 1.8vw 2.4vw;
  132. font-size: 14px;
  133. border: 0.1vw solid #d8d8d8;
  134. box-sizing: border-box;
  135. &.code {
  136. width: 42.8vw;
  137. }
  138. }
  139. .send {
  140. position: absolute;
  141. right: 0;
  142. top: 50%;
  143. transform: translateY(-50%);
  144. font-size: 3.2vw;
  145. color: #bc1724;
  146. cursor: pointer;
  147. }
  148. }
  149. .submit {
  150. width: 62vw;
  151. height: 8.8vw;
  152. background: #bc1724;
  153. font-size: 3.2vw;
  154. color: #fff;
  155. text-align: center;
  156. line-height: 8.8vw;
  157. transition: all 0.4s;
  158. &:hover {
  159. background-color: #b60c1a;
  160. }
  161. }
  162. }
  163. }
  164. }
  165. </style>