云深
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
0 deletions
-
src/models/login.ts
-
src/typings.d.ts
|
|
|
@ -49,6 +49,9 @@ const Model: LoginModelType = { |
|
|
|
const redirectUrlParams = new URL(redirect); |
|
|
|
if (redirectUrlParams.origin === urlParams.origin) { |
|
|
|
redirect = redirect.substr(urlParams.origin.length); |
|
|
|
if (window.routerBase !== '/') { |
|
|
|
redirect = redirect.replace(window.routerBase, '/'); |
|
|
|
} |
|
|
|
if (redirect.match(/^\/.*#/)) { |
|
|
|
redirect = redirect.substr(redirect.indexOf('#') + 1); |
|
|
|
} |
|
|
|
|
|
|
|
@ -33,6 +33,7 @@ interface Window { |
|
|
|
fieldsObject: GAFieldsObject | string, |
|
|
|
) => void; |
|
|
|
reloadAuthorized: () => void; |
|
|
|
routerBase: string; |
|
|
|
} |
|
|
|
|
|
|
|
declare let ga: () => void; |
|
|
|
|