mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-25 22:30:19 +08:00
refactor(projects): 完善路由配置
This commit is contained in:
14
src/utils/auth/location.ts
Normal file
14
src/utils/auth/location.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/** 获取登录重定向的地址 */
|
||||
export function getLoginRedirectUrl() {
|
||||
return window.location.href;
|
||||
}
|
||||
|
||||
/** 登录后跳转重定向的地址 */
|
||||
export function toLoginRedirectUrl(redirectUrl: string) {
|
||||
window.location.href = redirectUrl;
|
||||
}
|
||||
|
||||
/** 回到首页 */
|
||||
export function toHomeByLocation() {
|
||||
window.location.href = '/';
|
||||
}
|
||||
Reference in New Issue
Block a user