login.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. initData() {
  40. this.visibleChooseRole = true;
  41. this.visibleLoginByPWD = false;
  42. this.visibleResetPWD = false;
  43. },
  44. onLogin: function() {
  45. // console.log("登录成功login");
  46. this.$emit("onLogin");
  47. this.visibleChooseRole = false;
  48. this.visibleLoginByPWD = false;
  49. this.visibleResetPWD = false;
  50. },
  51. onChoose(type) {
  52. // console.log("onChoose", type)
  53. this.roleType = type;
  54. this.visibleChooseRole = false;
  55. this.visibleLoginByPWD = true;
  56. mydata_userInfo.role = type;
  57. },
  58. onForget() {
  59. this.visibleLoginByPWD = false;
  60. this.visibleResetPWD = true;
  61. }
  62. }
  63. }
  64. </script>
  65. <style>
  66. .login-center {
  67. /* width: 1431px;
  68. height: 752px; */
  69. width: 74.5vw;
  70. height: 39.1vw;
  71. background: #FFFFFF;
  72. box-shadow: 0px 3px 7px 0px rgba(0, 0, 0, 0.1);
  73. border-radius: 10px;
  74. /* margin-top: 86px; */
  75. justify-content: space-evenly;
  76. }
  77. .login-lefttitle1 {
  78. /* font-size: 26px; */
  79. font-size: 1.4vw;
  80. font-family: MicrosoftYaHei;
  81. color: #020202;
  82. /* line-height: 35px; */
  83. line-height: 1.8vw;
  84. /* letter-spacing: 2px; */
  85. letter-spacing: 0.02vw;
  86. }
  87. .login-lefttitle2 {
  88. /* font-size: 20px; */
  89. font-size: 1.041vw;
  90. font-family: MicrosoftYaHei;
  91. color: #6C6F6E;
  92. /* line-height: 26px;
  93. letter-spacing: 1px;
  94. margin-top: 16px; */
  95. line-height: 1.4vw;
  96. letter-spacing: 1px;
  97. margin-top: 0.8vw;
  98. }
  99. .login-leftpic {
  100. /* margin-top: 79px;
  101. margin-left: 15px; */
  102. margin-top: 4.114vw;
  103. margin-left: 0.07vw;
  104. }
  105. .login-leftpic img {
  106. width: 17.552vw;
  107. }
  108. .login-middleline {
  109. width: 0.1vw;
  110. height: 29vw;
  111. background-color: #979797;
  112. opacity: 0.2;
  113. }
  114. </style>