Auth.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <div class="login">
  3. <div class="login-logo">
  4. <img class="logo-img" src="/logo.png" alt="logo" />
  5. <div class="logo-title">{{ platform_name }}</div>
  6. </div>
  7. <div class="login-section">
  8. <div class="intro">
  9. <div class="intro-title">{{ platform_name }}</div>
  10. <div class="intro-title">{{ platform_introduce }}</div>
  11. <img src="../assets/image/login/login_group.png" alt="" />
  12. </div>
  13. <div class="login-form">
  14. <FormItem />
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <script setup>
  20. import { ref, onMounted } from 'vue';
  21. import FormItem from '../modules/auth/FormItem.vue';
  22. import { getSystemInfo } from '../apis/login';
  23. import { usePlatformInformation } from '../base/store/use-platform-information';
  24. const platformInformation = usePlatformInformation();
  25. const platform_name = ref(platformInformation.platform_name);
  26. const platform_introduce = ref(platformInformation.platform_introduce);
  27. const getSystemInfoFun = async () => {
  28. try {
  29. const res = await getSystemInfo();
  30. console.log(res);
  31. if (res.code / 1 === 200) {
  32. platformInformation.updatePlatformInformation(res.data.title, res.data.desc);
  33. }
  34. } catch (e) {
  35. console.log(e);
  36. }
  37. };
  38. onMounted(() => {
  39. // TODO: 获取系统名称和系统描述
  40. getSystemInfoFun();
  41. });
  42. </script>
  43. <style scoped lang="css">
  44. .login {
  45. width: 100vw;
  46. height: 100vh;
  47. background: url('../assets/image/login/bg.png') no-repeat;
  48. background-size: cover;
  49. }
  50. .login-logo {
  51. display: flex;
  52. flex-direction: row;
  53. align-items: center;
  54. padding: 30px;
  55. }
  56. .logo-img {
  57. width: 50px;
  58. }
  59. .logo-title {
  60. margin-left: 20px;
  61. font-size: 24px;
  62. font-weight: 600;
  63. color: var(--color-text-1);
  64. }
  65. .login-section {
  66. display: flex;
  67. flex-direction: row;
  68. align-items: center;
  69. justify-content: center;
  70. gap: 100px;
  71. height: calc(100% - 115px);
  72. }
  73. .intro {
  74. display: flex;
  75. flex-direction: column;
  76. align-items: center;
  77. justify-content: center;
  78. color: var(--color-text-1);
  79. }
  80. .intro-title {
  81. font-size: 38px;
  82. font-weight: 600;
  83. }
  84. .login-form {
  85. position: relative;
  86. display: flex;
  87. flex-direction: column;
  88. align-items: center;
  89. justify-content: center;
  90. gap: 20px;
  91. width: 500px;
  92. height: 512px;
  93. background-color: var(--color-bg-1);
  94. border-radius: 10px;
  95. box-shadow: 0 0 1px var(--color-border-4);
  96. }
  97. </style>