|
@ -67,6 +67,7 @@ |
|
|
import { getCodeImg } from "@/api/login"; |
|
|
import { getCodeImg } from "@/api/login"; |
|
|
import Cookies from "js-cookie"; |
|
|
import Cookies from "js-cookie"; |
|
|
import { encrypt, decrypt } from '@/utils/jsencrypt' |
|
|
import { encrypt, decrypt } from '@/utils/jsencrypt' |
|
|
|
|
|
import { getRouters } from '@/api/menu' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "Login", |
|
|
name: "Login", |
|
@ -180,7 +181,7 @@ export default { |
|
|
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 }); |
|
|
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 }); |
|
|
|
|
|
|
|
|
this.$store.dispatch("Login", this.loginForm).then(() => { |
|
|
this.$store.dispatch("Login", this.loginForm).then(() => { |
|
|
this.$router.push({ path: this.redirect || "/" }).catch(() => { }); |
|
|
this.$router.push({ path: this.redirect}).catch(() => { }); |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
// if (this.captchaEnabled) { |
|
|
// if (this.captchaEnabled) { |
|
|
// this.loading = false; |
|
|
// this.loading = false; |
|
@ -410,4 +411,5 @@ export default { |
|
|
|
|
|
|
|
|
.login-code-img { |
|
|
.login-code-img { |
|
|
height: 38px; |
|
|
height: 38px; |
|
|
}</style> |
|
|
} |
|
|
|
|
|
</style> |
|
|