|
@@ -25,21 +25,21 @@
|
|
|
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="code" v-if="captchaEnabled">
|
|
|
- <el-input
|
|
|
- v-model="loginForm.code"
|
|
|
- size="large"
|
|
|
- auto-complete="off"
|
|
|
- placeholder="验证码"
|
|
|
- style="width: 63%"
|
|
|
- @keyup.enter="handleLogin"
|
|
|
- >
|
|
|
- <template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template>
|
|
|
- </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"-->
|
|
|
+<!-- size="large"-->
|
|
|
+<!-- auto-complete="off"-->
|
|
|
+<!-- placeholder="验证码"-->
|
|
|
+<!-- style="width: 63%"-->
|
|
|
+<!-- @keyup.enter="handleLogin"-->
|
|
|
+<!-- >-->
|
|
|
+<!-- <template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template>-->
|
|
|
+<!-- </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
|
|
@@ -65,7 +65,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { getCodeImg } from "@/api/login";
|
|
|
+// import { getCodeImg } from "@/api/login";
|
|
|
import Cookies from "js-cookie";
|
|
|
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
|
|
import useUserStore from '@/store/modules/user'
|
|
@@ -85,7 +85,7 @@ const loginForm = ref({
|
|
|
const loginRules = {
|
|
|
username: [{ required: true, trigger: "blur", message: "请输入您的账号" }],
|
|
|
password: [{ required: true, trigger: "blur", message: "请输入您的密码" }],
|
|
|
- code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
|
|
+ // code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
|
|
};
|
|
|
|
|
|
const codeUrl = ref("");
|
|
@@ -117,22 +117,22 @@ function handleLogin() {
|
|
|
}).catch(() => {
|
|
|
loading.value = false;
|
|
|
// 重新获取验证码
|
|
|
- if (captchaEnabled.value) {
|
|
|
- getCode();
|
|
|
- }
|
|
|
+ // if (captchaEnabled.value) {
|
|
|
+ // getCode();
|
|
|
+ // }
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function getCode() {
|
|
|
- getCodeImg().then(res => {
|
|
|
- captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
|
|
- if (captchaEnabled.value) {
|
|
|
- codeUrl.value = "data:image/gif;base64," + res.img;
|
|
|
- loginForm.value.uuid = res.uuid;
|
|
|
- }
|
|
|
- });
|
|
|
+ // getCodeImg().then(res => {
|
|
|
+ // captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
|
|
+ // if (captchaEnabled.value) {
|
|
|
+ // codeUrl.value = "data:image/gif;base64," + res.img;
|
|
|
+ // loginForm.value.uuid = res.uuid;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
}
|
|
|
|
|
|
function getCookie() {
|