index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <div class="rpm-login other-container" style="margin-top: 178px;">
  3. <IHeader/>
  4. <div class="rpm-contact" >
  5. <div class="rpm-contact__title">三明市住建系统内业综合平台</div>
  6. <div class="rpm-contact__item">
  7. <el-avatar shape="square" size="small" icon="el-icon-message" />
  8. 595705120@qq.com
  9. </div>
  10. </div>
  11. <SignInForm v-if="visibleForm === 'signIn'" @show-form="showForm" />
  12. <SignUpForm v-if="visibleForm === 'signUp'" @show-form="showForm" />
  13. <ForgotPwdForm v-if="visibleForm === 'forgotPwd'" @show-form="showForm" />
  14. <ResetPwdForm v-if="visibleForm === 'resetPwd'" @show-form="showForm" />
  15. </div>
  16. </template>
  17. <script>
  18. //import logo from '@/icons/img/logo.png'
  19. import logo from '@/icons/img/logo.jpg'
  20. import SignInForm from './components/SignInForm'
  21. import SignUpForm from './components/SignUpForm'
  22. import ForgotPwdForm from './components/ForgotPwdForm'
  23. import ResetPwdForm from './components/ResetPwdForm'
  24. import IHeader from "../other/components/IHeader";
  25. import IFooter from "../other/components/IFooter";
  26. export default {
  27. name: 'Login',
  28. components: { SignInForm, SignUpForm, ForgotPwdForm, ResetPwdForm,IHeader, IFooter},
  29. data() {
  30. return {
  31. url: logo,
  32. visibleForm: 'signIn'
  33. }
  34. },
  35. watch: {
  36. $route: {
  37. handler: function(route) {
  38. console.log("route", route)
  39. const query = route.query
  40. if (query) {
  41. this.redirect = query.redirect
  42. this.otherQuery = this.getOtherQuery(query)
  43. }
  44. },
  45. immediate: true
  46. }
  47. },
  48. methods: {
  49. showForm(form) {
  50. //console.log('form', form)
  51. this.visibleForm = form;
  52. },
  53. getOtherQuery(query) {
  54. return Object.keys(query).reduce((acc, cur) => {
  55. if (cur !== 'redirect') {
  56. acc[cur] = query[cur]
  57. }
  58. return acc
  59. }, {})
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. @import "@/styles/variables.scss";
  66. .rpm-login {
  67. position: relative;
  68. margin-left: auto;
  69. margin-right: auto;
  70. width: 900px;
  71. .rpm-logo {
  72. padding-top: 30px;
  73. height: 40px;
  74. text-align: center;
  75. .el-image, .el-avatar {
  76. margin-right: 20px;
  77. background-color: $rpm-theme-color;
  78. }
  79. .rpm-logo__title {
  80. line-height: 40px;
  81. display: inline-block;
  82. font-size: 30px;
  83. font-weight: bold;
  84. color: $rpm-theme-color;
  85. overflow: hidden;
  86. }
  87. }
  88. .rpm-contact {
  89. position: absolute;
  90. top: 250px;
  91. left: 100px;
  92. .rpm-contact__title {
  93. margin-left: 0px;
  94. margin-bottom: 40px;
  95. font-size: 24px;
  96. font-weight: bold;
  97. }
  98. .rpm-contact__item {
  99. position: relative;
  100. margin-top: 10px;
  101. padding-left: 36px;
  102. height: 40px;
  103. line-height: 40px;
  104. font-size: 16px;
  105. .el-avatar {
  106. position: absolute;
  107. top: 50%;
  108. left: 0;
  109. transform: translateY(-50%);
  110. background-color: $rpm-theme-color;
  111. color: white;
  112. }
  113. }
  114. }
  115. }
  116. </style>