fix(projects): 修复登录的重定向地址

This commit is contained in:
Soybean
2021-09-16 13:58:11 +08:00
parent c1cdc3a9ed
commit f97f226656
24 changed files with 261 additions and 174 deletions

View File

@ -1,20 +1,7 @@
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import { RouteNameMap } from '@/router';
// import { computed } from 'vue';
// import { useRoute } from 'vue-router';
// import { RouteNameMap } from '@/router';
export default function useRouteParam() {
const route = useRoute();
/** 登录跳转链接 */
const loginRedirectUrl = computed(() => {
let url = '';
if (route.name === RouteNameMap.get('login')) {
url = (route.params?.redirectUrl as string) ?? '';
}
return url;
});
return {
loginRedirectUrl
};
// const route = useRoute();
}