+
@@ -20,7 +20,6 @@
diff --git a/snowy-admin-web/src/views/auth/login/login.less b/snowy-admin-web/src/views/auth/login/login.less
new file mode 100644
index 00000000..e2e3cf84
--- /dev/null
+++ b/snowy-admin-web/src/views/auth/login/login.less
@@ -0,0 +1,152 @@
+.login-icon-gray {
+ color: rgba(0, 0, 0, 0.25);
+}
+.login-validCode-img {
+ border: 1px solid var(--border-color-split);
+ cursor: pointer;
+ width: 100%;
+ height: 40px;
+}
+.login_background {
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ background-size: cover;
+ background-position: center;
+ background-image: url(/img/login_background.png);
+}
+.login_background_front {
+ width: 450px;
+ height: 450px;
+ margin-left: 100px;
+ margin-top: 15%;
+ overflow: hidden;
+ /*position: relative;*/
+ background-size: cover;
+ background-position: center;
+ background-image: url(/img/login_background_front.png);
+ animation-name: myfirst;
+ animation-duration: 5s;
+ animation-timing-function: linear;
+ animation-delay: 1s;
+ animation-iteration-count: infinite;
+ animation-direction: alternate;
+ animation-play-state: running;
+}
+@keyframes myfirst {
+ 0% {
+ left: 0px;
+ top: 0px;
+ }
+ 50% {
+ left: 50px;
+ top: 0px;
+ }
+ 100% {
+ left: 0px;
+ top: 0px;
+ }
+}
+@-webkit-keyframes myfirst /* Safari and Chrome */ {
+ 0% {
+ left: 0px;
+ top: 0px;
+ }
+ 50% {
+ left: 50px;
+ top: 0px;
+ }
+ 100% {
+ left: 0px;
+ top: 0px;
+ }
+}
+.login_adv__title h2 {
+ font-size: 40px;
+}
+.login_adv__title h4 {
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: normal;
+}
+.login_adv__title p {
+ font-size: 14px;
+ margin-top: 10px;
+ line-height: 1.8;
+ color: rgba(255, 255, 255, 0.6);
+}
+.login_adv__title div {
+ margin-top: 10px;
+ display: flex;
+ align-items: center;
+}
+.login_adv__title div span {
+ margin-right: 15px;
+}
+.login_adv__title div i {
+ font-size: 40px;
+}
+.login_adv__title div i.add {
+ font-size: 20px;
+ color: rgba(255, 255, 255, 0.6);
+}
+/*background-image:linear-gradient(transparent, #000);*/
+.login_main {
+ flex: 1;
+ overflow: auto;
+ display: flex;
+}
+.login-form {
+ top: 15%;
+ right: 15%;
+ position: absolute;
+ width: 450px;
+ margin-left: 10%;
+ margin-top: 20px;
+ padding: 10px 0;
+}
+.login-header {
+ margin-bottom: 20px;
+}
+.login-header .logo {
+ display: flex;
+ align-items: center;
+}
+.login-header .logo img {
+ width: 35px;
+ height: 35px;
+ vertical-align: bottom;
+ margin-right: 10px;
+}
+.login-header .logo label {
+ font-size: 24px;
+}
+.login-header h2 {
+ font-size: 24px;
+ font-weight: bold;
+ margin-top: 40px;
+}
+.login_config {
+ position: absolute;
+ top: 20px;
+ right: 20px;
+}
+@media (max-width: 1200px) {
+ .login-form {
+ width: 340px;
+ }
+}
+@media (max-width: 1000px) {
+ .login_main {
+ display: block;
+ }
+ .login_background_front {
+ display: none;
+ }
+ .login-form {
+ width: 100%;
+ padding: 20px 40px;
+ right: 0 !important;
+ top: 0 !important;
+ }
+}
diff --git a/snowy-admin-web/src/views/auth/login/login.vue b/snowy-admin-web/src/views/auth/login/login.vue
index 524e0bcd..44b784da 100644
--- a/snowy-admin-web/src/views/auth/login/login.vue
+++ b/snowy-admin-web/src/views/auth/login/login.vue
@@ -33,9 +33,14 @@
-
+
-
+
@@ -45,13 +50,14 @@
:placeholder="$t('login.PWPlaceholder')"
size="large"
autocomplete="off"
+ @keyup.enter="login"
>
-
+
-
+
-
+
-
+
@@ -78,7 +80,7 @@
{{ $t('login.forgetPassword') }}?
- {{ $t('login.signIn') }}
@@ -97,17 +99,19 @@
-
diff --git a/snowy-admin-web/src/views/auth/login/phoneLoginForm.vue b/snowy-admin-web/src/views/auth/login/phoneLoginForm.vue
index cd484c36..0e204ccc 100644
--- a/snowy-admin-web/src/views/auth/login/phoneLoginForm.vue
+++ b/snowy-admin-web/src/views/auth/login/phoneLoginForm.vue
@@ -3,7 +3,7 @@
-
+
@@ -16,21 +16,21 @@
size="large"
>
-
+
- {{
- (!state.smsSendBtn && $t('login.getSmsCode')) || state.time + ' s'
- }}
+
+ {{ (!state.smsSendBtn && $t('login.getSmsCode')) || state.time + ' s' }}
+
- {{
- $t('login.signIn')
- }}
+
+ {{ $t('login.signIn') }}
+
-
+
@@ -69,16 +69,13 @@
-
+
diff --git a/snowy-admin-web/src/views/auth/login/util.js b/snowy-admin-web/src/views/auth/login/util.js
new file mode 100644
index 00000000..672c4c6b
--- /dev/null
+++ b/snowy-admin-web/src/views/auth/login/util.js
@@ -0,0 +1,28 @@
+import loginApi from '@/api/auth/loginApi'
+import userCenterApi from '@/api/sys/userCenterApi'
+import dictApi from '@/api/dev/dictApi'
+import router from '@/router'
+import tool from '@/utils/tool'
+import { message } from 'ant-design-vue'
+
+export const afterLogin = async (loginToken) => {
+ tool.data.set('TOKEN', loginToken)
+ // 获取登录的用户信息
+ const loginUser = await loginApi.getLoginUser()
+ tool.data.set('USER_INFO', loginUser)
+
+ // 获取用户的菜单
+ const menu = await userCenterApi.userLoginMenu()
+ const indexMenu = menu[0].children[0].path
+ tool.data.set('MENU', menu)
+ // 重置系统默认应用
+ tool.data.set('SNOWY_MENU_MODULE_ID', menu[0].id)
+ message.success('登录成功')
+ router.replace({
+ path: indexMenu
+ })
+ dictApi.dictTree().then((data) => {
+ // 设置字典到store中
+ tool.data.set('DICT_TYPE_TREE_DATA', data)
+ })
+}
diff --git a/snowy-admin-web/src/views/dev/config/otherConfig/index.vue b/snowy-admin-web/src/views/dev/config/otherConfig/index.vue
index b7d7a5d7..920300a7 100644
--- a/snowy-admin-web/src/views/dev/config/otherConfig/index.vue
+++ b/snowy-admin-web/src/views/dev/config/otherConfig/index.vue
@@ -41,7 +41,6 @@