测试。。。。请勿拉取更新
This commit is contained in:
parent
6fb4f1e6b5
commit
d8c4180a37
@ -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("登录")
|
||||
}
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user