feat(projects): 添加路由跳转浏览器新标签

This commit is contained in:
Soybean
2021-11-30 22:00:59 +08:00
parent 2ad1ad32b8
commit 987cef3363
2 changed files with 33 additions and 19 deletions

View File

@ -43,7 +43,7 @@ import { OtherLogin } from './components';
const notification = useNotification();
const auth = useAuthStore();
const { toHome, toCurrentLogin, toLoginRedirectUrl } = useRouterPush();
const { routerPush, toHome, toCurrentLogin } = useRouterPush();
const { loginRedirectUrl } = useRouteQuery();
const { loading, startLoading, endLoading } = useLoading();
@ -77,7 +77,7 @@ function handleSubmit(e: MouseEvent) {
endLoading();
setToken('temp-token');
if (loginRedirectUrl.value) {
toLoginRedirectUrl(loginRedirectUrl.value);
routerPush(loginRedirectUrl.value);
} else {
toHome();
}