mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-01-16 01:13:47 +00:00
增加登陆后跳转回来源页
This commit is contained in:
parent
c5c23153bf
commit
016a49a53b
@ -11,7 +11,14 @@ require(["jquery", "bsAlert", "csrfToken", "validator"], function ($, bsAlert, c
|
||||
method: "post",
|
||||
success: function (data) {
|
||||
if (!data.code) {
|
||||
window.location.href = "/";
|
||||
//成功登陆
|
||||
var ref = document.referrer;
|
||||
if(ref){
|
||||
if(ref.split("/")[2] == location.hostname){
|
||||
location.href = ref;
|
||||
}
|
||||
}
|
||||
location.href = "/";
|
||||
}
|
||||
else {
|
||||
bsAlert(data.data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user