login.vue 3.0 KB

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