登录页面redirect重定向功能(I7DBUP)
This commit is contained in:
@ -71,6 +71,7 @@ import { encrypt, decrypt } from "@/utils/jsencrypt";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
@ -96,6 +97,10 @@ const captchaEnabled = ref(true);
|
||||
const register = ref(false);
|
||||
const redirect = ref(undefined);
|
||||
|
||||
watch(route, (newRoute) => {
|
||||
redirect.value = newRoute.query && newRoute.query.redirect;
|
||||
}, { immediate: true });
|
||||
|
||||
function handleLogin() {
|
||||
proxy.$refs.loginRef.validate(valid => {
|
||||
if (valid) {
|
||||
|
Reference in New Issue
Block a user