LoginView.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <div class="login">
  3. <div class="top">
  4. <img src="../assets/bargound/denglutitle.png" alt="" />
  5. </div>
  6. <div class="kaung">
  7. <p class="text"><span>欢迎登录使用</span></p>
  8. <div class="inkuang">
  9. <el-input
  10. class="userPsd"
  11. placeholder="请输入用户名"
  12. v-model="inputUserName"
  13. >
  14. <i slot="prefix" class="el-input__icon el-icon-user"></i
  15. ></el-input>
  16. <el-input
  17. class="userPsd"
  18. placeholder="请输入密码"
  19. v-model="inputPasd"
  20. show-password
  21. >
  22. <i slot="prefix" class="el-input__icon el-icon-lock"></i
  23. ></el-input>
  24. <span class="login" @click="landing">立即登录</span>
  25. </div>
  26. <div></div>
  27. </div>
  28. <div style="color: #3C91AF;margin-top: 30px;font-size: 12px;">Copyright©2016-2022 ************ 版权所有 技术支持:*********</div>
  29. </div>
  30. </template>
  31. <script>
  32. import axios from "axios";
  33. export default {
  34. data() {
  35. return {
  36. inputUserName: "",
  37. inputPasd: "",
  38. // loginRules: {
  39. // inputUserName: [
  40. // { required: true, trigger: "blur", message: "请输入用户名!" },
  41. // ],
  42. // inputPasd: [
  43. // { required: true, trigger: "blur", message: "请输入密码!" },
  44. // ],
  45. // },
  46. };
  47. },
  48. methods: {
  49. //点击登录
  50. landing() {
  51. if(this.inputUserName==='root'&&this.inputPasd==='root'){
  52. this.$router.push("/");
  53. }
  54. },
  55. },
  56. };
  57. </script>
  58. <style scoped lang="scss">
  59. .el-icon-search {
  60. color: red;
  61. }
  62. .login {
  63. width: 100%;
  64. height: 100vh;
  65. display: flex;
  66. flex-direction: column;
  67. align-items: center;
  68. background-image: url(../assets/bargound/denglubeijingtu.png);
  69. background-repeat: no-repeat;
  70. background-size: 100% 100%;
  71. .top {
  72. img {
  73. width: 100%;
  74. }
  75. }
  76. .logininfor {
  77. width: 33%;
  78. height: 33vh;
  79. margin: 0 auto;
  80. }
  81. }
  82. .kaung {
  83. background: url("../views/login/组\ 20\ 拷贝@2x.png") no-repeat;
  84. width: 462px;
  85. height: 372px;
  86. background-size: 100% 100%;
  87. overflow: hidden;
  88. margin-top: 50px;
  89. .text {
  90. width: 360px;
  91. height: 10px;
  92. background: url("../views/login/组\ 19\ 拷贝@2x.png") no-repeat;
  93. background-size: 100% 100%;
  94. margin-top: 80px;
  95. margin-left: 50px;
  96. position: relative;
  97. span {
  98. display: block;
  99. color: #ffffff;
  100. font-size: 20px;
  101. position: absolute;
  102. left: 34%;
  103. top: -8px;
  104. }
  105. }
  106. .inkuang {
  107. display: flex;
  108. flex-direction: column;
  109. width: 240px;
  110. margin: 0 auto;
  111. margin-top: 40px;
  112. .login {
  113. background: url("../views/login/组\ 17\ 拷贝.png") no-repeat;
  114. background-size: 100% 100%;
  115. width: 100%;
  116. height: 60px;
  117. margin-top: 20px;
  118. text-align: center;
  119. padding: 20px 0 0 0;
  120. font-size: 12px;
  121. color: black;
  122. cursor: pointer;
  123. }
  124. .userPsd {
  125. margin-top: 10px;
  126. }
  127. }
  128. }
  129. </style>