feat: 门户拦截定向跳转
This commit is contained in:
@@ -4,7 +4,7 @@ import { loginModuleRecord } from '@/constants/app';
|
||||
import { useRouterPush } from '@/hooks/common/router';
|
||||
import { useAntdForm, useFormRules } from '@/hooks/common/form';
|
||||
import { useAuthStore } from '@/store/modules/auth';
|
||||
import {useI18n} from "vue-i18n";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
// Add interface for check code response
|
||||
interface CheckCodeResponse {
|
||||
@@ -16,6 +16,7 @@ interface CheckCodeResponse {
|
||||
defineOptions({
|
||||
name: 'PwdLogin'
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
const authStore = useAuthStore();
|
||||
const { toggleLoginModule } = useRouterPush();
|
||||
@@ -23,7 +24,6 @@ const { formRef, validate } = useAntdForm();
|
||||
const { patternRules } = useFormRules();
|
||||
const codeImg = ref('');
|
||||
|
||||
|
||||
getCheckCode();
|
||||
|
||||
const model = reactive({
|
||||
@@ -31,7 +31,8 @@ const model = reactive({
|
||||
password: '123456',
|
||||
code: '',
|
||||
uuid: '',
|
||||
authType: 'u'
|
||||
authType: 'u',
|
||||
wanfiRedirectParams: {}
|
||||
});
|
||||
|
||||
const rules = {
|
||||
@@ -41,8 +42,9 @@ const rules = {
|
||||
|
||||
async function handleSubmit() {
|
||||
await validate();//验证表单内容
|
||||
model.wanfiRedirectParams = sessionStg.get('wanfiRedirectParams');
|
||||
await authStore.login({
|
||||
loginForm: model,//发送表单的数据
|
||||
loginForm: model, //发送表单的数据
|
||||
onError() {
|
||||
getCheckCode();//重新获取验证码
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user