测试。。。。请勿拉取更新

This commit is contained in:
ZJY 2021-09-02 09:00:38 +08:00
parent 6fb4f1e6b5
commit d8c4180a37
2 changed files with 6 additions and 5 deletions

View File

@ -77,5 +77,7 @@ func (c *AccountController) Admin() {
}
func (c *AccountController) IsAdmin() {
c.SetSession("pin", "test")
var pin = c.GetString("pin")
c.SetSession("pin", pin)
c.Ctx.WriteString("登录")
}

View File

@ -106,10 +106,9 @@
}
}
}
xmlhttp.open("GET", "/api/login/query", true);
xmlhttp.send();
sessionStorage.setItem('pin',document.getElementById("pin").value);
window.location.href = "/admin"
xmlhttp.open("POST","/admin", true);
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
xmlhttp.send("pin="+userName);
}
</script>
</body>