From da6323bcc11cbdf766a3da7db07124fda9d1cc53 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 20 三月 2025 09:42:05 +0800
Subject: [PATCH] 电缆配置样式修改
---
src/views/login.vue | 34 ++++++++++++++++++++--------------
1 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/src/views/login.vue b/src/views/login.vue
index c934170..06d84b9 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -18,15 +18,15 @@
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
- <el-form-item prop="code" v-if="captchaEnabled">
- <el-input v-model="loginForm.code" auto-complete="off" placeholder="楠岃瘉鐮�" style="width: 63%"
- @keyup.enter.native="handleLogin">
- <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
- </el-input>
- <div class="login-code">
- <img :src="codeUrl" @click="getCode" class="login-code-img" />
- </div>
- </el-form-item>
+<!-- <el-form-item prop="code" v-if="captchaEnabled">-->
+<!-- <el-input v-model="loginForm.code" auto-complete="off" placeholder="楠岃瘉鐮�" style="width: 63%"-->
+<!-- @keyup.enter.native="handleLogin">-->
+<!-- <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />-->
+<!-- </el-input>-->
+<!-- <div class="login-code">-->
+<!-- <img :src="codeUrl" @click="getCode" class="login-code-img" />-->
+<!-- </div>-->
+<!-- </el-form-item>-->
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">璁颁綇瀵嗙爜</el-checkbox>
<el-form-item style="width:100%;">
<el-button :loading="loading" size="medium" type="primary" style="width:100%;"
@@ -38,6 +38,7 @@
<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>
<!-- 搴曢儴 -->
@@ -48,7 +49,7 @@
</template>
<script>
-import { getCodeImg } from "@/api/login";
+import { getCodeImg, getSsoAuthUrl } from "@/api/login";
import Cookies from "js-cookie";
import { encrypt, decrypt } from '@/utils/jsencrypt'
@@ -58,8 +59,8 @@
return {
codeUrl: "",
loginForm: {
- username: "admin",
- password: "admin123",
+ username: "ZT-",
+ password: "",
rememberMe: false,
code: "",
uuid: ""
@@ -90,10 +91,15 @@
}
},
created() {
- this.getCode();
+ // this.getCode();
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;
@@ -127,7 +133,7 @@
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) {
--
Gitblit v1.9.3