增加登陆后跳转回来源页
This commit is contained in:
@@ -11,7 +11,14 @@ require(["jquery", "bsAlert", "csrfToken", "validator"], function ($, bsAlert, c
|
|||||||
method: "post",
|
method: "post",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (!data.code) {
|
if (!data.code) {
|
||||||
window.location.href = "/";
|
//成功登陆
|
||||||
|
var ref = document.referrer;
|
||||||
|
if(ref){
|
||||||
|
if(ref.split("/")[2] == location.hostname){
|
||||||
|
location.href = ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
location.href = "/";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bsAlert(data.data);
|
bsAlert(data.data);
|
||||||
|
|||||||
Reference in New Issue
Block a user