|
|
@@ -129,6 +129,7 @@
|
|
|
const formRef = ref();
|
|
|
const loading = ref(false);
|
|
|
const rememberMe = ref(false);
|
|
|
+ const isDragValidate = ref(false);
|
|
|
|
|
|
const formData = reactive({
|
|
|
account: 'admin',
|
|
|
@@ -143,11 +144,20 @@
|
|
|
|
|
|
function handleSuccess() {
|
|
|
console.log('11');
|
|
|
+ isDragValidate.value = true;
|
|
|
}
|
|
|
|
|
|
async function handleLogin() {
|
|
|
const data = await validForm();
|
|
|
if (!data) return;
|
|
|
+ if (!isDragValidate.value) {
|
|
|
+ notification.info({
|
|
|
+ message: t('sys.login.loginDragValidate'),
|
|
|
+ description: `${t('sys.login.loginAgain')}`,
|
|
|
+ duration: 3,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
try {
|
|
|
loading.value = true;
|
|
|
const userInfo = await userStore.login({
|
|
|
@@ -155,6 +165,7 @@
|
|
|
username: data.account,
|
|
|
mode: 'none', //不要默认的错误提示
|
|
|
});
|
|
|
+
|
|
|
if (userInfo) {
|
|
|
notification.success({
|
|
|
message: t('sys.login.loginSuccessTitle'),
|