login.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="df jcc aic myComRoot">
  3. <view class="df aic login-center">
  4. <view>
  5. <view class="login-lefttitle1">虚拟仿真实验网站首页</view>
  6. <view class="login-lefttitle2">记录产品分享设计</view>
  7. <view class="login-leftpic">
  8. <img src="../../assets/login/loginPic1.png" />
  9. </view>
  10. </view>
  11. <!-- 中间竖线 -->
  12. <view class="login-middleline"></view>
  13. <ChooseRole v-show="visibleChooseRole" v-on:onChoose="onChoose"></ChooseRole>
  14. <LoginByPWD class="showborder" v-show="visibleLoginByPWD" v-on:onLogin="onLogin" v-on:onForget="onForget"></LoginByPWD>
  15. <ResetPWD v-show="visibleResetPWD" v-on:onLogin="onLogin"></ResetPWD>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import ChooseRole from './chooseRole.vue'
  21. import LoginByPWD from './loginByPWD.vue'
  22. import ResetPWD from './resetPWD.vue'
  23. export default {
  24. components: {
  25. ChooseRole,
  26. LoginByPWD,
  27. ResetPWD
  28. },
  29. data() {
  30. return {
  31. visibleChooseRole: true,
  32. visibleLoginByPWD: false,
  33. visibleResetPWD: false,
  34. //当前登录类型T教师S学生
  35. roleType: '',
  36. }
  37. },
  38. methods: {
  39. onLogin: function() {
  40. console.log("登录成功login");
  41. this.$emit("onLogin");
  42. this.visibleChooseRole = false;
  43. this.visibleLoginByPWD = false;
  44. this.visibleResetPWD = false;
  45. },
  46. onChoose(type) {
  47. console.log("onChoose", type)
  48. this.roleType = type;
  49. this.visibleChooseRole = false;
  50. this.visibleLoginByPWD = true;
  51. },
  52. onForget() {
  53. this.visibleLoginByPWD = false;
  54. this.visibleResetPWD = true;
  55. }
  56. }
  57. }
  58. </script>
  59. <style>
  60. .login-center {
  61. /* width: 1431px;
  62. height: 752px; */
  63. width: 74.5vw;
  64. height: 39.1vw;
  65. background: #FFFFFF;
  66. box-shadow: 0px 3px 7px 0px rgba(0, 0, 0, 0.1);
  67. border-radius: 10px;
  68. /* margin-top: 86px; */
  69. justify-content: space-evenly;
  70. }
  71. .login-lefttitle1 {
  72. /* font-size: 26px; */
  73. font-size: 1.4vw;
  74. font-family: MicrosoftYaHei;
  75. color: #020202;
  76. /* line-height: 35px; */
  77. line-height: 1.8vw;
  78. /* letter-spacing: 2px; */
  79. letter-spacing: 0.02vw;
  80. }
  81. .login-lefttitle2 {
  82. /* font-size: 20px; */
  83. font-size: 1.041vw;
  84. font-family: MicrosoftYaHei;
  85. color: #6C6F6E;
  86. /* line-height: 26px;
  87. letter-spacing: 1px;
  88. margin-top: 16px; */
  89. line-height: 1.4vw;
  90. letter-spacing: 1px;
  91. margin-top: 0.8vw;
  92. }
  93. .login-leftpic {
  94. /* margin-top: 79px;
  95. margin-left: 15px; */
  96. margin-top: 4.114vw;
  97. margin-left: 0.07vw;
  98. }
  99. .login-leftpic img {
  100. width: 17.552vw;
  101. }
  102. .login-middleline {
  103. width: 0.1vw;
  104. height: 29vw;
  105. background-color: #979797;
  106. opacity: 0.2;
  107. }
  108. </style>