123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- <template>
- <div class="login-container">
- <div class="login-bg"></div>
- <span class="-enter-x xl:hidden">
- <AppLogo :alwaysShowTitle="true" />
- </span>
- <div class="top-header">
- <div class="top-bg"></div>
- <div class="login-icon"></div>
- <div class="title">{{ title }}</div>
- </div>
- <div class="flex center">
- <LoginForm />
- </div>
- <div class="bottom"> </div>
- </div>
- </template>
- <script lang="ts" setup>
- import { computed } from 'vue';
- import { AppLogo } from '/@/components/Application';
- import LoginForm from './LoginForm.vue';
- import { useGlobSetting } from '/@/hooks/setting';
- import { useI18n } from '/@/hooks/web/useI18n';
- import { useDesign } from '/@/hooks/web/useDesign';
- import { useLocaleStore } from '/@/store/modules/locale';
- import { useLoginState } from './useLogin';
- defineProps({
- sessionTimeout: {
- type: Boolean,
- },
- });
- const globSetting = useGlobSetting();
- const { prefixCls } = useDesign('login');
- const { t } = useI18n();
- const localeStore = useLocaleStore();
- const showLocale = localeStore.getShowPicker;
- const title = computed(() => globSetting?.title ?? '');
- const { handleBackLogin } = useLoginState();
- handleBackLogin();
- </script>
- <style lang="less">
- @prefix-cls: ~'@{namespace}-login';
- @logo-prefix-cls: ~'@{namespace}-app-logo';
- @countdown-prefix-cls: ~'@{namespace}-countdown-input';
- @dark-bg: #293146;
- html[data-theme='dark'] {
- .@{prefix-cls} {
- background-color: @dark-bg;
- &::before {
- background-image: url(/@/assets/svg/login-bg-dark.svg);
- }
- .ant-input,
- .ant-input-password {
- background-color: #232a3b;
- }
- .ant-btn:not(.ant-btn-link):not(.ant-btn-primary) {
- border: 1px solid #4a5569;
- }
- &-form {
- background: transparent !important;
- }
- .app-iconify {
- color: #fff;
- }
- }
- input.fix-auto-fill,
- .fix-auto-fill input {
- -webkit-text-fill-color: #c9d1d9 !important;
- box-shadow: inherit !important;
- }
- }
- .login-container {
- width: 100vw;
- height: 100vh;
- background: linear-gradient(to bottom, #000c37, #001e63);
- padding: 0 !important;
- position: relative;
- &::before {
- content: '';
- position: absolute;
- width: 100%;
- height: 100%;
- top: 0px;
- left: 0;
- background-image: url('/@/assets/images/vent/login/bg.png');
- background-size: cover;
- }
- .login-bg {
- position: absolute;
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- background: linear-gradient(to bottom, #000c3766, #001e6366);
- }
- .top-header {
- width: 100%;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- position: relative;
- // padding-top: 70px;
- .top-bg {
- width: 100%;
- height: 129px;
- background-image: url('/@/assets/images/vent/login/top.png');
- background-size: 100% auto;
- }
- .login-icon {
- position: relative;
- width: 237px;
- height: 274px;
- top: 10px;
- background-image: url('/@/assets/images/vent/login/icon.png');
- }
- .title {
- position: absolute;
- top: 78px;
- color: rgb(224, 224, 224);
- font-size: 30px;
- text-align: center;
- text-shadow: 1px 1px 1px #fff, -1px -1px 1px #000;
- }
- }
- .bottom {
- width: 100%;
- height: 118px;
- position: fixed;
- bottom: 0;
- left: 0;
- background-image: url('/@/assets/images/vent/login/down.png');
- background-size: 100% auto;
- }
- .center {
- width: 100%;
- height: calc(100vh - 520px);
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- }
- .@{prefix-cls} {
- min-height: 100%;
- overflow: hidden;
- @media (max-width: @screen-xl) {
- background-color: #293146;
- .@{prefix-cls}-form {
- background-color: #fff;
- }
- }
- &::before {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- margin-left: -48%;
- // background-image: url(/@/assets/svg/login-bg.svg);
- background-position: 100%;
- background-repeat: no-repeat;
- background-size: auto 100%;
- content: '';
- @media (max-width: @screen-xl) {
- display: none;
- }
- }
- .@{logo-prefix-cls} {
- position: absolute;
- top: 12px;
- height: 30px;
- &__title {
- font-size: 16px;
- color: #fff;
- }
- img {
- width: 32px;
- }
- }
- .container {
- .@{logo-prefix-cls} {
- display: flex;
- width: 60%;
- height: 80px;
- &__title {
- font-size: 24px;
- color: #fff;
- }
- img {
- width: 48px;
- }
- }
- }
- &-sign-in-way {
- .anticon {
- font-size: 22px;
- color: #888;
- cursor: pointer;
- &:hover {
- color: @primary-color;
- }
- }
- }
- input:not([type='checkbox']) {
- min-width: 360px;
- @media (max-width: @screen-xl) {
- min-width: 320px;
- }
- @media (max-width: @screen-lg) {
- min-width: 260px;
- }
- @media (max-width: @screen-md) {
- min-width: 240px;
- }
- @media (max-width: @screen-sm) {
- min-width: 160px;
- }
- }
- .@{countdown-prefix-cls} input {
- min-width: unset;
- }
- .ant-divider-inner-text {
- font-size: 12px;
- color: @text-color-secondary;
- }
- }
- </style>
|