解决登录的bug,兼容https访问

This commit is contained in:
季圣华
2019-05-16 00:11:27 +08:00
parent 3f6cf16fae
commit 74f0b88642

View File

@@ -166,11 +166,9 @@
success: function (res) { success: function (res) {
if(res && res.code === 200) { if(res && res.code === 200) {
if(res.data.user) { if(res.data.user) {
console.log("user");
var user = res.data.user; var user = res.data.user;
sessionStorage.setItem("userId", user.id); sessionStorage.setItem("userId", user.id);
console.log("http://" + location.host + "/index.html"); top.location.href = "/index.html";
top.location.href = "http://" + location.host + "/index.html";
} }
} }
}, },