forked from Gitlink/forgeplus-react
超算课程判断扩大到域名,且对地址进行解码
This commit is contained in:
parent
c02fcef01b
commit
84a3614818
|
|
@ -56,12 +56,12 @@ function Login(props){
|
|||
|
||||
const searchParams = new URLSearchParams(search.substring(1));
|
||||
const goPage = searchParams.get("go_page");
|
||||
if(["https://gitlink.educoder.net/paths/z8ag3qtm", "https://gitlink.educoder.net/paths/fyka9x35"].includes(goPage)){
|
||||
if(goPage.includes("gitlink.educoder.net")){
|
||||
getCurrentRole(34, 375).finally(()=>{
|
||||
window.location.href = goPage ? goPage : `/${response.data.login}`
|
||||
window.location.href = goPage ? decodeURIComponent(goPage) : `/${response.data.login}`
|
||||
})
|
||||
}else{
|
||||
window.location.href = goPage ? goPage : `/${response.data.login}`
|
||||
window.location.href = goPage ? decodeURIComponent(goPage) : `/${response.data.login}`
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
|
|
|
|||
|
|
@ -63,12 +63,12 @@ function Register(props){
|
|||
//注册成功,页面跳转即可,注册后登录流程forge处理了
|
||||
const searchParams = new URLSearchParams(search.substring(1));
|
||||
const goPage = searchParams.get("go_page");
|
||||
if(["https://gitlink.educoder.net/paths/z8ag3qtm", "https://gitlink.educoder.net/paths/fyka9x35"].includes(goPage)){
|
||||
if(goPage.includes("gitlink.educoder.net")){
|
||||
getCurrentRole(34, 375).finally(()=>{
|
||||
window.location.href = goPage ? goPage : `/${response.data.login}`
|
||||
window.location.href = goPage ? decodeURIComponent(goPage) : `/${response.data.login}`
|
||||
})
|
||||
}else{
|
||||
window.location.href = goPage ? goPage : `/${response.data.login}`
|
||||
window.location.href = goPage ? decodeURIComponent(goPage) : `/${response.data.login}`
|
||||
}
|
||||
} else {
|
||||
setEmailStr(values.email);
|
||||
|
|
|
|||
Loading…
Reference in New Issue