| | |
| | | <router-link class="link-type" :to="'/register'">立即注册</router-link> |
| | | </div> |
| | | </el-form-item> |
| | | <el-button v-if="true" type="primary" plain @click="goLogin">集团集成登录</el-button> |
| | | </el-form> |
| | | </div> |
| | | <!-- 底部 --> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getCodeImg } from "@/api/login"; |
| | | import { getCodeImg, getSsoAuthUrl } from "@/api/login"; |
| | | import Cookies from "js-cookie"; |
| | | import { encrypt, decrypt } from '@/utils/jsencrypt' |
| | | |
| | |
| | | return { |
| | | codeUrl: "", |
| | | loginForm: { |
| | | username: "admin", |
| | | password: "admin123", |
| | | username: "ZT-", |
| | | password: "", |
| | | rememberMe: false, |
| | | code: "", |
| | | uuid: "" |
| | |
| | | this.getCookie(); |
| | | }, |
| | | methods: { |
| | | async goLogin() { |
| | | await getSsoAuthUrl().then(res => { |
| | | window.location.href = res.data |
| | | }) |
| | | }, |
| | | getCode() { |
| | | getCodeImg().then(res => { |
| | | this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled; |
| | |
| | | Cookies.remove('rememberMe'); |
| | | } |
| | | this.$store.dispatch("Login", this.loginForm).then(() => { |
| | | this.$router.push({ path: this.redirect || "/" }).catch(() => { }); |
| | | this.$router.push({ path: "/" }).catch(() => { }); |
| | | }).catch(() => { |
| | | this.loading = false; |
| | | if (this.captchaEnabled) { |
| | |
| | | </script> |
| | | |
| | | <style rel="stylesheet/scss" lang="scss"> |
| | | //.login { |
| | | // display: flex; |
| | | // justify-content: center; |
| | | // align-items: center; |
| | | // height: 100%; |
| | | // background-image: url("../assets/images/login-background.jpg"); |
| | | // background-size: cover; |
| | | //} |
| | | .login { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; |
| | | background-image: url("../assets/images/login-background.jpg"); |
| | | background-size: cover; |
| | | } |
| | | .login { |
| | | width: 100vw; |
| | | height: 100vh; |