增加登陆后跳转回来源页

This commit is contained in:
virusdefender 2015-08-18 16:03:25 +08:00
parent c5c23153bf
commit 016a49a53b

View File

@ -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);