login.vue 2.8 KB

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