|
@@ -25,7 +25,7 @@
|
|
|
/>
|
|
|
</FormItem>
|
|
|
|
|
|
- <!-- <ARow class="enter-x">
|
|
|
+ <ARow class="enter-x">
|
|
|
<ACol :span="12">
|
|
|
<FormItem name="captcha">
|
|
|
<Input
|
|
@@ -39,16 +39,16 @@
|
|
|
<ACol :span="12" :style="{ 'text-align': 'right' }">
|
|
|
<img class="captcha-img" :src="`http://192.168.0.47:8190/captcha.jpg?t=${Date.now()}`" />
|
|
|
</ACol>
|
|
|
- </ARow> -->
|
|
|
+ </ARow>
|
|
|
|
|
|
- <FormItem name="drag" class="enter-x" :style="{ 'text-align': 'right' }">
|
|
|
+ <!-- <FormItem name="drag" class="enter-x" :style="{ 'text-align': 'right' }">
|
|
|
<BasicDragVerify
|
|
|
ref="el3"
|
|
|
@success="handleSuccess"
|
|
|
text="拖动以进行校验"
|
|
|
successText="校验成功"
|
|
|
/>
|
|
|
- </FormItem>
|
|
|
+ </FormItem> -->
|
|
|
|
|
|
<ARow class="enter-x">
|
|
|
<ACol :span="12">
|
|
@@ -120,7 +120,7 @@
|
|
|
// } from '@ant-design/icons-vue';
|
|
|
import LoginFormTitle from './LoginFormTitle.vue';
|
|
|
|
|
|
- import { BasicDragVerify } from '/@/components/Verify/index';
|
|
|
+ // import { BasicDragVerify } from '/@/components/Verify/index';
|
|
|
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
@@ -145,12 +145,13 @@
|
|
|
const formRef = ref();
|
|
|
const loading = ref(false);
|
|
|
const rememberMe = ref(false);
|
|
|
- const isDragValidate = ref(false);
|
|
|
+ // const isDragValidate = ref(false);
|
|
|
|
|
|
const formData = reactive({
|
|
|
account: '17324327132',
|
|
|
// password: 'zfb123456',
|
|
|
password: 'USFf52nBZiMTIzNDU2WAJ7GAofemSXnYdUok',
|
|
|
+ captcha: '',
|
|
|
});
|
|
|
|
|
|
const { validForm } = useFormValid(formRef);
|
|
@@ -159,27 +160,28 @@
|
|
|
|
|
|
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.LOGIN);
|
|
|
|
|
|
- function handleSuccess() {
|
|
|
- // console.log('11');
|
|
|
- isDragValidate.value = true;
|
|
|
- }
|
|
|
+ // 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;
|
|
|
- }
|
|
|
+ // 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({
|
|
|
password: data.password,
|
|
|
username: data.account,
|
|
|
+ captcha: data.captcha,
|
|
|
mode: 'none', //不要默认的错误提示
|
|
|
});
|
|
|
|